one | R Documentation |
Returns a data.frame of ones which can be used in forecast model inputs
one()
The function returns ones which can be used to generate ones, e.g. to be used as a intercept for a model.
See vignettes 'setup-data' and 'setup-and-use-model'.
A data.frame of ones
# A model
model <- forecastmodel$new()
# Use the function in the input definition
model$add_inputs(mu = "one()")
# Set the forecast horizons
model$kseq <- 1:4
# During the transformation stage the one will be generated for the horizons
model$transform_data(subset(Dbuilding, 1:7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.