SGR Data

The following are the datasets used in A Survivor’s Guide to R. Right click on a link to download or cut and paste the provided code to use directly in R.

Chapter 2 Data


myData = read.delim("http://www.kktg.net/R/Chapter2Data.txt", 
  header = TRUE,                       # Data has headers for var names
  colClasses = c("character",          # Set storage modes of variables
    "numeric", "numeric", "numeric",   # This is just a convenience and  
    "numeric", "factor", "numeric"))   #   could be adjusted afterwards

 

Ozymandias Data (Chapter 8)


myTxt = readLines("http://www.kktg.net/R/ozymandias.txt") 

 

Chapter 12 Data


myData = read.delim(file = "http://www.kktg.net/R/Chapter12Data.txt",
  colClasses = c("character", "numeric", "numeric", "numeric"), header = T)

 

California KML File (Chapter 15)


CAshape = read.csv(
  file = "http://www.kktg.net/R/calif-coords.csv", header = FALSE)

 

Appendix B Data


myData = read.delim("http://www.kktg.net/R/Appendix2Data.txt",
  colClasses =                         # Set column storage modes
    c("character", rep(NA, 8)),        #   1st col char, let R choose rest 
  header = TRUE,                       # Use column headers for variable names
  row.names = 1)                       # Use first column for obs names