R/knit-2-htmlopen_f.R

Defines functions htmlopen_f

Documented in htmlopen_f

#' htmlopen_f
#'
#' open the html file
#' 
#' @param maxdate generated from maxdate_f
#' @param report.dir output directory of html report
#' @keywords open html file from maxdate
#' @export
htmlopen_f <- function(maxdate, report_dir){
      flist2 <- list.files(path = report_dir, pattern = "^201.*html")
      
      htmlname <- grep(pattern = maxdate, x = flist2, value = T) 
      L <- length(htmlname)
      shell.exec(paste0(report_dir,htmlname[L])) #if exist, open html
      
}
junyitt/tfunction documentation built on May 4, 2019, 4:23 p.m.