Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

growthcharts/chartbox

Open more actions menu

Repository files navigation

chartbox

R-CMD-check R-CMD-check

The chartbox package stores empty Dutch growth charts. With the package you can

  • list the available growth charts;
  • set the color palette;
  • load one of the growth charts for further processing.

Installation

The following statements will install the chartbox package

install.packages("remotes")
remotes::install_github("growthcharts/chartbox")

Example

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()
#> quartz_off_screen 
#>                 2

# restore palette
palette(old_pal)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.