readCity {NMMAPSlite} | R Documentation |
Read/download weather, air pollution, and mortality data for a given city in the NMMAPS database
readCity(name, collapseAge = FALSE, asDataFrame = TRUE)
name |
character, abbreviated name of a city |
collapseAge |
logical, should age categories be collapsed? |
asDataFrame |
logical, should a data frame be returned? |
If asDataFrame
is FALSE
, then a list with two data
frames named "exposure" and "outcome" is returned. Otherwise, a
single data frame with all the data merged together is returned.
A data frame or a list with "exposure" and "outcome" data frames.
Roger D. Peng rpeng@jhsph.edu
## Not run: initDB() data <- readCity("akr") ## Read/download Akron, OH data data1 <- readCity("akr", collapseAge = TRUE) ## Read from cache nrow(data) nrow(data1) ## End(Not run)