Name Map Coercion

as.name_map(x)

Arguments

x

A list with named elements the same as the slots

Value

An object of class "name_map"

Examples

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"
#>