How to apply the unique function to multiple columns in the R programming language. More details: https://statisticsglobe.com/apply-uni...
R code of this video:
data <- data.frame(x1 = c(1, 1, 1, 2, 2, 2), # Creating example data
x2 = c("a", "a", "b", "b", "b", "c"),
x3 = LETTERS[1:6])
data_unique <- unique(data[ , c("x1", "x2")]) # Apply unique
data_duplicated <- data[!duplicated(data[ , c("x1", "x2")]), ] # Apply duplicated
Follow me on Social Media:
Facebook: / statisticsglobecom
LinkedIn: / statisticsglobe
Patreon: / statisticsglobe
Pinterest: https://www.pinterest.de/JoachimSchork
Reddit: / joachimschork
Twitter: / joachimschork
On this page of the site you can watch the video online Apply Unique Function to Multiple Columns of Data Frame in R | Using unique & duplicated Functions with a duration of hours minute second in good quality, which was uploaded by the user Statistics Globe 20 April 2021, share the link with friends and acquaintances, this video has already been watched 3,150 times on youtube and it was liked by 32 viewers. Enjoy your viewing!