View source: R/eurotime2date.R
eurotime2date | R Documentation |
Date conversion from Eurostat time format. A function to
convert Eurostat time values to objects of class Date()
representing calendar dates.
eurotime2date(x, last = FALSE)
x |
a charter string with time information in Eurostat time format. |
last |
a logical. If |
Available patterns are YYYY (year), YYYY-SN (semester), YYYY-QN (quarter), YYYY-MM (month), YYYY-WNN (week) and YYYY-MM-DD (day).
an object of class Date()
.
Janne Huovari janne.huovari@ptt.fi
See citation("eurostat")
:
# Kindly cite the eurostat R package as follows: # # Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and # analysis of Eurostat open data with the eurostat package. The R # Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 # # A BibTeX entry for LaTeX users is # # @Article{10.32614/RJ-2017-019, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # } # # Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., # and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data # [Computer software]. R package version 4.0.0. # https://github.com/rOpenGov/eurostat # # A BibTeX entry for LaTeX users is # # @Misc{eurostat, # title = {eurostat: Tools for Eurostat Open Data}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, # url = {https://github.com/rOpenGov/eurostat}, # type = {Computer software}, # year = {2023}, # note = {R package version 4.0.0}, # }
lubridate::ymd()
Other helpers:
cut_to_classes()
,
dic_order()
,
eurotime2num()
,
harmonize_country_code()
,
label_eurostat()
na_q <- get_eurostat("namq_10_pc", time_format = "raw")
na_q$TIME_PERIOD <- eurotime2date(x = na_q$TIME_PERIOD)
unique(na_q$TIME_PERIOD)
## Not run:
# Test for weekly data
get_eurostat(
id = "lfsi_abs_w",
select_time = c("W"),
time_format = "date"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.