country_ranking {convergEU} | R Documentation |
Ranking of EU countries by time
Description
Countries are ranked for each time according to two types of indicators: higher is the best (highBest) or lower is the best (lowBest).
Usage
country_ranking(
myTB,
timeName = "time",
time_0 = NA,
time_t = NA,
typeInd = "highBest"
)
Arguments
myTB |
the dataframe time by countries (complete and sorted by increasing time). |
timeName |
the name of the variable that contains time information. |
time_0 |
starting time to consider; if NA all times considered. |
time_t |
last time to consider; if NA all times considered. |
typeInd |
"highBest" is the default, "lowBest" is the alternative |
Value
a list with component res which contains ranking by each considered year
References
Examples
# Example 1
# Sorted dataframe in the format years by countries:
require(tibble)
myTB <- tibble::tribble(
~years, ~UK, ~DE, ~IT,
1988, 1201, 868, 578,
1989, 1150, 978, 682,
1990, 998, 1250, 332,
1991, 1600, 1350, 802
)
# Country ranking according to the indicator higher is the best:
res <- country_ranking(myTB,timeName="years")
# Country ranking according to the indicator lower is the best:
res1 <- country_ranking(myTB,timeName="years", typeInd="lowBest")
# Country ranking for some years only:
myres <- country_ranking(myTB,timeName="years", time_0=1989,time_t=1990,typeInd="lowBest" )
# Example 2
# Ranking of the Member States for the "emp_20_64_MS" dataset
data(emp_20_64_MS)
myCR<-country_ranking(emp_20_64_MS,timeName = "time", time_0 = 2007, time_t = 2010)
# Visualize the results for the first five countries:
myCR$res[1:6]
[Package convergEU version 0.7.3.2 Index]