I have checked both this, this, this, and this but, although this sounds like a basic question, either I've not been able to solve my issue or they propose loop-solutions, which I want to avoid.
I am reading multiple .csv files, using lapply()
and read.csv()
.
As a result, I get a list of lists:
dfs <- list.files(pattern = "^[0-9]") |> lapply(read.csv)
dfs[1] |> class()
#> [1] "list"
How can I make every element of dfs
a data frame?
Note that this answer does not fully solve the issue, as I would like to end up with a list of data frames instead of multiple data frames in the global environment.