Dear expeRts,

I would like to use a oneway_test (from package coin) to test whether  
two groups differ on various variables. The variables are encoded  
within a data frame. Unfortunately, I obtained an error, that I don't  
understand. Could you please help me ?

Example:
library(coin)
y <- as.data.frame(matrix(rnorm(200), ncol=2))
group <- as.factor(unif(100))

lapply(y, function(var) oneway_test(var ~ group))

Error message is:
(in French, my locale) Erreur dans eval(expr, envir, enclos) : objet  
'var' introuvable
(my personal translation in English) Error in eval(expr, envir,  
enclos) : object 'var' not found

Thank you,

Matthieu

Matthieu Dubois
Post-doctoral fellow

Psychology and NeuroCognition Lab (CNRS UMR 5105)
Université Pierre Mendès-France
BP47 --- 38040 Grenoble Cedex 9 --- France

Email: matthieu.dub...@upmf-grenoble.fr
Gmail: matth...@gmail.com
http://web.upmf-grenoble.fr/LPNC/membre_matthieu_dubois





        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to