I have a DF
. One of its columns looks like
DF$A
A
a
a
a
b
b
b
c
c
I am trying to replace all duplicated characters in this column with NA
.
Naively, I tried
DF$A <- DFl[duplicated(DF$A),] <- NA
But it just converts whole DF to NA
values. Thank you for any suggestion.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…