[R] Cannot scale data

Rui Barradas ruipbarradas at sapo.pt
Sat Apr 6 19:31:54 CEST 2013


Hello,

Can't you simply call svm() with scale = FALSE ?
If the variable is constant, it cannot be scaled to unit variance (and 
zero mean).

Hope this helps,

Rui Barradas

Em 06-04-2013 17:19, Nicolás Sánchez escreveu:
> Hello!
>
> I have this error in R:
>
> In svm.default(x, y, scale = scale, ..., na.action = na.action) :
>    Variable(s) ‘X.11.’ constant. Cannot scale data.
>
> Of course, I have a column of 25 rows where the values are always 0. Why it
> is not possible to have a column with 0?
> I need this column because is a feature from a patient. Is there any way to
> solve this error?
>
> Thanks in advance!
>
> 	[[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>



More information about the R-help mailing list