Re: [R] How to refer to rows using a vector of row names ?

From: Ng Stanley <stanleyngkl_at_gmail.com>
Date: Fri, 11 Apr 2008 19:00:10 +0800

I tried that, it will work well if the vector contain unique row names. However, my vector contain duplicate row names.

On Fri, Apr 11, 2008 at 6:53 PM, Petr PIKAL <petr.pikal_at_precheza.cz> wrote:

> Hi
>
>
> r-help-bounces@r-project.org napsal dne 11.04.2008 12:46:11:
>
> > Hi,
> >
> > How to refer to rows using a vector of row names ?
>
> Not sure what you mean but
>
> rownames(data.frame) %in% vector of row names
>
> shall give you numbers of rows, which you can use for subsetting
>
> Regards
> Petr
>
>
>
> >
> > Thanks
> > Stanley
> >
> > [[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<http://www.r-project.org/posting-guide.html>
> > and provide commented, minimal, self-contained, reproducible code.
>
>

        [[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. Received on Fri 11 Apr 2008 - 11:05:56 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 Apr 2008 - 12:30:27 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.

list of date sections of archive