I have a list of data frames that I want to save to independent .csv files.
Currently I have a new line for each data frame:
write.csv(lst$df1, "C:/Users/.../df1")
write.csv(lst$df2, "C:/Users/.../df2")
ad nauseam
Obviously this isn't ideal: a change in the names would mean going through every case and updating it. I considered using something like
lapply(lst, f(x) write.csv(x, "C:/Users/.../x")
but that clearly won't work. How do I save each data frame in the list as a separate .csv file?