[R] rownumber
David Barron
mothsailor at googlemail.com
Sun Sep 10 21:32:45 CEST 2006
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
More information about the R-help
mailing list