search for: ball2

Displaying 1 result from an estimated 1 matches for "ball2".

Did you mean: ball
2008 May 29
2
Calculating conditional mean of large series of experiments
...ave got so far is this: output <- matrix(nrow=2, ncol=1000) #I'm attempting to output a vector with 2 rows and 1000 columns. Each column represents the outcome of one experiment. I don't even know if what I've written above is allowed. for (i in 1:1000){ ball1 <- sample(1:10,1) ball2 <- sample(1:10,1) A <- max(ball1, ball2) B <- min(ball1, ball2) output[i] <- matrix(nrow=2, ncol=1000, data=c(A, B)) } # This gives me the message that "number of items to replace is not a multiple of replacement length". I would really appreciate it if someone could tell me...