[R] Read in dataset without saving it

From: Paul Chatfield <p.s.chatfield_at_reading.ac.uk>
Date: Wed, 09 Jun 2010 01:38:45 -0700 (PDT)

A simple question - I have a small dataset to read in and want to copy and paste part from Excel and paste it into an R script file without creating more files saving it as a .txt/.csv and then reading that in. I want to read in 3 columns e.g.

1 2.5 3.4
1 2.3 3.1
1 2.6 3.9
2 2.9 2.8
2 2.6 2.9
2 2.7 2.9
3 2.3 3.3
3 2.4 3.0
3 2.7 3.2

I thought I could use scan() but don't know how to extend it to multiple columns? I thought about using colwise (plyr) but think I am making this more complicated than it probably should be! Is there an easy way to do this?

Any ideas gratefully received,


View this message in context: http://r.789695.n4.nabble.com/Read-in-dataset-without-saving-it-tp2248495p2248495.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 09 Jun 2010 - 10:18:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jun 2010 - 11:10:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive