R/transform_template_list_sources.R

Defines functions transform_template_list_sources

Documented in transform_template_list_sources

#' @title Transformation of the sources list template
#' 
#' @description This function will transform the list of sources template in order to fill all empty and necessary cells.
#' 
#' @author Briac LE RAY (briac.leray@partnre.com)
#' 
#' @return The dataframe modified.
#' @param input_list_sources_table The table with the list of sources template format. Type = dataframe
#' @examples transform_template_list_sources(input_list_sources_table = my_template_filled)

transform_template_list_sources = function(input_list_sources_table) {
  
  # Remove trailing and leading spaces
  input_list_sources_table[] = lapply(input_list_sources_table, trimws)
  
  # Fill Nom_du_champ if the cells used to be merged
  input_list_sources_table = input_list_sources_table %>% fill(Nom_de_la_table_source)
  
  return(input_list_sources_table)
}
Tiipiac/StressTestOptimization documentation built on Dec. 18, 2021, 5:08 p.m.