check_country: Check a dataset (tibble) for the presence of countries

View source: R/check_country.R

check_countryR Documentation

Check a dataset (tibble) for the presence of countries

Description

A given list of countries is contained into a dataset (tibble). If not, an object signaling this error is returned.

Usage

check_country(myTB, clusterCode = "EU27")

Arguments

myTB

dataset (tibble) to be checked

clusterCode

string to denote which countries should be in the dataset

Value

TRUE if they are inside, FALSE otherwise

References

https://unimi2013-my.sharepoint.com/:u:/g/personal/federico_stefanini_unimi_it/EW0cVSIgbtZAvLPNbqcxdX8Bfn5VGSRHfAH88hQwc_RIEQ?e=MgtSZu

Examples


# Check the dataset "emp_20_64_MS" for the presence of countries in cluster EU27:
check_country(emp_20_64_MS, clusterCode="EU27")

# Check absence for EU27:
check_country(emp_20_64_MS[,-(6:8)], clusterCode="EU27")

# Check the dataset "emp_20_64_MS" for the presence of countries in cluster EU25:
check_country(emp_20_64_MS, clusterCode="EU25")

# Check the dataset "emp_20_64_MS" for the presence of countries in cluster EU12:
check_country(emp_20_64_MS, clusterCode="EU12")


convergEU documentation built on March 7, 2023, 7:22 p.m.