[R] select row
ONKELINX, Thierry
Thierry.ONKELINX at inbo.be
Tue Jul 3 11:40:51 CEST 2007
Assuming that id is a character.
tab[tab$id == "25-2006", ]
Cheers,
Thierry
------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be
www.inbo.be
Do not put your faith in what statistics say until you have carefully
considered what they do not say. ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney
> -----Oorspronkelijk bericht-----
> Van: r-help-bounces op stat.math.ethz.ch
> [mailto:r-help-bounces op stat.math.ethz.ch] Namens Leonardo Lami
> Verzonden: dinsdag 3 juli 2007 11:34
> Aan: r-help op stat.math.ethz.ch
> Onderwerp: [R] select row
>
> Hi all,
> I have a little problem selecting some rows from a data.frame.
> I'd like to select the rows where a determinated column take
> a partivolar value.
>
> For example:
> tab
> id x y
> 1 24-2005 1621814 4834991
> 2 24-2005 1621856 4834907
> 3 24-2005 1621763 4834956
> 4 25-2006 1622330 4835189
> 5 25-2006 1622533 4834834
> 6 25-2006 1622535 4834909
> 7 25-2006 1622543 4834803
> 8 28-2005 1622798 4835043
> 9 28-2005 1622299 4835129
>
> I'd like to select the row where id=25-2006
>
> I searched on the search of the R site but I did'nt find
> anything of simple.
> Can someone help me?
>
> Thank you very much
> Leonardo
>
> ______________________________________________
> R-help op 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.
>
More information about the R-help
mailing list