Skip to contents

Convert nested list into list of rule

Usage

list2rules(obj)

Arguments

obj

(nested list) to convert into list of rules.

Examples

obj <- list(
  rule1 = list("X" = c("a", "b"), "Z" = "c"),
  rule2 = list(Missing = c(NA, ""))
)
list2rules(obj)
#> $rule1
#> Mapping of:
#> X  <-  a 
#> X  <-  b 
#> Z  <-  c 
#> 
#> $rule2
#> Mapping of:
#> Missing  <-  NA 
#> Missing  <-   
#>