Snippets of Code
Scrapbook of useful code snippets I found while working on projects.
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment