powered by
Stores a coding at the "rcoder.coding" attribute of a vector
assign_coding(vec, .coding, .bpr = TRUE)
The vector with its "rcoder.coding" attribute set to `.coding`
A vector
A `coding` object
Also overwrite the "bpr.coding" attribute with the character representation of `.coding`. Used for interop with blueprintr variable decorations.
[recode_vec()]
cdng <- coding(code("Yes", 3), code("Maybe", 2), code("No", 1)) vec <- sample(1:3, 50, replace = TRUE) assign_coding(vec, cdng)
Run the code above in your browser using DataLab