Hi

if you want to refer your data frame duplicated times then

table(your vector)

gives you unique names and number of occurrences. Then you can use the 
unique names for selection and values from table to replication.

Regards

Petr 
[EMAIL PROTECTED]

[EMAIL PROTECTED] napsal dne 11.04.2008 13:00:10:

> 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 <[EMAIL PROTECTED]> 
wrote:
> 
> > Hi
> >
> >
> > [EMAIL PROTECTED] 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@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@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.

______________________________________________
R-help@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.

Reply via email to