[R] Read a dataset with different lengths

2005-03-21 Thread Xiyan Lon
Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 22, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 34, 5, 11, 1, 1, 6, 1, 1, 5, 14,

RE: [R] Read a dataset with different lengths

2005-03-21 Thread Liaw, Andy
If the file is formatted as you've shown, you should be able to read it with read.fwf(). Andy From: Xiyan Lon Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1,

Re: [R] Read a dataset with different lengths

2005-03-21 Thread Uwe Ligges
Xiyan Lon wrote: Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 22, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 34, 5, 11, 1, 1, 6,

RE: [R] Read a dataset with different lengths

2005-03-21 Thread Berton Gunter
To: R-help@stat.math.ethz.ch Subject: [R] Read a dataset with different lengths Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 22, 13, 5

Re: [R] Read a dataset with different lengths

2005-03-21 Thread Gabor Grothendieck
Xiyan Lon xiyanlon at gmail.com writes: : : Dear useR again, : How can I read a dataset if lines in dataset did not have same : elements (have different lengths), For example: : : 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 : 22, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1,

Re: [R] Read a dataset with different lengths

2005-03-21 Thread Xiyan Lon
Thank you for your quick respons, helps, advise, links, etc. I have solved my problems now. Best wishes, Xiyan Lon __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!