I am wondering how to read multiple datasets (CSV) into R and then perform the same functions on each dataset one at a time in a looping fashion. I don't know how to upload and show these datasets, however, I have attached a screenshot of what the data looks like. It is time-series data for various stocks. The files are all very similar to each other and are all in the same folder on my computer. If you guys need more information or a more in-depth explanation of the problem I am trying to solve please let me know! Thank you all.
The actions I am performing are as follows:
ONTX30 <- ONTX %>%
mutate(as.POSIXct(ONTX$date_time, tz = "America/New_York"))
as_tsibble(index = date_time) %>%
index_by(date_time30 = ~ floor_date(., "30 minute")) %>%
summarise(open30 = first(open), close30 = last(close), min30 = min(low), max30 = max(high), volume30 = sum(volume))