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 <catalinro...@gmail.com>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, Forestry engineer
> Forestry Faculty of Suceava
> Str. Universitatii no. 13, Suceava, 720229, Romania
> office phone     +4 0230 52 29 78, ext. 531
> mobile phone   +4 0745 53 18 01
>                        +4 0766 71 76 58
> FAX:                +4 0230 52 16 64
> silvic.usv.ro
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to