R/knit-1-htmlcheck_f.R

Defines functions htmlcheck_f

Documented in htmlcheck_f

#' htmlcheck_f
#'
#' if ^(maxdate).html exist based on maxdate from a M+ directory, return FALSE
#' 
#' Return: logical value
#' 
#' @param maxdate generated from maxdate.f
#' @param report.dir output directory of html report
#' @keywords max date from M+ html report
#' @export
htmlcheck_f <- function(maxdate, report_dir){
      flist2 <- list.files(path = report_dir, pattern = "^_201.*html")
      
      htmlname <- grep(pattern = maxdate, x = flist2, value = T)  
      if(length(htmlname)==0){
            return(FALSE)
      }else{
            return(TRUE)
      }
}
junyitt/tfunction documentation built on May 4, 2019, 4:23 p.m.