-
-
Save trcook/f1464d301613bad4f639 to your computer and use it in GitHub Desktop.
Using data.table programatically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pass column as string into data.table programatically | |
tmp<-function(x="col"){ | |
x =eval(substitute(as.name(x))) | |
dt[is.na(eval(x))==F,eval(x)] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment