R/go_through_loading.R

Defines functions go_through_loading

Documented in go_through_loading

#' @title Compute all merges
#' 
#' @description Loops the input table to add all the sources to the R file.
#' 
#' @author Briac LE RAY (briac.leray@partnre.com)
#' 
#' @return Does not return anything.
#' @param sources_table The filled sources template. Type = dataframe
#' @param file_path The file to the path to write the code in. Type = character
#' @examples go_through_loading(sources_table = my_template_filled, file_path = "path/to/the/file/file_name.extension")

go_through_loading <- function(sources_table, file_path) {
  # sources_table = template table from the requirement. http://confluence.intra.arkea.com:8080/confluence/pages/viewpage.action?pageId=1350927609
  # file_path = path to the file to create
  
  for (i in 1:nrow(sources_table)) {
    add_to_file(text = get_template_load(sources_table[i,]), file_path = file_path, append = TRUE)
    }
}
Tiipiac/StressTestOptimization documentation built on Dec. 18, 2021, 5:08 p.m.