knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The chartbox
package stores empty Dutch growth charts.
With the package you can
The following statements will install the chartbox
package
install.packages("remotes") remotes::install_github("growthcharts/chartbox")
The load_chart()
function makes the stored growth charts available
for further processing. Here's an example that writes chart PJAAN25
to a PDF file.
library(chartbox) # choose and load chart chartcode <- "PJAAN25" g <- load_chart(chartcode) # set the correct color palette pop <- chartcatalog::parse_chartcode(chartcode)$population old_pal <- palette(palettes[pop, ]) # create the pdf pdf(paste(chartcode, "pdf", sep = "."), height = 29.7/2.54, width = 21/2.54) grid::grid.draw(g) dev.off() # restore palette palette(old_pal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.