title: How to simplify the following R code for writing many CSV files?
body: <p>I would like to output the following data in a list in R, I would like to keep the original colnames, I do know how to simplify it, I think <code>lapply()</code> does not work.</p>
  <pre><code>write.csv(weekly_data$NO_2005_2011_all_site,'Weekly_NO_2005_2011_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$NO_2017_2021_all_site,'Weekly_NO_2017_2021_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$NO2_2005_2011_all_site,'Weekly_NO2_2005_2011_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$NO2_2017_2021_all_site,'Weekly_NO2_2017_2021_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$NOx_2005_2011_all_site,'Weekly_NOx_2005_2011_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$NOx_2017_2021_all_site,'Weekly_NOx_2017_2021_all_site',row.names = FALSE)
  write.csv(weekly_data$O3_2005_2011_all_site,'Weekly_O3_2005_2011_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$O3_2017_2021_all_site,'Weekly_O3_2017_2021_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$PM10_2005_2011_all_site,'Weekly_PM10_2005_2011_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$PM10_2017_2021_all_site,'Weekly_PM10_2017_2021_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$PM2.5_2005_2011_all_site,'Weekly_PM2.5_2005_2011_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$PM2.5_2017_2021_all_site,'Weekly_PM2.5_2017_2021_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$SO2_2005_2011_all_site,'Weekly_SO2_2005_2011_all_site.csv',row.names = FALSE)
  write.csv(weekly_data$SO2_2017_2021_all_site,'Weekly_SO2_2017_2021_all_site.csv',row.names = FALSE)
  </code></pre>
  <p>Thank you in advance.</p>