View source: R/define-mpi-specs.R
| define_mpi_specs | R Documentation |
Use to define MPI dimensions, indicators and its corresponding
weights using any of the supported file types: .xlsx (Excel),
.json, .csv, or .txt (TSV). You can also set the
poverty cutoff or list of poverty cutoffs.
define_mpi_specs(
mpi_specs_file = NULL,
indicators = NULL,
poverty_cutoffs = NULL,
unit_of_analysis = NULL,
uid = NULL,
source_of_data = NULL,
names_separator = getOption("mpindex.options")$names_separator %||% "__",
save_as_global_options = FALSE,
...
)
mpi_specs_file |
Path to a |
indicators |
A data frame of MPI indicators. Alternative to
|
poverty_cutoffs |
Single value or vector of poverty cutoffs (k).
All values must be in (0, 1]. Default is |
unit_of_analysis |
e.g. |
uid |
Column name containing the unique ID (unit of analysis). |
source_of_data |
Source of data; used in output footnotes. |
names_separator |
|
save_as_global_options |
|
... |
Reserved for forward-compatibility; passing old dotted argument
names (e.g. |
An mpi_specs object. Pass this directly as the
mpi_specs argument in compute_mpi,
define_deprivation, and save_mpi.
compute_mpi
specs_file <- system.file(
"extdata",
"global-mpi-specs.csv",
package = "mpindex"
)
list.files(system.file("extdata", package = "mpindex"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.