0 votes
in R Basics by

I want to know all the values in c(1, 4, 5, 9, 10) that are not in c(1, 5, 10, 11, 13). How do I do that with one built-in function in R? How could I do it if that function didn't exist?

1 Answer

0 votes
by

setdiff(c(1, 4, 5, 9, 10), c(1, 5, 10, 11, 13)) and c(1, 4, 5, 9, 10)[!c(1, 4, 5, 9, 10) %in% c(1, 5, 10, 11, 13).

Related questions

+1 vote
asked Oct 22, 2021 in Artificial Intelligence by DavidAnderson
0 votes
asked May 21, 2019 in Mathematics by sheetalkhandelwal
...