[18699] in s-news-athena
RE: [S] identical obervations
daemon@ATHENA.MIT.EDU (Venables, Bill (CMIS, Cleveland))
Thu Jul 22 00:31:03 1999
Message-Id: <D16979FB73F3D11195510000F8030FB90D0B6E@roper.qld.cmis.csiro.au>
From: "Venables, Bill (CMIS, Cleveland)" <Bill.Venables@cmis.CSIRO.AU>
To: "'Man S. Kwok'" <mankwok@phoenix.princeton.edu>, s-news@wubios.wustl.edu
Date: Thu, 22 Jul 1999 14:24:15 +1000
Mime-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
This is sometimes a useful idiom, but it's rather lazy. Suppose your data
frame is "dat"
newdat <- dat[!duplicated(do.call("paste", c(as.list(dat), list(sep =
"\t")))), ]
should remove all exactly repeated rows. In your case it will probably be
OK, but if you had really large numbers of variables you might like to think
again.
Bill Venables.
-----Original Message-----
From: Man S. Kwok [mailto:mankwok@phoenix.princeton.edu]
Sent: Wednesday, July 21, 1999 8:15 PM
To: s-news@wubios.wustl.edu
Subject: [S] identical obervations
Dear S users,
I have a data set of 6 varaibles and 2000 observations. I need to remove
repeated observations. Is there a quick way to locate exactly indentical
observations in S, without resorting to looping? Thanks in advance.
Best regards,
Man Kwok
**************************************
* Man Kwok
* * Graduate Student
* * mankwok@Princeton.EDU
* Dept. of Sociology
* Princeton University
* (609)497-0812
**************************************
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news