File size: 415 Bytes
0369477
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Master script
for(f in list.files('./')) {
  if(grepl('helper_functions|MASTER|LOG',f)) { next }
  if(file.exists(paste0('./LOG/log_',gsub('.R','.txt',f)))) { next }
  # stop()
  con <- file(paste0('./LOG/log_',gsub('.R','.txt',f)))
  cat(f,'\n')
  sink(con,append = TRUE)
  sink(con,append = TRUE,type = 'message')
  source(f,echo = T,max.deparse.length = 10000)
  sink()
  sink(type = 'message')
}