flist_: Convert a list of Ids to a new list of a possibly different...

View source: R/flist.R

custom_flistR Documentation

Convert a list of Ids to a new list of a possibly different type

Description

A list of allocations can be converted to a list of entities, via the question "who gave to allocations in this list?" A list of entities can be converted to a new list of entities via the question "Who are the children of these entities?" And so on. flist is the general-purpose tool to make these conversions.

Usage

custom_flist(savedlist, custom, from, to, id_type, where = NULL, having = NULL)

flist_(
  savedlist,
  table,
  from,
  to,
  id_type,
  where = NULL,
  having = NULL,
  schema
)

Arguments

savedlist

a listbuilder list or report

from

the origin ID field

to

the destination ID field

id_type

the id_type of the new listbuilder object

where

any pre-aggregation conditions (lazy_dots)

having

any post-aggregation conditions (lazy_dots)

table

the table within which the flist will happen

schema

"CDW" by default, no need to change it

env

enviornment for evaluating table, from, to, and ...

Details

To use flist, you have to specify the origin and destination id fields, as well as the "context" that defines the transformation. The "context" includes the CDW table that contains both id fields, and any conditions. Example context: table = d_bio_relationship_mv, condition = relation_type_code %in% c("SF", "SM", "DF", "DM". That would describe an output of IDs that are parents of the original ID list.


tarakc02/listbuilder documentation built on Jan. 27, 2024, 7:48 p.m.