Hey all, I'm hoping someone will be able to help me. I have a list of 178 food web matrices in R -- I want to export these individually using the 'write.csv' function, but I also want to use the loop number to name each subsequent .csv file. I have a regional matrix called 'master3' grouped as a list, I can pull out local food webs using master3[[i]] where i denotes the i'th food web. I want to export each individual locality as a csv file named after the corresponding loop number (e.g. for master[[4]], output 'master_4.csv') Something like:<div>
<br></div><div><div>for (i in 1:length(master3)) {</div><div> write.csv(master3[[i]], file = master_i)</div><div>}</div></div><div><br></div><div>But that doesn't seem to make R happy. Any help at all would be appreciated, I'd like to avoid doing it manually.</div>
<div><br></div><div>-Ashkaan</div>