Learn R Programming

UScancer (version 0.1-2)

readSEER: Read SEER cancer data (ASCII)

Description

Reads an ASCII text version of SEER data for one or more given years, states and cancer sites. Data is freely available (after completing a signed SEER Research Data Agreement form) at http://seer.cancer.gov/data/access.html.

Usage

readSEER(file,year,state,cancer,site,fips)

Arguments

file
A vector of filenames specifying where to find the SEER data. For example, for respiratory cancers between 1973-2010, one could specify the following path from the default directory structure of SEER data "SEER_1973_2010_TEXTDATA/incidence/yr1973_20
year
A numeric vector specifying which years of the data to look at. If not specified, defaults to all years.
state
A character vector specifying which states to extract. Should be one or more of "Georgia", "California", "New Jersey", "Kentucky", "Louisiana", "Connecticut", "Michigan", "Hawaii", "Iowa", "New Mexico", "Utah", "Washington". If not specified, defaults to
cancer
A character vector specifying which cancers. This is passed to siteLookup to convert to a regular expression matching the proper site codes. Should be one or more of cancers from
site
A character vector of regular expressions to match cancer site codes on. This takes precidence over cancer. If neither are specified, then defaults to all cancers.
fips
A data.frame object with 5-digit FIPS codes as row numbers and two columns (state,county) with names of the state and county matching the FIPS code. A complete object is included in this package, see the

Value

  • Returns a data.frame of cancer cases with sex, age of diagnosis, year of diagnosis, site, state, county, and 5-digit state+county FIPS code. This format is compatible for use with the getSMR function from the diseasemapping package.

See Also

fipslookup

Examples

Run this code
data(fipslookup)

#file should point to the proper TXT file containing the cancer data you are interested in
seerData <- readSEER(file="RESPIR.TXT",year=2005,state="Kentucky",cancer="Larynx",fips=fipslookup)

Run the code above in your browser using DataLab