[R] better way to trick data frame structure?

Seth sjmyers at syr.edu
Wed May 5 07:49:25 CEST 2010


Hi,

I have a data frame where 1 variable is a factor with only 1 level.  I need
the data frame structure to reflect that there are 2 levels for this factor,
even though this is not the case.  I am currently adding extra 'fake' rows
to the data frame to ensure that 2 levels are present, but this is slowing
processing time in a loop quite a bit. Can I manually specify that this
factor variable has two levels (even though this is lying to R)? 
Thanks,Seth
-- 
View this message in context: http://r.789695.n4.nabble.com/better-way-to-trick-data-frame-structure-tp2130470p2130470.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list