Re: [R] replace duplicates with 0

2014-03-13 Thread Jorge I Velez
Hi Catalin, The following should give you some ideas: set.seed(123) x <- rpois(50, 2) x idx <- duplicated(x) x[idx] <- 0 x Best, Jorge.- On Thu, Mar 13, 2014 at 11:35 PM, catalin roibu wrote: > Dear all! > > Is there a possibility to replace all duplicates values in data frame with > 0? > >

Re: [R] replace duplicates with 0

2014-03-13 Thread Pascal Oettli
Hello, Dis you at least search? ?duplicated Regards, Pascal On Thu, Mar 13, 2014 at 9:35 PM, catalin roibu wrote: > Dear all! > > Is there a possibility to replace all duplicates values in data frame with > 0? > > Thank you very much! > > > > -- > --- > Catalin-Constantin ROIBU > Lecturer PhD,

Re: [R] replace duplicates with 0

2014-03-13 Thread Rui Barradas
Hello, See ?duplicated Something like dat1[duplicated(dat1), ] <- 0 Hope this helps, Rui Barradas Em 13-03-2014 12:35, catalin roibu escreveu: Dear all! Is there a possibility to replace all duplicates values in data frame with 0? Thank you very much! _

[R] replace duplicates with 0

2014-03-13 Thread catalin roibu
Dear all! Is there a possibility to replace all duplicates values in data frame with 0? Thank you very much! -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str. Universitatii no. 13, Suceava, 720229, Romania office phone +4 0230 52 29 78, ext.