Displaying 1 result from an estimated 1 matches for "comp198612".
Did you mean:
comp198602
2009 Mar 26
4
Reading in files with variable parts to names
...o variable parts to the file name: year and month. E.g. comp198604.asc represents April of 1986 - 'comp' is fixed in each case. Years range between 1986 to 1995 and months are between 1 and 12.
Just to be clear, there are 12 files associated with each year: e.g. comp198601, comp198602, ... comp198612 through to comp199501, comp199502 ... comp199512.
I am trying to automate the reading in of these files, but am struggling to find an adequate way of achieving this. The closest I've got is by doing:
year <- 1986:1995
month <- sprintf("%02d", 1:12) # formats numbers to 2 d...