| zoo_name_clean | R Documentation |
Combines utils_clean_names() and zoo_name_set() to help clean, abbreviate, capitalize, and add a suffix or a prefix to the name of a zoo object.
zoo_name_clean(
x = NULL,
lowercase = FALSE,
separator = "_",
capitalize_first = FALSE,
capitalize_all = FALSE,
length = NULL,
suffix = NULL,
prefix = NULL
)
x |
(required, zoo object) Zoo time series to analyze. Default: NULL. |
lowercase |
(optional, logical) If TRUE, all names are coerced to lowercase. Default: FALSE |
separator |
(optional, character string) Separator when replacing spaces and dots. Also used to separate |
capitalize_first |
(optional, logical) Indicates whether to capitalize the first letter of each name Default: FALSE. |
capitalize_all |
(optional, logical) Indicates whether to capitalize all letters of each name Default: FALSE. |
length |
(optional, integer) Minimum length of abbreviated names. Names are abbreviated via |
suffix |
(optional, character string) Suffix for the clean names. Default: NULL. |
prefix |
(optional, character string) Prefix for the clean names. Default: NULL. |
zoo time series
Other zoo_functions:
zoo_aggregate(),
zoo_name_get(),
zoo_name_set(),
zoo_permute(),
zoo_plot(),
zoo_resample(),
zoo_smooth_exponential(),
zoo_smooth_window(),
zoo_time(),
zoo_to_tsl(),
zoo_vector_to_matrix()
#simulate zoo time series
x <- zoo_simulate()
#get current name
zoo_name_get(x = x)
#change name
x <- zoo_name_set(
x = x,
name = "My.New.name"
)
zoo_name_get(x = x)
#clean name
x <- zoo_name_clean(
x = x,
lowercase = TRUE
)
zoo_name_get(x = x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.