This function JS()
marks character vectors with a special class, so
that it will be treated as literal JavaScript code. It was copied from the
htmlwidgets package, and does exactly the same thing.
JS(...)
... | character vectors as the JavaScript source code (all arguments will be pasted into one character string) |
---|
#> [1] "2"#> [1] "2"#> [1] 5