Thursday, July 31, 2014

Testing if an item exists in a list

To check if an item exists in a list in R, use %in%. This is handy for handling option lists inputs for a function.

"item" %in% list

No comments:

Post a Comment