readCity {NMMAPSlite}R Documentation

Read data for a city

Description

Read/download weather, air pollution, and mortality data for a given city in the NMMAPS database

Usage

readCity(name, collapseAge = FALSE, asDataFrame = TRUE)

Arguments

name character, abbreviated name of a city
collapseAge logical, should age categories be collapsed?
asDataFrame logical, should a data frame be returned?

Details

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.

Value

A data frame or a list with "exposure" and "outcome" data frames.

Author(s)

Roger D. Peng rpeng@jhsph.edu

Examples

## 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)

[Package NMMAPSlite version 0.3-1 Index]