Re: [R] Q re iterating a process and appending results to output file

2008-07-23 Thread jim holtman
Here is one way of doing it: # generate 200 x 2500 samples and then check them c <- qnorm(0.05) i <- 2500 iter <- 200 x <- matrix(rnorm(i * iter, 0, 1) < c,nrow=i) # TRUE/FALSE according to condition # now create the counts x.c <- colSums(x) # write out to a file 1 value on each line cat(x.c, fil

Re: [R] Q re iterating a process and appending results to output file

2008-07-23 Thread Eric C Banfield
r-help@r-project.org Subject Re: [R] Q re iterating a process and appending results to output

[R] Q re iterating a process and appending results to output file

2008-07-23 Thread Eric C Banfield
Greetings. This is very basic but we can't figure it out. The following simple code counts how many values land in the "tail" (below a quantile) of a standardized normal distribution of random numbers. First two commands are inputs: > c <-0.05 > i <-2500 Second two commands are formulas I want