naaccr_record: Analysis-ready NAACCR records

View source: R/naaccr_record.R

naaccr_recordR Documentation

Analysis-ready NAACCR records

Description

Subclass of data.frame for doing analysis with NAACCR records.

Usage

naaccr_record(..., keep_unknown = FALSE, version = NULL, format = NULL)

Arguments

...

Arguments of the form tag = value, where tag is a valid NAACCR data item name and value is the vector of the item's values from the NAACCR format.

keep_unknown

Logical indicating whether values of "unknown" should be a level in the factor or NA.

version

An integer specifying the NAACCR format version for parsing the records. Use this or format, not both. If both version and format are NULL (default), the most recent NAACCR format will be used.

format

A record_format object for parsing the records.

Details

naaccr_record creates a data.frame of cancer incidence records ready for analysis: columns are of appropriate classes, coded values are replaced with factors, and unknowns are replaced with NA.

Value

A naaccr_record with columns named using the NAACCR XML scheme. It inherits from data.frame.


naaccr documentation built on Nov. 23, 2022, 5:06 p.m.