I have about 50 CSV files that need to be imported into R, and then I want to set a header row which is the first two rows of data in each file. As an example:
DATE FIRST LAST ID
(M/D/Y) NAME NAME
The data starts in Row 3. I can import all the files as their own unique dataframe which
temp = list.files(pattern="*.csv")
list2env(
lapply(setNames(temp, make.names(gsub("*.csv$", "", temp))),
read.csv), envir = .GlobalEnv)
But how can I change that code to combine the first two rows as a header