[R] error in test

From: Paul Adams <pma3622_at_yahoo.com>
Date: Fri, 25 Jul 2008 21:52:54 -0700 (PDT)


Hello everyone,    

  I am trying to use the following code:    

  dat<-read.table(file="C:\\Documents.....txt")
class2<-read.table(file="C:\\Documents.....txt")
class1<-read.table(file="C:\\Documents .....txt")
dat<-as.data.frame(dat)
dimnames(dat)[[1]]<-paste("g",c(1:nrow(dat)),sep="") l<-c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1) rbind(l,dat)
dat<-as.matrix(dat)
x<-dat[1:100,]
  wilcox.test<-function(x,s1,s2) {
x1<-x[s1]
x2<-x[s2]
x1<-as.numeric(x1)
x2<-as.numeric(x2)

wilcox.out<-wilcox.test(x,y=NULL,exact=FALSE,mu=0,correct=TRUE,alternative="two.sided",paired=FALSE) out<-as.numeric(wilcox.out$statistic)
return(out)
  }
wilcox.test.run<-apply(x,1,wilcox.test,s1=x[1:27],s2=x[28:39]) wilcox.test.run[is.na(wilcox.test.run)]<-1    

  The error I get is that error in wilcox.test : unused arguments(y=Null,exact=FALSE,mu=0,correct=TRUE,alternative="two.sided,paired=FALSE)   I get this error no matter if I use all the arguments available or as few arguments as possible.   I do not know what I am doing wrong and would appreciate any suggestions.   Thanks
  Paul        

       
	[[alternative HTML version deleted]]

______________________________________________
R-help_at_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. Received on Sat 26 Jul 2008 - 04:54:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 26 Jul 2008 - 07:32:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive