# Use sample specs file included in the package
specs_file <- system.file(
"extdata",
"global-mpi-specs.csv",
package = "mpindex"
)
specs <- define_mpi_specs(specs_file, .uid = 'uuid')
# Using built-in dataset
df_household |>
define_deprivation(
.indicator = drinking_water,
.cutoff = drinking_water == 2
)
df_household_roster |>
define_deprivation(
.indicator = school_attendance,
.cutoff = attending_school == 2,
.collapse = TRUE
)
Run the code above in your browser using DataLab