Hi all, 
I want to use Supervised Self organizing Maps from Kohonen package for my data. 
I need to divide my df into training set and test set, but a part of my df 
contains column with factor levels and I don't know how to bring them into my 
training set. Currently I use the following command for my training set:

    dt=sort(sample(nrow(df),nrow(df)*.7))
    training=m[dt,]
till here I get no error but in the next step which I need to bring my training 
set in a matrix I face this error:
    
    scale(df[training,])
error: 'x' should be numeric
Does anyone know how should I include column with factor levels in my df so 
that I don't get this error?
Thanks for any help,
Elahe

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to