# Example 1
# A dataset in the format time by countries:
require(tibble)
testTB <- dplyr::tribble(
~time, ~countryA , ~countryB, ~countryC,
2000, 0.8, 2.7, 3.9,
2001, 1.2, 3.2, 4.2,
2002, 0.9, 2.9, 4.1,
2003, 1.3, 2.9, 4.0,
2004, 1.2, 3.1, 4.1,
2005, 1.2, 3.0, 4.0
)
res <- demea_change(testTB,
timeName="time",
time_0 = 2000,
time_t = 2005,
sele_countries= NA,
doplot=TRUE)
# \donttest{
plot(res$res$res_graph)
# }
# Example 2
# Deviations from the mean for the emp_20_64_MS Eurofound dataset
data(emp_20_64_MS)
# Calculate deviations from the mean from 2013 to 2016 for Italy, France and Germany
res1<-demea_change(emp_20_64_MS,
timeName="time",
time_0 = 2013,
time_t = 2016,
sele_countries= c('IT','FR','DE'),
doplot=TRUE)
# \donttest{
plot(res1$res$res_graph)
# }
Run the code above in your browser using DataLab