Learn R Programming

gluvarpro (version 7.0)

fillgvp: 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)

Value

A data frame containing glucose values.

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.

Author

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

Run this code
data("datagvp1")
fillgvp(datagvp1)

Run the code above in your browser using DataLab