list2rules: Convert nested list into list of 'rule'

View source: R/rules.R

list2rulesR Documentation

Convert nested list into list of rule

Description

Convert nested list into list of rule

Usage

list2rules(obj)

Arguments

obj

(⁠nested list⁠) to convert into list of rules.

Value

a list of rule objects.

Examples

obj <- list(
  rule1 = list("X" = c("a", "b"), "Z" = "c", .to_NA = "xxxx"),
  rule2 = list(Missing = c(NA, "")),
  rule3 = list(Missing = c(NA, ""), .drop = TRUE),
  rule4 = list(Absent = c(NA, ""), .drop = TRUE, .to_NA = "yyyy")
)
list2rules(obj)


dunlin documentation built on Oct. 31, 2024, 5:07 p.m.