naaccr_encode | R Documentation |
Format a value as a string according to the NAACCR format
naaccr_encode(x, field, flag = NULL, version = NULL, format = NULL)
x |
Vector of values. |
field |
Character string naming the field. |
flag |
Character vector of flags for the field. Only needed if the field contains sentinel values. |
version |
An integer specifying the NAACCR format version for parsing
the records. Use this or |
format |
A |
Character vector of the values as they would be encoded in a NAACCR-formatted text file.
split_sentineled
r <- naaccr_record(
ageAtDiagnosis = c("089", "000", "200"),
dateOfDiagnosis = c("20070402", "201709 ", " ")
)
r
mapply(FUN = naaccr_encode, x = r, field = names(r))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.