Save a data frame to .csv file using the write.csv command
data(mtcars)

# use the write.csv command followed by the file path (i.e. where you would like to save the file)
write.csv(mtcars, '/Users/majerus/Desktop/R/intro/data/cars.csv', row.names=T)

# remove the cars data from the workspace
rm(mtcars) 

# use the read.csv command followed by the file path
# row.names=1 tells R that the data in the first column are the names of the rows
cars <- read.csv('/Users/majerus/Desktop/R/intro/data/cars.csv', row.names=1)

folder <- "/Users/majerus/Desktop/R/intro/data/"      # path to folder that holds multiple .csv files
file_list <- list.files(path=folder, pattern="*.csv") # create list of all .csv files in folder

# read in each .csv file in file_list and create a data frame with the same name as the .csv file
for (i in 1:length(file_list)){
assign(file_list[i],
)}

folder <- "/Users/majerus/Desktop/R/intro/data/"      # path to folder that holds multiple .csv files
stringsAsFactors = FALSE)))