Skip to content
Back to formatted view

Raw Message

Message-ID: <1374255796.66789.YahooMailNeo@web142603.mail.bf1.yahoo.com>
Date: 2013-07-19T17:43:16Z
From: arun
Subject: Kruskal.test
In-Reply-To: <CAHc7oGGVtVVY=4KN6F14f1MZZgiNR3LC_C2vJcBM060TdA1fAw@mail.gmail.com>

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.rt at gmail.com>
To: arun <smartpink111 at 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" <smartpink111 at yahoo.com> escreveu: