Description Usage Arguments Value Examples
View source: R/aggregate_for_variable_by_region.R
Aggregates data for a variable and the 7 regions/case studies of the ENTRANCES data set. The name of the aggregated value is derived from the name of the list object, the variable name and the level of the NUTS_units.
1 2 3 4 5 6 | aggregate_for_variable_by_region(
VarName,
group_by = "sum",
data = EntrancesData,
NUTS_level = "NUTS3"
)
|
VarName |
character string with the name of the variable. |
group_by |
"sum", "mean" or "median", indicates whether aggregation should work by using the sum, the mean or the median of the data. |
data |
dataframe, from which you want to extract your data. Default is the EntrancesData dataset |
NUTS_level |
indicates, if the nuts_ids shall be filtered on a specific NUTS level (NUTS3, NUTS2, NUTS1, NUTS country). Default is all. |
dataframe
1 2 3 4 | #Define a list of a variable and the type of aggregation (sum, mean or median)to get a data frame with the aggregated values for each region (Entrances case studies) and each year.
#Additionally you can define a NUTS level for the aggregation (NUTS3, NUTS2, NUTS1, NUTS country). Default is "NUTS3".
#You can define a data frame, if you don't want to use the EntrancesData data set from the package.
aggregate_for_variable_by_region(VarName="GDP_EUR", group_by="sum", data=EntrancesData, NUTS_level="all")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.