[R] Training set in Self organizing Map

chalabi.elahe at yahoo.de chalabi.elahe at yahoo.de
Wed Jun 1 16:39:30 CEST 2016


Hi all,
I want to use Self Organizing Map in R for my data. I want my training set to be the following subset of my data:
 

    subdf=subset(df,Country%in%c("US","FR"))
next I should change this subset to a matrix but I get the following error:
 
    data_train_matrix=as.matrix(scale(subdf))
    error in colMeans(x,na.rm=TRUE):'x' must be numeric
 
Can anyone help me to solve that?
Thanks for any help
Elahe



More information about the R-help mailing list