title: Formatting multiple CSV files in R loop
body: <p>I trying to combine data from a HOBOware datalogger, every month or so we collect data and have been compiling them in excel. I'm trying to take the raw CSV files and process them in R. I'm struggling with formatting the CSV correctly in a loop </p>
  
  <p>I can format each month individually via </p>
  
  <pre><code>Pool_xxx &lt;- read_csv("Pool_xxx.csv", 
                             col_types = cols(`Date Time, GMT-05:00` = col_datetime(format = "%m/%d/%y %H:%M:%S")), 
                             skip = 1)[,2:4]
  </code></pre>
  
  <p>But I want to create a loop that will do each CSV in the folder </p>
  
  <p>I've read many posts about how to loop, but I cannot figure out where to place the column specifications</p>
  
  <pre><code>setwd("E:/R Hobo/Conversion test/Converted HOBO files")
  mydir = "Pool 6"
  myfiles = list.files(path=mydir, pattern="*.csv", full.names=TRUE)
  numfiles &lt;- length(myfiles)     
  for (numfiles in myfiles) {
        sample &lt;- read.csv(numfiles,
                            header = FALSE,
                            sep = ",",
                            col_types = cols(`Date Time, GMT-05:00` = col_datetime(format = "%m/%d/%y %H:%M:%S")),  
                            skip = 1) [,2:4]
  }
  </code></pre>
  
  <p>I keep getting this back and I'm not sure where to go</p>
  
  <pre><code>Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
    unused argument (col_types = cols(`Date Time, GMT-05:00` = col_datetime(format = "%m/%d/%y %H:%M:%S")))
  </code></pre>
  
  <p>Some people have suggested lapply but R keeps saying it's not compatible with version 3.5.3</p>
  
  <p>Link to raw CSV: <a href="https://drive.google.com/file/d/1SUf--PNznlNOlDkXeXYaRKuSHqa-EVZM/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1SUf--PNznlNOlDkXeXYaRKuSHqa-EVZM/view?usp=sharing</a></p>