Re: [R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Oliver Bandel
Hi, Zitat von "Charles C. Berry" <[EMAIL PROTECTED]>: > On Thu, 6 Nov 2008, Oliver Bandel wrote: > > > Hello Charles, > > > > [snip] > > >> dim( as.matrix(replicate(10, sample(x, 3) ) ) ) > > [1] 3 10 > >> dim( as.matrix(replicate(10, sample(x, 2) ) ) ) > > [1] 2 10 > >> dim( as.matri

Re: [R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Charles C. Berry
On Thu, 6 Nov 2008, Oliver Bandel wrote: Hello Charles, [snip] dim( as.matrix(replicate(10, sample(x, 3) ) ) ) [1] 3 10 dim( as.matrix(replicate(10, sample(x, 2) ) ) ) [1] 2 10 dim( as.matrix(replicate(10, sample(x, 1) ) ) ) [1] 10 1 = So, the

Re: [R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Oliver Bandel
Hello Charles, thank you for the hint. Zitat von "Charles C. Berry" <[EMAIL PROTECTED]>: [...] > > This looks good (and correct to me). > > Look again . > > It is not the same as what you have above. [...] OK, yes, you are right! I mixed the two parameters... Now I get the same problem als

Re: [R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Charles C. Berry
On Thu, 6 Nov 2008, Oliver Bandel wrote: Hello, for a simulation I tried the following: = sampmeanvec <- function (from, n, repititions) { print( paste("samplesize n:", n, "repititions:", repititions) ) samples.mat <- as.matri

[R] replicate and as.matrix: different behaviour between batch and non-batch mode

2008-11-06 Thread Oliver Bandel
Hello, for a simulation I tried the following: = sampmeanvec <- function (from, n, repititions) { print( paste("samplesize n:", n, "repititions:", repititions) ) samples.mat <- as.matrix( replicate( repititions, sample(from, n)