non_zero_fert_ages | R Documentation |
These functions extract specific components (attributes, factor
levels, values, etc.) from objects inheriting from
demog_change_component_df
s. They return the
“levels” of the component, not the whole column from
the data frame. If the whole column is required use the usual
subsetting functions such as base::[
. See
“Extracting and replacing values” for the operation of
values
and values<-
, which are a bit different.
non_zero_fert_ages(x) ## S3 method for class 'fert_rate_age_f' non_zero_fert_ages(x) non_zero_fert_ages(x, ...) <- value ## S3 replacement method for class 'fert_rate_age_f' non_zero_fert_ages(x, ...) <- value values(x) ## S3 method for class 'demog_change_component_df' values(x) values(x) <- value ## S3 replacement method for class 'demog_change_component_df' values(x) <- value ages(x) ## S3 method for class 'demog_change_component_df' ages(x) times(x) ## S3 method for class 'demog_change_component_df' times(x) sexes(x) ## S3 method for class 'demog_change_component_df' sexes(x) indicators(x) ## S3 method for class 'demog_change_component_df' indicators(x) value_type(x) ## S3 method for class 'demog_change_component_df' value_type(x) value_type(x, ...) <- value ## S3 replacement method for class 'demog_change_component_df' value_type(x, ...) <- value age_span(x) ## S3 method for class 'ccmpp_input_df' age_span(x) ## S3 method for class 'ccmpp_output_df' age_span(x) time_span(x) ## S3 method for class 'ccmpp_input_df' time_span(x) ## S3 method for class 'ccmpp_output_df' time_span(x) ## S3 method for class 'pop_count_age_sex_reference' time_span(x) ## S3 replacement method for class 'ccmpp_input_df' value_type(x, ...) <- value ## S3 replacement method for class 'ccmpp_output_df' value_type(x, ...) <- value ## S3 method for class 'ccmpp_input_df_value_scale' print(x, ...)
x |
An object from which to extract attributes. |
The “levels” of the extracted component
(except possibly for values
; see “Details”).
If value_type(x)
is not "categorical"
then value(x)
will return x$value
as it is assumed
all are unique. The replacement function values<-
replaces
the "value"
column, using the usual recycling rules (see
data.frame
), and attempts to return an object the
same class as x
. If the replacement renders the object
invalid as a member of the class an error will be signaled.
Mark Wheldon
Other extract_attributes:
extract_ccmpp_input_list_attributes
,
value_scale()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.