Function to retrieve customized U.S. troop deployment data
Source:R/get_troopdata.R
get_troopdata.Rd
get_troopdata()
generates a customized data frame containing country-year observations of U.S. military deployments overseas.
Usage
get_troopdata(
host = NULL,
branch = FALSE,
startyear = 1950,
endyear = 2024,
quarters = FALSE,
guard_reserve = FALSE,
civilians = FALSE,
reports = FALSE
)
Arguments
- host
The Correlates of War (COW) numeric country code, ISO3C code, or country name, for the host country or countries in the series. If region == TRUE the user can specify a COW region name and the function will try to match it to the region column in the data. The default is NA.
- branch
Logical. Should the function return a single vector containing total troop values or multiple vectors containing total values and values for individual branches? Default is FALSE.
- startyear
The first year for the series. The default is set to 1950.
- endyear
The last year for the series. The default is the maximum year in the currently published data.
- quarters
Logical. Should the function return quarterly data? Default is FALSE.
- guard_reserve
Logical. Should the function return values for the National Guard and Reserve? Default is FALSE.
- civilians
Logical. Should the function return values for civilian DoD personnel? Default is FALSE.
- reports
Logical. Should the function return reports for the specified countries and years? Default is FALSE.
Value
get_troopdata()
returns a data frame containing country-year observations for U.S. troop deployments.