Skip to content
Prev 263938 / 398502 Next

Odp: data.frame: How to get the classes of all components and how to remove their factor structure?

data.frame?
rep("high",12)),
"class"?
If you do it often you can

unfactor <- function(x) as.numeric(as.character(x))
df.$x <- unfactor(df.$x)

or you can use 
df. <- as.data.frame(xtabs(y ~ x + group, data=df), 
stringsAsFactors=FALSE)
df.$x <- as.numeric(df.$x)

But it seems to me that it is not much less bulkier.

Regards
Petr
http://www.R-project.org/posting-guide.html