is_forecast {rplanes} | R Documentation |
Check forecast
Description
This function checks if the object is of class signal
and forecast
.
Usage
is_forecast(x)
Arguments
x |
Input object to be checked |
Value
Logical as to whether or not the input object inherits the "signal" and "forecast" classes.
Examples
## get path to example forecast file
fp <- system.file("extdata/forecast/2022-10-31-SigSci-TSENS.csv", package = "rplanes")
ex_forecast <- read_forecast(fp)
sig <- to_signal(ex_forecast, outcome="flu.admits", type="forecast", horizon=4, resolution="weeks")
is_forecast(sig)
[Package rplanes version 0.1.0 Index]