#' get cancer type code
#'
#' @param x
#'
#' @return code
#' @export
#'
#' @examples
#' getcode("01")
getcode <- function(x,dt="cancer_type_code",
column_need="cancer_type",
column_select="cancer_code"){
if(nchar(x)==0){
return(NA)
}else{
dt <- get(dt)
return(unique(dt[,column_need][grep(x,dt[,column_select])]))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.