Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

na_interp

Pad NA gaps of user-defined width with interpolated values.


Description

An internal function that helps to create a time series that will then be used by clim_calc within ts2clm to produce a climatology as desired by the user.

Usage

na_interp(doy = doy, x = ts_x, y = ts_y, maxPadLength)

Arguments

doy

Date-of-year as per make_whole or make_whole_fast.

x

Date as per make_whole or make_whole_fast.

y

Measurement variable as per make_whole or make_whole_fast.

maxPadLength

Specifies the maximum length of days over which to interpolate (pad) missing data (specified as NA) in the input temperature time series; i.e., any consecutive blocks of NAs with length greater than maxPadLength will be left as NA. Set as an integer.

Value

The function returns the data (a data.table) in a long format.

Author(s)

Smit, A. J.


heatwaveR

Detect Heatwaves and Cold-Spells

v0.4.5
MIT + file LICENSE
Authors
Robert W. Schlegel [aut, cre, ctb] (<https://orcid.org/0000-0002-0705-1287>), Albertus J. Smit [aut, ctb] (<https://orcid.org/0000-0002-3799-6126>)
Initial release
2021-01-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.