Hi,
You need to add parentheses around your return argument. (Please, note that
your example is not successfully because of data problem).
ranksum <- function(a){
g1 <- c(1, 2, 3)
g2 <- c(4, 5, 6, 7, 8, 9, 10, 11, 12)
c <- wilcox.test(a[g1], a[g2])
return(c$p.value)
}
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.