Delete duplicate cells in a row

Hello
How can I remove a duplicate cell in row

name name2
A1 NA
A2 NA
A3 A3
A4 NA
A5 NA
A6 NA
A7 NA
A8 NA
df$name1 <- ifelse(identical(df$name, df$name1), NA, df$name1)

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.