Hi again!
21.06.2016, 21:33, [email protected] wrote:
Hi Kimmo, Thanks for your reply. I think now my problem is that I
don't understand what does factor(df.classes[training]) do?
Sorry, my mistake, should habe been 'df$speed'. Please try the following:
--- snip ---
set.seed(7) training <- sample(nrow(df), 120)
Xtraining<- scale(df[training,])
Xtest <- scale(df[-training,], center = attr(Xtraining,
"scaled:center"), scale = attr(Xtraining,
"scaled:scale"))
xyf.df <- xyf(Xtraining, factor(df$speed[training]), grid =
somgrid(5, 5, "hexagonal"))
--- snip ---
HTH,
Kimmo
______________________________________________
[email protected] 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.