R/template_meta_titles.R

Defines functions createTitleFile

createTitleFile <- function(stud,proj,usen,stat) {
  
header_meta_Titles<-paste0("
# ---------------------------------------------------------------------------------------------------------------
# Titles for project ",proj," ",stud,"  
# Titles 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 titles ------------------------------------------------------------------------------------------------\n")
  
vector_title <- paste0(paste(myLopo$`Program ID`,myLopo$Filters,myLopo$Titles,"(target = slref, order = normal, defaulttitle = , prefix= %str(, ))"),collapse="\n")
  
foot_meta_Titles <-paste0("
\n# General titles ------------------------------------------------------------------------------------------------

* * Protocol: ",stud)

meta_titles <- paste0(header_meta_Titles,vector_title,foot_meta_Titles)

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