Am 27.02.2016 um 20:09 schrieb Riccardo (Jack) Lucchetti:
On Sat, 27 Feb 2016, Marc O'Callaghan wrote:
> value of that date throughout the available years. I therefore sought
> to compact it with "dataset compact 31", to which I was told "This
> conversion is not supported".
According to the "dataset compact" documentation you would have to give
the new frequency, so "dataset compact 1" instead of 31, but you are
right that this isn't working, either. I guess it is only implemented
for the standard periodicities, although I don't see why it shouldn't be
allowed for non-standard cases, too.
Or otherwise, you could use the aggregate() function to create a
matrix
that you re-use as the starting point of your new dataset.
To be more concrete, here's an example:
<hansl>
nulldata 320
setobs 31 1900:1 --time-series
matrix m = aggregate(index, $obsminor, mean)
print m
</hansl>
You have to replace "index" with your variable of interest. The builtin
series '$obsminor' holds the day-of-the-month number 1 to 31 in this
case. You can also do something like:
<hansl>
nulldata 31 --preserve
series mymeans = m[,3]
</hansl>
at the end to get your results in a series format in a new workfile.
(The 3rd column of the 'aggregate' output is what you want, hence m[,3].)
good luck,
sven