Hi,
You could try:
Chisq1<-do.call(cbind,lapply(c(0.05,0.001),function(i) 
{x1<-sapply(seq_len(nrow(Specc)),function(i) 
chisq.test(as.table(unlist(Specc[i,-c(1:3)])))$p.value); sum(x1<i)}))
 
Wilcox1<-do.call(cbind,lapply(c(0.05,0.001),function(i){x1<-sapply(seq_len(nrow(Specc)),function(i)
 wilcox.test(unlist(Specc[i,-c(1:3)]))$p.value);sum(x1<i)}))

res<-rbind(Wilcox1,Chisq1)
 colnames(res)<- c("number of rows iwth p-value<0.05", "number of rows with 
p-value<0.001")
 rownames(res)<-c("wilcox.test","chisq.test")
  res
#            number of rows iwth p-value<0.05 number of rows with p-value<0.001
#wilcox.test                               14                                 0
#chisq.test                                 0                                 0


#The warnings() were there for all the rows.
#If you want, you could have a new column with "name of test", instead of 
rownames.

A.K.





________________________________
From: Vera Costa <veracosta...@gmail.com>
To: arun <smartpink...@yahoo.com> 
Sent: Friday, July 19, 2013 1:25 PM
Subject: Re: Kruskal.test



Thank you. 
But I need to construct a dataframe like I sent you. You can help me in this? I 
will look for your code in a few moments
No dia 19 de Jul de 2013 18:20, "arun" <smartpink...@yahoo.com> escreveu:

______________________________________________
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