I have a dataset which looks like this-
col1 1 ATOM 1 N ILE A 12 67.611 47.640 52.312 1.00 12.44 N 2 ATOM 2 CA ILE A 12 66.381 47.660 51.520 1.00 25.25 C
It has a single column called col1. I want to separate into 12 columns for which I'm using the following command-
try=separate(subset,col1,c("name","S.No","Atom Name","Residue Name","Symbol","Residue Number","X-cor","Y-cor","Z-cor","Uk1","Uk2","Symbol"), sep= " ")
But I keep on getting the following error, which I do not understand-
Warning message: Too many values at 3929 locations: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...
And it gives me the following output-
name S.No Atom Name Residue Name Symbol Residue Number X-cor Y-cor Z-cor Uk1 Uk2 Symbol 1 ATOM 1 N ILE 2 ATOM 2 CA ILE A
Any help fixing this is highly appreciated. Thanks!
read.tableor whatever faster equivalent (withheader=FALSE) and avoid the need to useseparateat all.