mc_prep_fillNA: Fill NA

View source: R/prep.R

mc_prep_fillNAR Documentation

Fill NA

Description

This function approximate NA (missing) values. It was designed to fill only small gaps in microclimatic time-series therefore, the default maximum length of the gap is 5 missing records and longer gaps are not filled Only linear method is implemented from zoo::na.approx function.

Usage

mc_prep_fillNA(
  data,
  localities = NULL,
  sensors = NULL,
  maxgap = 5,
  method = "linear"
)

Arguments

data

cleaned myClim object see myClim-package

localities

names of localities; if NULL then all (default NULL)

sensors

names of sensors; if NULL then all (default NULL) see names(mc_data_sensors)

maxgap

maximum number of consecutively NA values to fill (default 5)

method

used for approximation. It is implemented now only "linear". (default "linear")

Value

myClim object with filled NA values


myClim documentation built on Oct. 21, 2024, 5:07 p.m.