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)

Arguments

x

a charter string with time information in Eurostat time format.

last

a logical. If FALsE (default) the date is the first date of the period (month, quarter or year). If TRUE the date is the last date of the period.

Value

an object of class Date.

References

See citation("eurostat").

Author

Janne Huovari janne.huovari@ptt.fi

Examples

if (FALSE) { na_q <- get_eurostat("namq_10_pc", time_format = "raw") na_q$time <- eurotime2date(x = na_q$time) un <- get_eurostat("une_rt_m", time_format = "raw") un$time <- eurotime2date(x = un$time) na_a <- get_eurostat("nama_10_pc", time_format = "raw") na_a$time <- eurotime2date(x = na_a$time) eur_d <- get_eurostat("ert_bil_eur_d", time_format = "raw") eur_d$time <- eurotime2date(x = eur_d$time) }