| ageMinMax {dembase} | R Documentation |
Extract minimum or maximum ages from the dimscales of an object.
If the age dimension uses dimscale "Intervals", then the
replacement version of minAge can be used to change the lower limit
of the first age group, and the replacement version of maxAge can be
used to change upper limit of the last age group.
ageMax(object) ageMax(object) <- value ageMin(object) ageMin(object) <- value setAgeMax(object, value) setAgeMin(object, value) ## S4 method for signature 'DemographicArray' ageMax(object) ## S4 replacement method for signature 'DemographicArray' ageMax(object) <- value ## S4 method for signature 'DemographicArray' ageMin(object) ## S4 replacement method for signature 'DemographicArray' ageMin(object) <- value ## S4 method for signature 'DemographicArray' setAgeMax(object, value) ## S4 method for signature 'DemographicArray' setAgeMin(object, value) ## S4 method for signature 'MetaData' ageMax(object) ## S4 replacement method for signature 'MetaData' ageMax(object) <- value ## S4 method for signature 'MetaData' ageMin(object) ## S4 replacement method for signature 'MetaData' ageMin(object) <- value ## S4 method for signature 'MetaData' setAgeMax(object, value) ## S4 method for signature 'MetaData' setAgeMin(object, value)
object |
An object of class |
value |
A number. Can be |
Functions setAgeMin and sexAgeMax do the same thing as the
replacement functions, but work with pipes.
The extraction functions return numbers. The replacement
functions, setAgeMin, and setAgeMax return a modified
version of object.
ageTimeStep and hasRegularAgeTime also
provide information about age groups. Pipes are described in package
magrittr.
library(demdata) death.rates <- Values(VADeaths2) death.rates ageMin(death.rates) ageMax(death.rates) ageMin(death.rates) <- 45 death.rates ageMax(death.rates) <- Inf death.rates setAgeMin(death.rates, value = 50) setAgeMax(death.rates, value = 75)