Skip to content
Prev 302203 / 398503 Next

embedding data frame in R code?

I'm not sure I entirely understand the question, but the closest thing
I can think of to a data frame literal, excepting dput(), would be
this:

d <- read.csv(textConnection("
a, b
1, cow
2, dog
3, cat"), header = TRUE)

and you probably want closeAllConnections() immediately following to
avoid a warning.

Best,
Michael
On Thu, Aug 2, 2012 at 7:57 PM, ivo welch <ivo.welch at gmail.com> wrote: