View source: R/format_invalue.R
| finputc | R Documentation |
Looks up an INVALUE format by name from the global format library and applies it to convert labels to character values.
finputc(x, invalue_name)
x |
Character vector of labels to convert |
invalue_name |
Character. Name of a registered INVALUE format. |
Character vector
# Bidirectional: use finputc for reverse direction
fnew_bid(
"A" = "Active",
"I" = "Inactive",
"P" = "Pending",
name = "status"
)
# Forward: code -> label
fputc(c("A", "I", "P"), "status")
# [1] "Active" "Inactive" "Pending"
# Reverse: label -> code
finputc(c("Active", "Pending", "Inactive"), "status_inv")
# [1] "A" "P" "I"
fclear()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.