maximusyoda maximusyoda - 1 month ago 7
R Question

How can I make a list of all dataframes that are in my global environment?

I am trying to use

on them. But I need a list of all the
that are already in my global environment. How can I do it?

Code I used to import the 20 csv files in a directory. Basically, have to combine into a single dataframe.

temp = list.files(pattern = "*.csv")
for (i in 1:length(temp)) assign(temp[i], read.csv(temp[i]))


From your posted code, I would recommend you start a new R session, and read the files in again with the following code, lapply(list.files(pattern = ".csv"), read.csv))