Description Usage Arguments Value References Examples
If there are there any NAs in monthly data set => replace NA by interpolation separate for each time series
1 | uts_interpolate_na(data, freq)
|
data |
A data frame (column count) |
freq |
season lenght, e.g. freq = 12 (1 year) for monthly temperature data |
data frame
if no NAs exist in count column => return unchanged data frame
otherwise:
A tibble: 120 x 9
City Measure Year_Month Year Month count Raw NA_replace
<chr> <fct> <mth> <dbl> <fct> <dbl> <dbl> <dbl>
data frame with columns
count (updated) = orig and interplolated counts (replaced NAs, if any)
Raw (added) = orig counts (w/o replaced NAs)
NA_replace (added) = NAs (if count value exists) and interplolated counts (replaced NAs, if any)
for plots w/ & w/o replaced counts
Schlittgen, Rainer - De Gruyter, Angewandte Zeitreihenanalyse mit R, 2015 ISBN 978-3-11-041398-4
1 | dplyr::slice(uts_interpolate_na(monthly_climate_giessen, freq =12), 75:90)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.