If I have a
DataFrame object, but I want to use a classification algorithm like
randomForest from CRAN, which complains about S4 objects being input, what is the best way to coerce to a
data.frame? I would like to keep column names in the current gene symbol format. They might have unusual symbols like HLA-A, for example.
as.data.frame automatically converts column names to by syntactically valid, by doing things such as replancing hyphens by periods.
data.frame(myDataFrame, check.names = FALSE) effectively does what I want. But, it's a constructor rather than a function to convert between types. Anything better to use?