Description Usage Arguments Examples
View source: R/processSatelliteSeries.R
Runs a 2-term harmonic regression for the specified number of iterations. Written by Calum You with modification by Jake Campolo. Output includes harmonic values at original data observations, but not coefficients.
1 2 | addHarmonicFits(ts, iterations, origin, dependent, ..., dt_col = DATE,
omega = 1)
|
ts |
Data.frame containing columns date, dependent variable, and any grouping variables. |
iterations |
Number of recursive harmonics to fit |
origin |
reference time; format should match df date column |
dependent |
column name for dependent variable |
... |
additional grouping variables; unquoted |
dt_col |
unquoted column name for date column. Default is DATE |
omega |
default is 1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # apply harmonics by pointID
library(dplyr)
library(lubridate)
library(stringr)
library(broom)
df_fitted <- df_satelliteSeries %>%
addHarmonicFits(
iterations = 4,
origin = ymd("2018-01-01"),
dependent = "GCVI",
pointID
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.