setdiff Function in R (Example) | Identify Different Values of Vectors | Data Comparison in RStudio

preview_player
Показать описание
R code:

##### Example data
x <- c(1, 5, 3, 1, 2, 9) # Example vector 1
y <- c(7, 6, 8, 9, 5, 5, 5, 3) # Example vector 2

##### Example 1
setdiff(x, y) # Apply setdiff function in R

##### Example 2
setdiff(y, x) # Opposite ordering of X and Y
Рекомендации по теме
welcome to shbcf.ru