# age_cal ---------------------------------------------------------------
#' Age Calculator
#'
#' @param data name of dataset
#' @param variable variable name whose age is to be calculated
#' @param agevariable new variable column which is the calculated age
#' @return a dataframe with age as a vector
#' @export
#'
#' @examples
# age_cal <- function(data,variable,agevariable){
# as.character(variable)
# as.character(agevariable)
# age <- as.integer(format(Sys.Date(), "%Y")) - data[variable]
# return(data$ageVariable <- (age[variable]))
# }
# age_cal <- function(data,variable){
# as.character(variable)
# age <- as.integer(format(Sys.Date(), "%Y")) - data[variable]
# return(age[variable])
# }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.