# Create px object with cohort as HEADING
x <-
greenlanders |>
px() |>
px_stub(names(greenlanders)) |>
px_heading("cohort")
# Create micro files, one for each of the non-HEADING variables (gender, age,
# municipality)
px_micro(x)
Run the code above in your browser using DataLab