Dear all,
it looks like rhyper() gives wrong results compared to theory and compared
to sample() and rghyper(SuppDists).
Best regards
Jens
K <- 100
J <- 60
N <- K+J
p <- K/N
n <- 50
nn <- 10
urn <- rep(0:1, c(J,K))
x <- sapply(1:nn, function(i){
sum(sample(urn, n))
})
y <- rhy
The documentation of seq() states that any one-parameter call to
seq(one.parameter) is interpreted as an along= parameter. Hoewever, if one.parameter is
a vector of length 1, one.parameter is obviously interpreted as a length=
argument, see example below. This behaviour probably cannot be changed