Re: [R] [External] Re: [External] Get a result but an error message as well ?

2020-05-19 Thread Jeff Newmiller
Works for me. set.seed( 42 ) a <- c(2,4,3,4,6,5,3,1,2,3,4,3,4,5,65) b <- c(23,45,32,12,23,43,56,44,33,11,12,54,23,34,54) d <- c(9,4,5,3,2,1,3,4,5,6,4,9,10,11,18) my.experiment <- function() { a <- a + rnorm( length( a ), 0, 0.05 ) b <- b + rnorm( length( b ), 0, 0.05 ) d <- d + rnorm( lengt

Re: [R] [External] Re: [External] Get a result but an error message as well ?

2020-05-19 Thread Richard M. Heiberger
you need to pay attention to the intermediate structures that you generate. If all you want is one number, then that is what you should create mean(replicate( 500, my.experiment() )) Since you do seem to want to store the intermediate values, then you must name the object according to its structu