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.matrix(    replicate(10, sample(x, 1) )  ) )
> > [1] 10  1
> >>
> > =====================
> >
> >
> > So, the behaviour is the same...
> > ...but is not really that fine. :(
> >
> > ...how could I avoid the necessity of the transposition
> > of the matrix in the case of only one sample?
>
>
> use
>       matrix( your.result , nc = n.replicates )
>
> or
>
>       dim( your.result ) <- c( n.samples, n.replicates )
[...]

Aaaah, OK!

Yes, using dim() makes sense.

Good hint!

Thanks!


Ciao,
   Oliver

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to