fillgvp: fill missing glucose values from continuous glucose...

View source: R/fillgvp.R

fillgvpR Documentation

fill missing glucose values from continuous glucose monitoring

Description

Generic function for replacing NA values (missing values) with interpolated values, performing linear or cubic spline interpolation of given data points.

Usage

fillgvp(x, method = "linear", n = 4)

Arguments

x

Data-set with data frame format containing one column:

glucose: glucose value of the observation.

method

Character value to replace missing values (NAs) by linear interpolation via linear or cubic spline interpolation via cubic, respectively. Default value is linear.

n

Numeric value with maximum number of consecutive NAs to fill. Any longer gaps will be left unchanged. Default value is 4.

Value

A data frame containing glucose values.

Author(s)

Sergio Contador.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988). The New S Language. Wadsworth & Brooks/Cole.

Dougherty, R. L., Edelman, A. and Hyman, J. M. (1989). Positivity-, monotonicity-, or convexity-preserving cubic and quintic Hermite interpolation. Mathematics of Computation, 52, 471–494.

Examples

data("datagvp1")
fillgvp(datagvp1)

gluvarpro documentation built on Oct. 1, 2022, 5:05 p.m.

Related to fillgvp in gluvarpro...