Hi, guys!
I have been trying to import 4 .csv files at once.
Each .csv will be a data.frame.
My code:
files <- list.files(path = "data-raw/csgo_stat/", pattern = "*.csv") |> stringr::str_remove(".csv")
multiple_csv <- sapply(paste0("data-raw/csgo_stat/",files,".csv"), read.csv)
for(i in 1:length(multiple_csv)){
assign(paste0(files[[i]]), multiple_csv |> purrr::pluck(i))
}
This worked, but I'm pretty sure that there is a easy way to do it.
Thanks a lot!