[R] How to read this data properly?

2012-03-03 Thread Bogaso Christofer
Dear all, I have been given a data something like below: Dat = 2 3 28.3 3.05 8 3 3 22.5 1.55 0 1 1 26.0 2.30 9 3 3 24.8 2.10 0 3 3 26.0 2.60 4 2 3 23.8 2.10 0 3 2 24.7 1.90 0 2 1 23.7 1.95 0 3 3 25.6 2.15 0 3 3 24.3 2.15 0 2 3 25.8 2.65 0 2 3 28.2 3.05 11 4 2 21.0 1.85 0 2 1 26.0 2.30 14 1

Re: [R] How to read this data properly?

2012-03-03 Thread Jinsong Zhao
On 2012-3-3 23:15, Bogaso Christofer wrote: Dear all, I have been given a data something like below: Dat = 2 3 28.3 3.05 8 3 3 22.5 1.55 0 1 1 26.0 2.30 9 3 3 24.8 2.10 0 3 3 26.0 2.60 4 2 3 23.8 2.10 0 3 2 24.7 1.90 0 2 1 23.7 1.95 0 3 3 25.6 2.15 0 3 3 24.3 2.15 0 2 3 25.8 2.65 0 2 3 28.2

Re: [R] How to read this data properly?

2012-03-03 Thread Greg Snow
Using the readlines function on your dat string gives the error because it is looking for a file named 2 3 ... which it is not finding. more likely what you want is to create a text connection (see ?textConnection) to your string, then use scan or read.table on that connection. On Sat, Mar 3,

Re: [R] How to read this data properly?

2012-03-03 Thread William Dunlap
, 2012 7:15 AM To: r-help@r-project.org Subject: [R] How to read this data properly? Dear all, I have been given a data something like below: Dat = 2 3 28.3 3.05 8 3 3 22.5 1.55 0 1 1 26.0 2.30 9 3 3 24.8 2.10 0 3 3 26.0 2.60 4 2 3 23.8 2.10 0 3 2 24.7 1.90 0 2 1 23.7 1.95 0 3 3 25.6