add_script_to_rmd {esmtools} | R Documentation |
Add Custom CSS and JavaScript to R Markdown Document
Description
This function adds custom CSS and JavaScript code to an R Markdown document. The function reads CSS and JavaScript code from specific files (e.g., 'button.css' and 'button.js') located in the "esmtools" package. It then creates appropriate HTML elements to include the code within the R Markdown document. This function is automatically called when importing the esmtools package and rendering the rmarkdown package.
Usage
add_script_to_rmd()
Value
Returns an text object marked as HTML containing the combined CSS and JavaScript code stored within the inst folder of the package.
Examples
if (interactive()) {
add_script_to_rmd()
}
[Package esmtools version 1.0.1 Index]