Plotting SEER data using R

The first step to analyzing SEER data is to obtain it by signing and faxing back the agreement form, see; the text files of CD2 should be installed into the directory c:\SEER02 for the April 2005 release, e.g. large *.txt files should exist in C:\SEER02\yr1973_2002.seer9. The scripts below should then be cut-and-pasted into the R command line.

R script use
mkStx.R This R code converts large (fixed-width formatted) SEER *.txt files into tab-delimited smaller *.stx files which contain only the fields of interest. This takes about an hour to run, but you only have to do it once, assuming you set the script up to include all fields of interest to you.
mkSEERbinaryDFs.R This R code converts *.stx files into binary R files which contain one dataframe called DF of the fields in the stx files.
mkPops.R This makes a binary R file of the population numbers that are used in the denominator of incidence calculations.
viewSurvivalAll.R This R script reads the binary files and plots patient survival times as a function of age at diagnosis.
viewSurvivalbyDecade.R This R script focuses on the survival of 60-65 year olds and plots changes over the last three decades.
ViewIncidAll.R This script plots incidence versus age. Here and above, click on plots to advance through the cancers.

These R scripts can be downloaded as one zip.