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
Watch video Apply Unique Function to Multiple Columns of Data Frame in R | Using unique & duplicated Functions online, duration hours minute second in high quality that is uploaded to the channel Statistics Globe 20 April 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 3,150 times and liked it 32 visitors.