Dear R-forumites,

 

I want to apply a Wilcoxon test on subsets of the data frame mydata,
splitted using the myindice variable. When I send :

 

wilcoxtest <- by(mydata, mydata$myindice, function(x)
{wilcox_test(x$value~x$fact)})

 

I get :

 

Error in eval(expr, envir, enclos) : object "x" not found

 

whereas 

 

wilcoxtest <- by(mydata, mydata$myindice, function(x)
{wilcox.test(x$value~x$fact)})

 

works !

 

Why does it fail with the wilcox_test only? And, most important, how can I
apply the wilcox_test function to subsets of mydata splitted according to
mydata$myindice ?

 

Thanks in advance,

 

Jean-Luc Dupouey

Forest Ecology and Ecophysiology Unit

INRA

54280 Champenoux

France

 

mail: [EMAIL PROTECTED]

 


        [[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