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: dupouey@nancy.inra.fr

 


	[[alternative HTML version deleted]]

