currency.year: Return (or change) currency.year value from the metadata of...

Description Usage Arguments Details Value Author(s) See Also

Description

Standard accessor/replacement method for metadata contained within S4 acs-class objects.

Usage

1
2
3
currency.year(object)

currency.year(object)<-value

Arguments

object

an acs object

value

an integer value to be used in replacement

Details

currency.year will return the (integer) value of the dollar-year of object.

Assigning a new value to currency.year (through currency.year(object)<-value or currency.year(object)=value) will change the value of currency.year in the object's metadata and also modify all dollar values of the object (as determined by acs.units(object)=="dollars") to be in the dollars of the desired new year.

A related function, currency.convert provides a helper function to create a new copy of an acs-class object with a modified currency.year and converted dollar values without altering the original object. When rate="auto" (the default), currency.convert will look up values from the cpi database to use in conversion. When a numeric rate is provided through this option, actual cpi values are ignored. When verbose=TRUE, currency.convert will provide additional information about the rates of conversion and the acs.colnames converted.

As of version 2.0 the package includes CPI data from 1913 through 2015, allowing conversion of dollar values for any years in this range.

Value

Returns (or replaces) an integer value from the "currency.year" slot of an object.

Author(s)

Ezra Haber Glenn [email protected]

See Also

cpi

currency.convert

acs-class


nealrichardson/acs documentation built on May 23, 2019, 1:30 p.m.