Is this what you want:
data <- data.frame(x=sample(letters[1:2], 15, rep=T),
y=sample(LETTERS[1:2], 15, rep=T), z=1:15)
data
data[duplicated(data[,1:2]),]
I hope this helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Doctoral Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
----- Original Message -----
From: "john walter" <jfwalter@vims.edu>
To: <s-news@lists.biostat.wustl.edu>
Sent: Friday, June 11, 2004 5:27 PM
Subject: [S] identify duplicate points
>
> >
> I need to identify duplicate XY pairs of points from an XYZ data
set. Does
> anyone know of an SPLUS function to do this. I have an R function
> (dup.coords) in the GeoR package but it does not work with SPLUS.
>
> Thank you.
>
> John
>
>
>
>
>
> John Walter
> Virginia Institute of Marine Science
> P.O. Box 1346
> Gloucester Point, VA 23062
> (804) 684-7316
> jfwalter@vims.edu
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu
with
> the BODY of the message: unsubscribe s-news
|