[R] I() in data.frames

Jim Lindsey james.lindsey at luc.ac.be
Tue Jul 16 15:52:27 CEST 2002

 I avoid dataframes so just noticed this in 1.5.1:

> r <- rbinom(10,5,0.5)
> data.frame(y=I(cbind(r,5-r)))
Error in data.frame(y = c("2", "3", "4", "5", "2", "2", "1", "0", "3",  : 
        row.names should specify one of the variables

This worked up until and including 1.1.x, but not since (which shows
how often I use them!).
  Is this a feature, and if so, how does one now keep a two column
response variable in a dataframe now?
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list