is_forecast | R Documentation |
Generic function to test whether an object is of class forecast_*
. You
can also test for a specific forecast_*
class using the appropriate
is_forecast.forecast_*
method. For example, to check whether an object is
of class forecast_quantile
, you would use
scoringutils:::is_forecast.forecast_quantile()
.
is_forecast(x, ...)
## Default S3 method:
is_forecast(x, ...)
## S3 method for class 'forecast_sample'
is_forecast(x, ...)
## S3 method for class 'forecast_binary'
is_forecast(x, ...)
## S3 method for class 'forecast_point'
is_forecast(x, ...)
## S3 method for class 'forecast_quantile'
is_forecast(x, ...)
x |
An R object. |
... |
Additional arguments |
TRUE
if the object is of class forecast_*
, FALSE
otherwise.
forecast_binary <- as_forecast(example_binary)
is_forecast(forecast_binary)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.