Description Usage Arguments Value Examples
This function builds an approximation model on data containing some observation interval and then use this model to appoximate another observation interval.
1 2 3 4 5 6 7 8 9 |
.data |
Source data (data.frame). Must contain interval and observation variables (for example, year and value) |
.interval |
Target interval variable (vector) |
method |
Approximation function ('lm', 'loess', 'glm', 'gam') |
... |
Parameters for approximation function |
merge |
If TRUE, results are merged with source data |
mark |
If TRUE, a 'forecast' variable will be added to result |
vars |
Names of interval and observation variable (1st and 2nd numeric columns by default) |
Approximation results (data.frame)
1 2 3 4 5 6 7 8 | ## Not run:
predict_data(.data = data.frame(
y = c(2010, 2013, 2014),
total = c(30800000.00, 32285714.00, 41500000.00)),
.interval = seq(from = 2015, to = 2020, by = 1),
method = "gam")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.