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?
>
>
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,
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!
_
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.
4 matches
Mail list logo