r - Getting the name of a data frame -
i writing wrapper function plotting several info frames:
gf <- function(dataframe){ ggplot(dataframe, aes(x=date, y=close)) + geom_point() + ggtitle(nameofdataframe)) and cannot figure out lastly part, how name of info frame variable utilize in ggtitle(). please help.
this it:
ggtitle(deparse(substitute(dataframe))) deparse() converts variable name character string, substitute() lets utilize in plot.
r
No comments:
Post a Comment