R/render.R

Defines functions render

Documented in render

#' Creata line for a LaTeX codebook. 
#'
#' @param x tempalte
#' @param lst a hash table list of replacement rules 
#' @return filled-in template 
#' @export

render <- function(x, lst){
   "Takes a list of replacement rules and applies them to a string x."
   for(pattern in names(lst)){
        x <- gsub(pattern, lst[[pattern]], x)
    }
    x
}
johnjosephhorton/JJHmisc documentation built on May 19, 2019, 5:15 p.m.