get_events_file: Flow Fluctuation Events and Metrics from Input File
Description
Given a file path it reads a data frame (time series) of stage
measurements and calls get_events().
The resulting events can be optionally written to a single file or to
separate files for each gauging station ID (ID) and Event_Type.
Files which produce errors return NULL.
A data frame which contains for every increase or decrease event in a
given time series all metrics (all_metrics()),
gauging station ID, event type, and starting time of an event.
Included metrics are amp(), mafr(),
mefr(), dur(), ratio().
The returned data frame is not split. Returns NULL, if argument
return is set to FALSE.
Arguments
Q_file
A character string containing the name of the file which the data
are to be read from with utils::read.csv().
inputsep
Field separator character string for input data.
inputdec
Character string for decimal points in input data.
save
A logical. If FALSE (default) events (results from
get_events()) are not written to file(s),
otherwise events are written to outdir.
split
A logical. If TRUE (default) output files are separated by
their gauging station ID (ID) and by Event_Type, otherwise
all events are written to a single file.
outdir
A character string naming a directory where the output file(s)
should be written to.
mc.cores
Number of cores to use with
parallel::mclapply(). On Windows, this
will be set to 1.
return
A logical. If TRUE (default) it returns the resulting
data frame or list of data frames. Otherwise it returns NULL.
...
Arguments to be passed to get_events()
and further to flow().