powered by
Uses JavaScript notation to interpolate R variables into a string intended to be interpreted as JS.
glue_js(..., .open = "${", .envir = parent.frame())
character vectors as the JavaScript source code (all arguments will be pasted into one character string)
character, opening delimiter used by glue::glue()
character
glue::glue()
environment, tells glue::glue() where to find the variables to be interpolated
environment
glue::glue() object
This is a wrapper to glue::glue(), but it uses the notation used by JavaScript's template-literals, ${}.
${}
# NOT RUN { x <- 123 glue_js("function(){return(${x});}") %>% print() # }
Run the code above in your browser using DataLab