ext.birth_weekday: Birth Data Field Extender

Description Usage Arguments Details Value Examples

View source: R/field_extenders.R

Description

The births data set has numerous useful attributes that can be derived from the data that is included in the binary. However, because this data set is already very large, in the name of saving storage space for the package, and memory when loading this data set for analysis, only the bare minimum of information that is necessary to derive other useful columns is included.

Usage

1
2
3
4
5
6
7
ext.birth_weekday(births_data)

ext.birth_month(births_data)

ext.birth_year(births_data)

ext.birth_decade(births_data)

Arguments

births_data

this raw births data set, or a transformation of it (but be aware that any changes may alter the results of these calculations)

Details

As a convenience for accessing these columns, the package includes formulas to derive them. These formulas only take one argument, as they are not meant to be customized to any degree. One important thing to note is that these extensions will only work if you've created a copy of the births dataset. This is best done using the copy function on the births table.

Value

a data.table with the newly applied calculated field

Examples

1
2
3
dt = data.table::copy(births)
ext.birth_weekday(dt)
dt

Mikuana/vitalstatistics documentation built on May 7, 2019, 4:57 p.m.