guess_span_for_dimension | R Documentation |
guess_span_from_start
takes a
vector of “_start
” values as first argument;
guess_span_for_dimension_for_df
is a convenience wrapper
that takes a data frame with such a column instead.
guess_span_from_start(x, span_name = character()) guess_span_for_dimension_for_df(x, dimension = get_all_dimensions_w_spans())
x |
Vector of “start” values (e.g., the
|
dimension |
A single demographic dimension with a “span” (e.g., “age”, “time”). |
Certain demographic dimensions, such as “time” and
“age” have associated spans. These should ordinarily be
supplied by the user when calling, e.g.,
demog_change_component_df
, but a very simple guess
will be attempted if not. Generally, the smallest difference
between successive values in the corresponding
“_start
” column will be returned. However, if there
is only one unique “_start
” value, all 1
will
be returned and a warning issued.
Guessed span.
Mark Wheldon
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.