[R] two apparent anomalies

Moritz Grenke r-list at 360mix.de
Sat Jan 22 19:30:54 CET 2011


If you type ?as.data.frame and ?data.frame you can see there are
differences. data.frame() can take more than one "data parameter".

#producing different results:
data.frame(c(1,2,3), c("hello","world","!")) 
as.data.frame(c(1,2,3), c("hello","world","!"))

there are differences (in parameters) for "as.factor" and "factor" as well.
Type ?factor
________________
Moritz Grenke
http://www.360mix.de


> Thanks for both responses.

> is there a difference between the "as.factor" and "factor" commands
> and also between "as.data.frame" and "data.frame"?



More information about the R-help mailing list