Description Usage Arguments Value Examples
Smooths time series iteratively using a Akaike information criterion (AIC) to find an optimal smoothing parameter and curve.
1 2 3 4 5 6 7 8 9 10 |
data |
a PhenoCam data file or data structure |
metrics |
which metrics to process, normally all default ones |
force |
|
internal |
return a data structure if given a file on disk
( |
span |
fixed span, NULL by default |
plot_optim |
whether to plot optimal |
out_dir |
output directory where to store data |
An PhenoCam data structure or file with optimally smoothed time series objects added to the original file. Smoothing is required for 'phenophase()' and 'transition_dates()' functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# with defaults, outputting a data frame
# with smoothed values, overwriting the original
# download demo data (do not smooth)
download_phenocam(site = "harvard$",
veg_type = "DB",
roi_id = "1000",
frequency = "3",
smooth = FALSE)
# smooth the downloaded file (and overwrite the original)
smooth_ts(file.path(tempdir(),"harvard_DB_1000_3day.csv"))
# the function also works on a PhenoCam data frame
df <- read_phenocam(file.path(tempdir(),"harvard_DB_1000_3day.csv"))
df <- smooth_ts(df)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.