Remove Duplicate Elements from an Object in R Programming - unique() Function
unique() function in R Language is used to remove duplicated elements/rows from a vector, data frame or array. Syntax: unique(x) Parameters: x: vector, data frame, array or NULL Example 1: Python3 # R program to illustrate # unique function # Initializing some set of numbers x <- c(1:10, 5:9) x #