I'm trying to import multiple .csvs each with different dimensions. I want to create a tibble for each .csv and keep the same file name for the tibble, so that I have the same number of dfs in global environment as I have .csvs.
Working directory is "Project" and .csvs are in "Project/Data"
temp <- list.files(path = "Data")
all <- lapply(temp, read.csv)
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'circuits.csv': No such file or directory
I'm also not sure if read.csv needs arguments within lapply().
edit: I've managed to get the 2nd part working but I get a large list with dataframes instead of the data frames that I originally wanted.
All <- lapply(temp, function(i){
read.csv(i, header = TRUE, sep = ",")
})