knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
opensky provides functions to include templates for xaringan slides, ggplot2 helpers, and R Markdown documents.
You can install the latest version of opensky with:
options(repos = c( emptyfieldds = "https://emptyfield-ds.r-universe.dev", CRAN = "https://cran.rstudio.com/" )) install.packages("opensky")
This is a basic example which shows you how to solve a common problem:
library(opensky) proj_dir <- fs::file_temp() fs::dir_create(proj_dir) usethis::proj_set(proj_dir, force = TRUE) # create and open kakashi-themed xaringan slides use_xaringan_kakashi("slides") # create and open tozan-themed xaringan slides use_xaringan_tozan("slides2") # create and open a blank R Markdown template with reasonable chunk defaults use_blank_rmd("slides3") # create `ggplot2-utils.R` use_ggplot2_utils()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.