examples/unpivot.R

library(flexpivot)
library(magrittr)
data("nobel_laureates")

# Revert format
nobel_laureates %>%
  pivot_table(
    rows = "category",
    cols = c("gender", "birth_continent")
  ) %>%
  unpivot()

nobel_laureates %>%
  pivot_table(
    rows = "category",
    cols = "birth_continent"
  ) %>%
  unpivot()
dreamRs/flexpivot documentation built on Oct. 26, 2023, 9:46 a.m.