I would like to insert a few modest size data frames directly into my
R code. a short illustration example of what I want is
d - read.csv( _END_, row.names=1 )
, col1, col2
row1,1,2
row2,3,4
__END__
right now, the data sits in external files. I could put each column
into its own vector and
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
On Aug 2, 2012, at 5:57 PM, ivo welch wrote:
I would like to insert a few modest size data frames directly into my
R code. a short illustration example of what I want is
d - read.csv( _END_, row.names=1 )
, col1, col2
row1,1,2
row2,3,4
__END__
right now, the data sits in external files.
To: ivo welch
Cc: r-help
Subject: Re: [R] 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
On 3 August 2012 at 03:15, William Dunlap wrote:
| and you probably want closeAllConnections() immediately following
|
| No you do not want to close all connections. You should close each
| connection that you open, but not others (they may be used by other
| functions like sink() or
On Thu, Aug 2, 2012 at 8:57 PM, ivo welch ivo.we...@gmail.com wrote:
I would like to insert a few modest size data frames directly into my
R code. a short illustration example of what I want is
d - read.csv( _END_, row.names=1 )
, col1, col2
row1,1,2
row2,3,4
__END__
right now, the
6 matches
Mail list logo