I'm having trouble importing this data in R, since it is not in standard csv format. My raw data looks like this:
BC000068032198109TMAX 232 Q 220 Q 220 Q 244 Q 239 Q 246 Q 270 Q 300 Q 327 Q 279 Q 256 Q 260 Q 289 Q 342 Q 357 Q 359 Q 370 Q 373 Q 367 Q 370 Q 372 Q 357 Q 366 Q 365 Q 355 Q 355 Q 364 Q 343 Q 364 Q 362 Q-9999
BC000068032198110TMIN 180 Q 170 I 150 I 130 I 150 I 130 I 160 I 190 I 190 I 185 Q-9999 130 I 130 I 160 I 170 I 140 I 160 I 160 I 160 I 160 I 160 I-9999 190 I 180 I 160 I 165 Q 210 I 180 I-9999 190 I 170 I
So, basically the first 11 characters of each line are the location's ID, next 4 are the year, following 2 are the month, then there are 4 more which are the variable's name. Finally there are 31 numbers which are the daily measurements for that specific month and variable. -9999 means Not Available. Normally each measurement is followed by a Flag (e.g. "Q" or "I") but NAs are not. I'm not interested in importing these flags. Ultimately I'd like to have a long dataset with each daily measurement being coupled with its date, location and variable name. Thank you for your support.
In the event it's not a fixed-width format, something like:
should work.