Package 'cancerR'

Title: Classification of Cancer Using Administrative Data
Description: Classifies the type of cancer using routinely collected data commonly found in cancer registries from pathology reports. The package implements the International Classification of Diseases for Oncology, 3rd Edition site (topography), histology (morphology), and behaviour codes of neoplasms to classify cancer type <https://www.who.int/standards/classifications/other-classifications/international-classification-of-diseases-for-oncology>. Classification in children utilize the International Classification of Childhood Cancer by Steliarova-Foucher et al. (2005) <doi:10.1002/cncr.20910>. Adolescent and young adult cancer classification is based on Barr et al. (2020) <doi:10.1002/cncr.33041>.
Authors: Giancarlo Di Giuseppe [aut, cre, cph]
Maintainer: Giancarlo Di Giuseppe <[email protected]>
License: GPL (>= 2)
Version: 0.1.0
Built: 2025-02-16 06:31:54 UTC
Source: https://github.com/giancarlodigi/cancerr

Help Index


Adolescent and young adult cancer classification

Description

This function classifies the type of adolescent and young adult cancer cases based on the histology, site, and behaviour codes of the cancer. It uses the International Classification of Diseases for Oncology (ICD-O), 3rd edition codes to determine the classification. The function returns a value is based on the method specified and the depth level of the classification hierarchy to be determined.

Usage

aya_class(
  histology,
  site,
  behaviour,
  method = "Barr 2020",
  depth = 1,
  verbose = FALSE
)

Arguments

histology

Histology code of the cancer.

site

Site (aka topography) code of the cancer.

behaviour

Behaviour code of the cancer.

method

Method used for the diagnosis classification of the cancer. Default is "Barr 2020". Can be one of "Barr 2020", "SEER v2006", "SEER v2020", "SEER-WHO v2008".

depth

Depth level of the classification hierarchy to be determined. If set to 99, will return the SEER grouping.

verbose

Logical value to print messages to the console if unable to classify or duplicates found. Default is FALSE.

Value

Returns the diagnostic classification of the cancer based on the specified method and depth level.

Examples

# First position in the classification hierarchy
aya_class("9020", "C50.1", "3", method = "Barr 2020", depth = 1)

# Second position in the classification hierarchy
aya_class("9020", "C50.1", "3", method = "Barr 2020", depth = 2)

# Third position in the classification hierarchy
aya_class(9020, "C50.1", "3", method = "Barr 2020", depth = 3)

Classification of childhood cancer.

Description

Determines the type of childhood cancer cases based on the histology and site codes of the cancer. It uses the International Classification of Childhood Cancer (ICCC) codes to determine the classification. The function returns a value based on the method specified and the depth level of the classification hierarchy to be determined.

Usage

kid_class(histology, site, method = "iccc3", depth = 1, verbose = FALSE)

Arguments

histology

Histology code of the cancer.

site

Site (aka topography) code of the cancer.

method

Method to use for diagnosis classification. Default is "iccc3". Can be one of "iccc3", "who-iccc3", "iarc2017".

depth

Depth level of the classification hierarchy to be determined. If set to 99, will return the SEER grouping.

verbose

Logical value to print messages to the console if unable to classify or duplicates found. Default is FALSE.

Value

Returns the diagnostic classification of the childhood cancer based on the specified method and depth level.

Examples

kid_class("8522", "C50.1", method = "iccc3", depth = 1)

kid_class("8970", "C22.0", method = "iccc3", depth = 2)

Convert ICD-O-3 topography codes

Description

Converts ICD-O-3 topography codes in to a numeric format. It removes the "C" from the beginning of the string if present, and ensures that the codes are valid ICD-O-3 site codes.

Usage

site_convert(x, validate = TRUE)

Arguments

x

The ICD-O-3 site codes to be converted.

validate

Logical indicating whether to make the converted values have valid ICD-O-3 sites codes between C00.0 and C97.0, setting any invalid codes to NA. Default value is TRUE.

Details

Takes in a character or numeric vector of ICD-O-3 site codes and converts them to a standardized numeric format. The function will remove the "C" from the beginning of the string if present. It will also automatically detect if the codes have are in decimal ("C34.1") or integer ("C341") format and convert them.

If validate is set to TRUE, the function checks if the topography codes are valid ICD-O-3 site codes for neoplasms which range from C00.0 to C97.0. Any invalid codes will be set to NA and a warning will be issued indicating the number of invalid codes found.

Value

Returns a converted ICD-O-3 topography code in a numeric format.

Examples

# Character input with and without "C" at the beginning
site_convert(c("C80.1", "C34.1", "C50.3", "C424", "80.9"))

# Numeric input
site_convert(c(80.1, 8.1, 81, 708)) # Numeric input