# Drop rows when containing duplicate in variable library(dplyr) df <- df %>% distinct(<your_variable>, .keep_all = TRUE)