View source: R/eurotime2date.R
eurotime2date2 | R Documentation |
Date conversion from Eurostat time format. A function to
convert Eurostat time values to objects of class Date()
representing calendar dates.
eurotime2date2(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: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # 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}, # }
lubridate::ymd()
Other helpers:
cut_to_classes()
,
dic_order()
,
eurotime2date()
,
eurotime2num2()
,
eurotime2num()
,
harmonize_country_code()
,
label_eurostat2()
,
label_eurostat()
na_q <- get_eurostat("namq_10_pc", time_format = "raw") na_q$time <- eurotime2date(x = na_q$time) unique(na_q$time) ## Not run: # Test for weekly data get_eurostat( id = "lfsi_abs_w", select_time = c("W"), time_format = "date", legacy_bulk_download = FALSE ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.