Description Usage Arguments Examples
Group trade flows by the given geographical aggregation level (region or subregion) and extract the median prices. Prices depend on the quantity unit. For some products quantity unit changes from litre to m3 along the years.
Takes a data frame of tradeflows as input.
1 2 3 4 5 6 | extractprices(dtf, grouping = c("flow", "regionreporter", "year",
"unit"), lowercoef = 0.5, uppercoef = 2, lowerquantile = 0.25,
upperquantile = 0.75, includeqestimates = TRUE)
extractpricew(dtf, lowercoef = 1, uppercoef = 1, grouping = c("flow",
"regionreporter", "year", "unit"))
|
dtf |
a dataframe containing all trade flows for one product and their individual prices |
grouping |
a character vector specifying the grouping variables |
lowercoef |
numeric multiplier of the first quartile to obtain a lower bound on prices |
uppercoef |
numeric multiplier of the third quartile to obtain an upper bound on prices |
includeqestimates |
logical TRUE when comtrade quantity estimates can be included |
1 2 3 4 5 6 7 | ## Not run:
# tf a data frame of trade flows
price <- tf %>% extractprices()
priceglobal <- tf %>%
extractprices(grouping = c("flow", "year", "unit"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.