Your cart is currently empty
Independent economist, data scientist, and science popularizer
R packages:
To run the snippet, you need to load dplyr.
If you use the Tidyverse:
library(tidyverse)
Code language: R (r)If you do not use the Tidyverse:
library(dplyr)
Code language: R (r)To remove duplicate rows in a data frame, use distinct(). Duplicates are rows that are replicated at least twice.
If you use the pipe operator:
df <- df %>%
distinct()
Code language: R (r)
If you do not use the pipe operator:
df <- distinct(df)
Code language: R (r)