impute_epochs: Impute missing count values

View source: R/impute_epochs.R

impute_epochsR Documentation

Impute missing count values

Description

Trim leading and trailing NAs. Fill in the rest of the NAs using cubic spline interpolation.

Usage

impute_epochs(agdb, ...)

Arguments

agdb

A tibble of activity data with an epochlength attribute.

...

Comma separated list of unquoted variables.

Value

Atibble of activity data. Each variable in ... is imputed.

See Also

zoo::na.spline(), zoo::na.trim()

Examples

library("dplyr")
data("gtxplus1day")

gtxplus1day$axis1[5:10] <- NA
gtxplus1day %>%
  impute_epochs(axis1)

dipetkov/actigraph.sleepr documentation built on March 25, 2022, 2:33 a.m.