Name Map Coercion
as.name_map(x)A list with named elements the same as the slots
An object of class "name_map"
library(smart.data)
as.name_map(list(name_map = c(A = "a", B = "z"), law = rlang::expr(eval())))
#> An object of class "name_map"
#> Slot "name_map":
#> $A
#> [1] "a"
#>
#> $B
#> [1] "z"
#>
#>
#> Slot "law":
#> setnames(x = self$data, old = c("a", "z"), new = c("A", "B"),
#> skip_absent = TRUE)
#>
#> Slot "state":
#> [1] "pending"
#>