geography {acs} | R Documentation |
Return or replace geography metadata of an acs object.
Description
geography()
will return the geography of an acs
object, as a dataframe. Depending on the format of the data at import
(and possibly the values of geocols=
, if the object was created
with read.acs
), this may have multiple columns, but the number
of geographic rows should be the same as the number of rows of the acs
estimates and standard errors.
When used for assignment, geography<-
will change the values
contained in the metadata, replacing the existing dataframe with a new
one. To replace a single value or a limited subset, call with
subsetting (e.g., geography(object)[i,j]<-value
or
geography(object)[[i]]<-value
; note that the brackets should
occur outside the call – you are subsetting the dataframe, not
the object).
To help with replacement operations, the package provides a new
prompt
method, which can be used to interactively set new
values for geography (as well as other metadata); see
prompt.acs
.
Usage
geography(object)
geography(object)<-value
Arguments
object |
an acs object |
value |
a dataframe containing geographic metadata; must contain the same number of rows as the object |
Value
Returns (or replaces) a dataframe containing the geography
slot of an object.
Author(s)
Ezra Haber Glenn eglenn@mit.edu
See Also
prompt.acs
, a helper function to interactively generate
a new geography dataframe to be used for replacement.
Examples
data(lawrence10)
geography(lawrence10)
str(geography(lawrence10))