Nothing
#' @rdname internal_desc
#' @export
getRefcodes <- function(xvar){
## DESCRIPTION: Internal function to facilitate looking at codes from ref_codes
## If xvar does not exist, returns NULL
## ARGUMENTS:
## xvar - The name of the variable.
## VALUE: The table name
vardiff <- c("FORTYPCD", "FLDTYPCD", "FORTYPGRP", "FORTYPCDCALC", "TYPGRPCD",
paste0("DSTRBCD", seq(1:3)), paste0("TRTCD", seq(1:3)))
if (!xvar %in% vardiff) {
if (grepl("PREV_", xvar)) {
xvar <- sub("PREV_", "", xvar)
}
if (!xvar %in% FIESTAutils::ref_codes[["VARIABLE"]]) {
return(NULL)
}
} else {
switch(xvar,
FORTYPCD = 'FORTYPCD',
FLDTYPCD = 'FORTYPCD',
FORTYPGRP = 'FORTYPCD',
FLDTYPGRP = 'FORTYPCD',
FORTYPCDCALC = 'FORTYPCD',
TYPGRPCD = 'FORTYPCD',
DSTRBCD1 = 'DSTRBCD',
DSTRBCD2 = 'DSTRBCD',
DSTRBCD3 = 'DSTRBCD',
TRTCD1 = 'TRTCD',
TRTCD2 = 'TRTCD',
TRTCD3 = 'TRTCD',
)
}
return(FIESTAutils::ref_codes[FIESTAutils::ref_codes$VARIABLE == xvar,
c("VALUE", "MEANING", "GROUPCD", "GROUPNM")])
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.