David and Sarah,
Both suggestions work beautifully. Thanks!
Bonnie

> CC: r-help@r-project.org
> From: dwinsem...@comcast.net
> To: bby2...@columbia.edu
> Subject: Re: [R] how to find unique pairs of variables?
> Date: Thu, 15 Sep 2011 12:41:03 -0400
> 
> 
> On Sep 15, 2011, at 12:27 PM, bby2...@columbia.edu wrote:
> 
> > I have two variables, both numerical. I would like to find the  
> > unique values of the pairs, in other words, unique coordinates if I  
> > were to plot them.
> >
> > I also need to know how many pairs there are, but I guess I can use  
> > length() if I can somehow isolate the unique pairs first?
> 
> ?duplicated
> 
> dfrm[ !duplicated(dfrm), ]
> 
> # Would give the unique pairs.
> 
> -- 
> David Winsemius, MD
> West Hartford, CT
> 
                                          
        [[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.

Reply via email to