build_members: Reconcile and Merge Members

Description Usage Arguments Details Value Author(s) Examples

View source: R/build.R

Description

build_members() reconciles and merges the members found in im_orig_dfs$orig_members and im_core_dfs$core_members.

Usage

1
2
3
4
5
build_members(
  summarize = TRUE,
  split = FALSE,
  as_tibble = ironmarch_as_tibble()
)

Arguments

summarize

logical(1L), Default: TRUE. Whether to aggregate all observations into single rows, prioritizing values found in im_core_dfs.

split

logical(1L), Default: FALSE. Whether to split the result into a named list of separate data frames, retaining all observations. Ignored if summarize is TRUE.

as_tibble

logical(1L), Default: ironmarch_as_tibble(). Whether a tibble::tibble() should be returned. Ignored if the {tibble} package is not installed.

Details

Values found in im_core_dfs$core_members are preferred. Otherwise values found in im_orig_dfs$orig_members are kept.

Value

Author(s)

Brendan Knapp brendan.g.knapp@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# members summarized to single rows ===================================================
build_members()

# all member observations =============================================================
build_members(summarize = FALSE)

# all member observations split into a list of data frames ============================
split_members <- build_members(summarize = FALSE, split = TRUE)

# first three members that appear in both... ==========================================
# ... `im_orig_dfs$orig_members` and `im_core_dfs$core_members`
split_members[
  vapply(split_members, function(.x) nrow(.x) == 2, logical(1L))
][1:3]

knapply/ironmarch documentation built on July 14, 2020, 12:50 a.m.