Assuming the first observation associated with each year is Jan 1,
the second is Jan 2 and so on we have the following. as.yearmon
converts the year into a year/month object and as.Date turns that
into Jan 1 of that year. Then the ave calculation adds 0, 1, ...
to that so we get sequential dates
Hi, my data consists of 2 columns: one with the 'year' when daily observation
was recorded, the other one consists these observations 'obs', like the
following:
year obs
[3014,] 86 26.01
[3015,] 86 25.66
[3016,] 86 23.92
[3017,] 86 23.84
.
.
[3018,] 96 22.65
[3019,] 96 23.22
[3020,
2 matches
Mail list logo