I am trying check duplicates in data frame but while check its just showing duplicate for second and third and so on text but it should show all records which are duplicate.
do we have any other solution or am i missing something else...??
actually it should show all data not filtered duplicate data not just 3 record . i just wanted to mutate data frame with new column and this column will show Duplicate values .
That out required was just example.
Also one more thing if i want to apply this for more 2-3 columns then ....??
If you get that error when you run exactly my reprex then check your dplyr version, you might be lagging. Otherwise, please make a reprex so that your error is reproducible for me.
This is working fine , how can I change TRUE and FALSE values to "Duplicate" across Variables
I tried like this but this is changing dataframe
colss = c("emp_id")
df4 <- df4%>% mutate(
across(.cols= colss,
.fns = duplicated,
.names = "{c(1)}. unique {col}")) %>%
mutate("1. unique emp_id" == "TRUE","Duplicate","")