R/template_meta_footnotes.R

Defines functions createFootnoteFile

createFootnoteFile <- function(stud,proj,usen,stat) {
  
  header_meta_Footnotes<-paste0("
# ---------------------------------------------------------------------------------------------------------------
# Footnotes for project ",proj," ",stud,"  
# Footnotes created from the Excel LoPO 3000 shiny version 1.0 by ",usen,"  on ",Sys.time(), 
                             "# This file is built using the setting 'Single output per row' = Yes
#", stat," outputs
# ---------------------------------------------------------------------------------------------------------------

# Outputs footnotes ------------------------------------------------------------------------------------------------\n")
  
  vector_footnote <- paste0(paste(myLopo$`Program ID`,myLopo$Filters,myLopo$Footnotes,"(target = slref, order = normal, defaulttitle = , prefix= %str(, ))"),collapse="\n")
  
  foot_meta_Footnotes <-paste0("
\n# General footnotes ------------------------------------------------------------------------------------------------

* * Protocol: ",stud)
  
  meta_footnotes <- paste0(header_meta_Footnotes,vector_footnote,foot_meta_Footnotes)
  
  tt <- file(paste0("Studies/",stud,"/meta/meta_footnotes.txt"))
  writeLines(meta_footnotes,  tt)
  close(tt)
  
  
}
kismet303/lopo3000 documentation built on Dec. 5, 2019, 8:40 a.m.