I have an array. It has lat,lon,time,and value. Time starts from 1 to 300. Here is part of array for time=1.
myarray[,,1] lon
There are multiple ways of going about this:
paste('myarray', i, 'csv', sep = '.')
or:
sprintf('myarray.%d.csv', i)
I prefer the last one.