Displaying 1 result from an estimated 1 matches for "mychi2".
Did you mean:
machin
2001 Apr 06
0
Subscript out of bounds- (my) problem with expansion of expression?
...;")
generat
}
> generator(pom1(mytable[1, ,1]))
[1] "-c(3,4,6)"
or
>pom <- pom1(mytable[1, ,1])
> generator(pom)
[1] "-c(3,4,6)"
Then the "generator" is applied inside chisq.test:
for (i in 1:length(mytable[,1,1]))
{
pom <- pom1(mytable[i,,1])
mychi2[i]<-chisq.test(rbind(mytable[i,generator(pom),1],
mytable[i,generator(pom),2]))$p.value
}
(or just for mytable[,1,1]).
and as a result, an "Error: subscript out of bounds" is given immediately.
Why?
Neither the use of noquote(generator(pom)) instead of generator(pom) does
help, nor...