head(country)
# Regions within continents
table(country$georegion, country$continent)
# Select 'country' entries that have non-zero production
nonzero <- unique(production$country[production$value > 0])
country.nz <- country[country$country %in% nonzero,]
length(country.nz$country)
# Only 'country' and 'country_name' are always defined
cbind(sapply(country, function(x) all(x != "")))
# Plus 'ecoclass' and 'official' for non-zero production
cbind(sapply(country.nz, function(x) all(x != "")))
# Economic class levels
sort(unique(country$ecoclass))
# Examine individual countries
print.simple.list(country[country$iso2 == "IS",])
print.simple.list(country[country$country_name == "Samoa",])
Run the code above in your browser using DataLab