reverse_map_total_n: Reverse the *_map_total_n() process

View source: R/reverse-map-total-n.R

reverse_map_total_nR Documentation

Reverse the ⁠*_map_total_n()⁠ process

Description

reverse_map_total_n() takes the output of a function created by function_map_total_n() and reconstructs the original data frame.

See audit_total_n(), which takes reverse_map_total_n() as a basis.

Usage

reverse_map_total_n(data)

Arguments

data

Data frame that inherits the "scr_map_total_n" class.

Value

The reconstructed tibble (data frame) which a factory-made ⁠*_map_total_n()⁠ function took as its data argument.

Examples

# Originally reported summary data...
df <- tibble::tribble(
  ~x1,    ~x2,   ~n,
  "3.43", "5.28", 90,
  "2.97", "4.42", 103
)
df

# ...GRIM-tested with dispersed `n` values...
out <- grim_map_total_n(df)
out

# ...and faithfully reconstructed:
reverse_map_total_n(out)

lhdjung/scrutiny documentation built on Sept. 28, 2024, 12:14 a.m.