Re: [R] rownumber

From: David Barron <mothsailor_at_googlemail.com>
Date: Sun 10 Sep 2006 - 19:32:45 GMT

This will work too:

> n <- dim(lead.dat)[1]
> n

[1] 6
> ix <- seq(1,n,by=2)
> ix

[1] 1 3 5
> lead.dat[ix,]

     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]

[1,]  105    1    1 1103    1    5    4    8    5    22
[2,]  106    1    2  606    1    5   12   11    9    37
[3,]  107    1    3  611    1    7    9   10    7    33

-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

______________________________________________
R-help@stat.math.ethz.ch 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.
Received on Mon Sep 11 06:39:13 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 10 Sep 2006 - 21:30:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.