make_agegrid: Creates an age grid according to a specified format

View source: R/make_agegrid.R

make_agegridR Documentation

Creates an age grid according to a specified format

Description

Creates an age grid according to a specified format

Usage

make_agegrid(
  grid = c("compact", "classic", "extensive", "0-104w", "0-24m", "0-21y"),
  unit = c("year", "month", "week", "day"),
  dec = 4L
)

Arguments

grid

A character string specifying one of the following: "compact", "classic", "extensive", "0-104w", "0-24m" and "0-21y". The default produces an age grid between 0 and 21 years with 95 points.

unit

Character string specifying the time unit. Choices are "year", "month", "week" and "day".

dec

Number of decimals for the result.

Value

Numeric vector or NULL

Author(s)

Stef van Buuren, 2021

Examples

head(make_agegrid("classic"))

growthcharts/centile documentation built on May 8, 2024, 9:25 a.m.