Skip to content

Instantly share code, notes, and snippets.

@cutterkom
Created December 9, 2020 08:46
Show Gist options
  • Save cutterkom/2780e2317f1ccf798336e77a9d1354e8 to your computer and use it in GitHub Desktop.
Save cutterkom/2780e2317f1ccf798336e77a9d1354e8 to your computer and use it in GitHub Desktop.
get column stored as variable in R, alternative zu eval()
# get column stored as variable
# alternative to eval()
column <- "name"
df %>% filter(get(column)==1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment