[R] replace duplicates with 0

Rui Barradas ruipbarradas at sapo.pt
Thu Mar 13 13:47:11 CET 2014


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!
>
>
>




More information about the R-help mailing list