[R] Identifying duplicate rows?

2012-09-10 Thread kborgmann
Hi, I am trying to identify duplicate values in a column in a date frame. The duplicated function identifies the duplicate rows in the data frame but it only does this for the second record, not both records. Is there a way to mark both rows in the data frame as TRUE?

Re: [R] Identifying duplicate rows?

2012-09-10 Thread jim holtman
try this: dfA$dups-duplicated(dfA$Value) | duplicated(dfA$Value, fromLast = TRUE) On Mon, Sep 10, 2012 at 2:23 PM, kborgmann borgm...@email.arizona.edu wrote: Hi, I am trying to identify duplicate values in a column in a date frame. The duplicated function identifies the duplicate rows in

Re: [R] Identifying duplicate rows?

2012-09-10 Thread Petr Savicky
On Mon, Sep 10, 2012 at 11:23:42AM -0700, kborgmann wrote: Hi, I am trying to identify duplicate values in a column in a date frame. The duplicated function identifies the duplicate rows in the data frame but it only does this for the second record, not both records. Is there a way to mark

Re: [R] Identifying duplicate rows?

2012-09-10 Thread Rui Barradas
Hello, Please use dput(dfA) to post your data examples. The following is it's output. All one has to do is to copy and paste to an R session to get the data example. dfA - structure(list(Site = c(929L, 929L, 930L, 930L, 931L, 932L), State = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = VA,

Re: [R] Identifying duplicate rows?

2012-09-10 Thread kborgmann
Thanks!! That did the trick!! -- View this message in context: http://r.789695.n4.nabble.com/Identifying-duplicate-rows-tp4642679p4642683.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list