as.data.frame.murphydiag: Coerce a Murphy diagram to a Data Frame

Description Usage Arguments Details Value

View source: R/coercion.R

Description

Coerce a Murphy diagram to a Data Frame

Usage

1
2
## S3 method for class 'murphydiag'
as.data.frame(x, ...)

Arguments

x

'murphydiag' object to be coerced to 'data.frame'

...

additional arguments to be passed to or from methods.

Details

Coercion of a 'murphydiag' object to a 'data.frame' retains only the relevant information for plotting: the model/forecast name, the knots (break points) of the piecewise linear functions, and the values taken in the left and right limits in the knots.

Additional information such as the observations, the predictions, and the functional type of the predictions is lost. Hence, reversion to 'murphydiag' is impossible. When coercing a 'data.frame' to a 'murphydiag', it is assumed that the 'data.frame' comprises predictions (from multiple methods).

Value

Returns a 'data.frame' with four columns: name, knot, limit, value


aijordan/murphydiagram2 documentation built on Jan. 1, 2020, 3:08 p.m.