clean_times | R Documentation |
Convert Statfin time variable(s) to numeric or date
clean_times(
x,
time_format = NULL,
year_col = "Vuosi",
sub_year_col = NULL,
agg_time = NULL
)
x |
A data.frame. |
time_format |
"num" for numeric (default for yearly) and
"date" for |
year_col |
A column name for year |
sub_year_col |
A column name for quarter or mounth.
If |
agg_time |
sub_year_col might contain also aggregate values, like yearly sums. They are exluded based on order of factor level or occurence in data. Default is that nothing is exluded. |
A data.frame
public_debt2 <- clean_times(public_debt)
str(public_debt2)
str(clean_times(output_ind, time_format = "date"))
employment_q2 <- clean_times(x = employment_q, sub_year_col = "Ajanjakso", agg_time = "Vuosikeskiarvo")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.