View source: R/events2station.R
events2station | R Documentation |
Aggregate some aspects of an 'events' object in time and space and transform the time series into a 'station' object.
events2station(
x,
param = "count",
FUN = "mean",
verbose = FALSE,
longname = NULL,
unit = NULL,
...
)
x |
input object of class 'events' |
param |
parameter to aggregate, e.g., 'count' or some characteristic such as 'pcent' or 'radius' (for options, see names(x)) |
FUN |
a function, e.g., 'mean' or 'sum' |
verbose |
a boolean; If TRUE print information about progress |
longname |
long name of variable |
unit |
name of unit |
... |
additional arguments |
by.trajectory |
a boolean; This input is only used when param is 'count'. See description above. |
by |
the time interval of aggregation, only used when param is 'count'. The default is "month", other options are "year", "day", and "timestep". When param is not 'count', by cannot be changed and the aggregation is always on a monthly time scale. |
If the aggregated aspect is the number of events (param='count', the default option), the events can be aggregated in several different ways. The frequency of aggregation can be set by the input parameter 'by' (default: "month"). If by.trajectory=FALSE (default), the function counts the average number of events per timestep at the selected interval. If by.trajectory=TRUE, the function instead counts the number of individual trajectories that are identified within that time period. The latter option requires 'track' to have been applied to the events.
a 'station' object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.