[R] Converting dataframe to matrix

Noah Silverman noah at smartmediacorp.com
Fri Oct 16 10:33:14 CEST 2009


Hi,

I'm experimenting with a few learners that require a matrix as their 
input.  (Currently svmpath, vbmp, etc.)

I currently have a dataframe with 50 columns and 20,000 rows.

I tried using:

x <- as.matrix(my_data.frame)

If I then as, "is.matrix(x)", I get TRUE.

However everywhere I've tried to use the matrix returns errors.

Is there a step I'm missing?

Thanks!

-N




More information about the R-help mailing list