Created
March 30, 2016 16:18
-
-
Save ivan-krukov/ab7c7999007ebb98b86f83a1381463b0 to your computer and use it in GitHub Desktop.
Use dots instead of dollar signs in R
This file contains 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
# Use dots (.) instead of ($) | |
R_ify <- function(expr) eval(parse(text= | |
gsub("\\.","$",substitute(expr)))) | |
R_ify(mtcars.mpg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment