R/Hospital_tongren.R

Defines functions Hospital_tongren

#' To clear blood test from Shang Hai Tong Ren hospital
#'
#' @param filename the name of files which contain data of blood test. It can be one name or many names. If ONLY data files in your working directory, the filename object can be omitted.
#' @author Jing Zhang
#' @author Ligen Liu
#' @return A dataframe
#' @export
#'
#' @examples Hospital_tongren("bloodtest.txt")
#' @examples Hospital_tongren("bloodtest.docx")
#' @examples Hospital_tongren("bloodtest.doc")
Hospital_tongren<-function(filename){
  test_package<- rownames(installed.packages())
  if (all(("plyr" %in% test_package))){
  }else{ install.packages("plyr")
  }
  if (missing(filename)){
    filename=list.files()
  }
  if (length(filename)==1){
    Hospital.tongren.onefile(filename)
  }else if(length(filename) >1){
    Hospital.tongren.manyfiles(filename)
  }
}
yikeshu0611/HospitalTest documentation built on Aug. 19, 2019, 3:19 a.m.