On Wed, Apr 29, 2009 at 01:58:06PM +0530, Umesh Srinivasan wrote:
> Hi all,
>
> If I have a huge matrix/ dataframe and I want to create a new matrix/
> dataframe with every second (or third, or fourth etc.) row of the original
> matrix, how can I do it? Any help much appreciated.
Others ahve alr
Thanks a lot Baptiste & Dimitris,
It's working!
Cheers,
Umesh
On Wed, Apr 29, 2009 at 2:06 PM, Dimitris Rizopoulos <
d.rizopou...@erasmusmc.nl> wrote:
> probably you want to use seq(), e.g.,
>
> mat <- matrix(1:500, 100, 5)
>
> mat[seq(1, nrow(mat), 2), ]
> mat[seq(1, nrow(mat), 3), ]
> mat[seq
probably you want to use seq(), e.g.,
mat <- matrix(1:500, 100, 5)
mat[seq(1, nrow(mat), 2), ]
mat[seq(1, nrow(mat), 3), ]
mat[seq(1, nrow(mat), 4), ]
I hope it helps.
Best,
Dimitris
Umesh Srinivasan wrote:
Hi all,
If I have a huge matrix/ dataframe and I want to create a new matrix/
dat
Try this,
a = matrix(rnorm(10*10),ncol=10)
a[, seq(1,ncol(a),by=2)]
baptiste
On 29 Apr 2009, at 09:28, Umesh Srinivasan wrote:
Hi all,
If I have a huge matrix/ dataframe and I want to create a new matrix/
dataframe with every second (or third, or fourth etc.) row of the
original
mat
Hi all,
If I have a huge matrix/ dataframe and I want to create a new matrix/
dataframe with every second (or third, or fourth etc.) row of the original
matrix, how can I do it? Any help much appreciated.
Thanks,
Umesh
[[alternative HTML version deleted]]
__
5 matches
Mail list logo