if (interactive()) {
# For example, we use a temporary directory
path_to_www <- tempfile()
dir.create(path_to_www)
# In a Shiny app, you can use the www/ directory
# in Markdown, use a subfolder of your Rmd directory
setup_font(
id = "open-sans-condensed",
output_dir = path_to_www
)
# Clean up
unlink(path_to_www, recursive = TRUE)
}
Run the code above in your browser using DataLab