inst/doc/migrating-to-0-3-x.R

## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  error = TRUE   # allow expect_error demonstrations to render
)

## ----setup--------------------------------------------------------------------
library(mpindex)

## ----dotted-error-------------------------------------------------------------
# Old (0.2.x) — now errors
define_mpi_specs(
  "path/to/specs.csv",
  .uid = "uuid",
  .poverty_cutoff = 1/3
)

## ----no-specs-error-----------------------------------------------------------
define_deprivation(df_household, drinking_water, cutoff = drinking_water == 2)

## ----deprecated-fn------------------------------------------------------------
# Soft-deprecated: raises a warning but still works
specs <- use_global_mpi_specs()

Try the mpindex package in your browser

Any scripts or data that you put into this service are public.

mpindex documentation built on Oct. 4, 2026, 5:07 p.m.