Message-ID: <13B6B731-26E3-4342-BB23-BDF943FF91EA@exeter.ac.uk>
Date: 2009-04-29T08:34:29Z
From: Baptiste Auguie
Subject: selecting ith rows of a matrix
In-Reply-To: <ffa653cd0904290128l1491f7b0ne0f4f71faa984527@mail.gmail.com>
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
> matrix, how can I do it? Any help much appreciated.
>
> Thanks,
> Umesh
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
_____________________________
Baptiste Augui?
School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK
Phone: +44 1392 264187
http://newton.ex.ac.uk/research/emag