pin_extractors: Extract data from PIN

Description Usage Arguments Functions

Description

Extract data from PIN

Usage

1
2
3
4
5
6
7
8
9
pin_extract(data, pin, into = c("dob", "sex"), remove = FALSE, ...)

pin_dob(x)

pin_century(x)

pin_sex(x, factor = TRUE, language = c("english", "finnish"))

pin_ordinal(x)

Arguments

data

A data frame with a PIN column.

pin

The name of the column cotaining PINs. Can be a bare name or a string. Uses 'tidyselect' semantics to pick the column from the data.

into

A character vector of length 2. Gives the names of the new columns that date of birth and sex are extracted into.

remove

Logical. Should the original PIN column be removed?

...

Additional arguments passed to 'pin_sex'.

x

Character vector of PINs.

factor

Logical. Should the return value be a factor?

language

Character scalar. Language to use for factor labels if factor = TRUE. Currently either english or finnish.

Functions


fbc-studies/pinr documentation built on May 17, 2019, 7:35 p.m.