Skip to content
Prev 21160 / 63424 Next

.Call and data frames

On Jun 22, 2006, at 9:04 AM, Dominick Samperi wrote:

            
But of course be aware that there is a map from colData to names  
(here I am guessing the C implementation mirrors what is happening in  
R), where you  have	

 > test = data.frame(tmp =c ("a","a","b"))
 > levels(test$tmp)
[1] "a" "b"

That is, you only have one occurrence of each level. So you need to  
take care of this remapping. Unless all you need is the different  
possible values.

And thanks to Brian Ripley who taught me something new about data  
frames: that it is indeed possible to have characters (although it is  
quite explicit in the man page on data.frame)

/Kasper