should not be 0 but we will ignore the
> warning.
> >
> > now it should generate p value for next row taking 35 and 84 (v1 and v2)
>
> > as observed and 22 and 84 (w1 and w2) as expected.so here it will do chi
>
> > square test for all 6 rows and will generate 6 p values.My data frame
>
If your data is d1:
temp <- apply(d1[,1:4], 1, order, decreasing=TRUE)[1:2,]
temp <- rbind(temp, temp+4)
result <- sapply(1:nrow(d1), function(i)
chisq.test(matrix(as.matrix(d1[i,temp[,i]]), ncol=2)))
Uwe Ligges
On 16.08.2011 23:26, Bansal, Vikas wrote:
Dear all,
I have been working on t
_
> From: R. Michael Weylandt [michael.weyla...@gmail.com]
> Sent: Wednesday, August 17, 2011 7:11 PM
> To: Bansal, Vikas
> Cc: r-help@r-project.org
> Subject: Re: [R] Chi square test on data frame
>
> I think everything below is right, but it's all a little helter-skelter
7:11 PM
To: Bansal, Vikas
Cc: r-help@r-project.org
Subject: Re: [R] Chi square test on data frame
I think everything below is right, but it's all a little helter-skelter so take
it with a grain of salt:
First things first, make your data with dput() for the list.
Y = structure(c(0, 35, 0,
I think everything below is right, but it's all a little helter-skelter so
take it with a grain of salt:
First things first, make your data with dput() for the list.
Y = structure(c(0, 35, 0, 0, 0, 0, 84, 84, 0, 48, 84, 0, 22, 0, 0,
0, 0, 0, 10, 0, 48, 0, 0, 48, 0, 22, 0, 0, 0, 0, 84, 84, 0, 48,
Is there anyone who can help me with chi square test on data frame.I am
struggling from last 2 days.I will be very thankful to you.
Dear all,
I have been working on this problem from so many hours but did not find any
solution.
I have a data frame with 8 columns-
V1 V2 V3
Dear all,
I have been working on this problem from so many hours but did not find any
solution.
I have a data frame with 8 columns-
V1 V2 V3 V4 W1 W2W3 W4
1 084 22 10 0 84 0 0
235840
7 matches
Mail list logo