[R] chi.test in R

Jens Scheidtmann JensScheidtmann at web.de
Tue Nov 14 17:26:14 CET 2006


downunder <larsfromspace at web.de> writes:

> Hi all. 
>
> I need some help computing multidimensional pvalues of a multivariate data
> set.
>
> chisq.test(x[,1],x[,2])$p.value
>
> i need a command or loop that creates me a vector or a matrix (each variabe
> with each variable) would be even better for the p.values of the variables
> of a data set.
>
> something like 
>
> chisq.test(x[,1:5],x[,2])$p.value or i=c(1,2,3)
> chisq.test(x[,i],x[,j])$p.value doesn't work

look at mapply, or generally apply

HTH,

Jens



More information about the R-help mailing list