Get data from SIPRI Military Expenditure (Milex) Database
Source:R/sipri_get_data.R
sipri_get_data.Rd
The sipri_get_data
function retrieves military expenditure data from the
SIPRI Milex database. It provides multiple indicators including constant USD,
current USD, share of GDP, and more. You can also join footnotes to the
results and enable caching for faster queries.
Arguments
- indicator
Character vector. The type of data to download. Must be one of: "constantUSD", "currentUSD", "shareOfGDP", "shareGovt", "regionalTotals", "currencyFY", "currencyCY", "perCapita", or "all". Default is "constantUSD".
- verbose
Logical. If TRUE, prints additional details about the query process. Default is FALSE.
- footnotes
Logical. If TRUE, joins footnotes to the result table. Default is FALSE.
- cache
Logical. If TRUE, caches the response and processed data to avoid re-querying. Default is TRUE.
Examples
if (FALSE) { # \dontrun{
# Retrieve military expenditure data in constant 2022 USD
milex_data <- sipri_get_data(indicator = "constantUSD",
verbose = TRUE,
footnotes = TRUE)
# Retrieve regional totals without caching
regional_totals <- sipri_get_data(indicator = "regionalTotals", cache = FALSE)
} # }