I am trying to write a script that performs the following sequence to a variable containing a list of csv files:
-reads each csv file
-appends a column to each csv with the header "Dimension Type" where each row in the new column contains the name of the header in the first column
-renames the header of the first column to "Dimension"
-combines all of the csv files
-exports the combined csv files to an excel file
All of the csv files are structured the same with the exception of the header of the first column, which is the name of the dimension type
I created the variable containing the list of csv files using the list.files function and I have the directory where I want to store the excel file stored in a variable as well.