An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111031/fe8c1a9b/attachment.pl>
how to remove the redundant rows of a matrix
2 messages · yan liu, R. Michael Weylandt
Your data didn't come through with the html stripping but either unique() or duplicated() should get you where you need to be. Michael
On Mon, Oct 31, 2011 at 12:25 PM, yan liu <yanliusun at gmail.com> wrote:
Hi, I have a matrix like this, two columns: a, b ?a b ?c1 21 ?c2 19 ?c2 20 ?c2 20 ?c4 25 ?c5 18 ?c5 18 how to prepare a new matrix removing the rows with repeated units in b columns, like there are two 20 and two 18 in b column (others are unique in b col). ?I wanna a pure matrix with one 20 and one 18. Thanks a lot! Yan ? ? ? ?[[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.