Remove duplicated rows

前端 未结 11 1788
清酒与你
清酒与你 2020-11-22 00:00

I have read a CSV file into an R data.frame. Some of the rows have the same element in one of the columns. I would like to remove rows that are duplicates in th

11条回答
  •  星月不相逢
    2020-11-22 00:36

    You can also use dplyr's distinct() function! It tends to be more efficient than alternative options, especially if you have loads of observations.

    distinct_data <- dplyr::distinct(yourdata)
    

提交回复
热议问题