name_map is an S4 class to create a naming map for use with smart.data

Value

An object of class "name_map"

Slots

name_map

A named list with names as the new names of $data and the values as existing names

law

A quoted expression that, when executed, will invoke setnames for compatibility with smart.data method $enforce.rules()

state

A string indicating whether the name map has been processed by smart.data method $enforce.rules()

Examples

library(smart.data)
new("name_map", name_map = rlang::set_names(letters[1:5], LETTERS[22:26]))
#> An object of class "name_map"
#> Slot "name_map":
#> $V
#> [1] "a"
#> 
#> $W
#> [1] "b"
#> 
#> $X
#> [1] "c"
#> 
#> $Y
#> [1] "d"
#> 
#> $Z
#> [1] "e"
#> 
#> 
#> Slot "law":
#> setnames(x = self$data, old = c("a", "b", "c", "d", "e"), new = c("V", 
#> "W", "X", "Y", "Z"), skip_absent = TRUE)
#> 
#> Slot "state":
#> [1] "pending"
#>