search for: the_column

Displaying 1 result from an estimated 1 matches for "the_column".

2009 Oct 19
1
Convert data frame entries to numbers
...simple problem really, but since I'm quite new to R I need to ask: If I have a data frame: str(test) : $ classcol: Factor w/ 3 levels "1","2","3" How do I convert the entries in this column to numbers. I.e., I want to be abl to do simple calculations like test[1,the_column] - test [2,the_column] without errors. as.numeric(test) yeilds the error "object cannot be coerced to type 'double'" Thanks! John