View source: R/nuts_test_multiple_versions.R
nuts_test_multiple_versions | R Documentation |
nuts_test_multiple_versions
is called from either nuts_convert_version
or nuts_aggregate
to selects the most frequent version within groups or throw an error.
nuts_test_multiple_versions(group_vars, multiple_versions, data_versions, data)
group_vars |
Variable name(s) for classification within groups. Always computes overlap within country. |
multiple_versions |
By default equal to |
data_versions |
Data versions |
data |
A nuts.classified object returned by |
A tibble containing NUTS codes, the potential number of rows dropped and a message with the results of the test.
library(dplyr)
df <- manure %>%
filter(nchar(geo) == 5) %>%
select(geo, indic_ag, values) %>%
distinct(geo, .keep_all = TRUE) %>%
nuts_classify(nuts_code = "geo",
group_vars = "indic_ag",
data = .)
nuts_test_multiple_versions(group_vars = "indic_ag",
multiple_versions = "most_frequent",
data_versions = df$versions_data,
data = df$data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.