Closed ChristinaSchmidt1 closed 1 year ago
Its fixed now:
#3. Select Input_data columns and Plot_SettingsFile columns
if(is.null(Plot_SettingsFile)==FALSE){
common_columns <- intersect(colnames(Input_data), colnames(Plot_SettingsFile))#check for overlapping names
common_columns <- setdiff(common_columns, "Metabolite")#remove metabolites
Plot_SettingsFile <- Plot_SettingsFile%>%#rename those column since they otherwise will cause issues when we merge the DFs later
dplyr::rename_at(vars(common_columns), ~ paste0(., "_PlotSettingsFile"))
}
Check for duplicated column names between input file and extra file. If there are duplicated names, we need to ensure that if we merge the files later, that we maintain the column names of the input data as they are required to create the plot.
e.g. Plot_SettingsFile= Input_data