dot-repeat_last: Last observation carried forward

Description Usage Arguments Value References

Description

A helper function for making the multivariable regression table

Usage

1
.repeat_last(x, forward = TRUE, maxgap = Inf, na.rm = FALSE)

Arguments

x

A vector

forward

Logical; default is TRUE. Direction to carry forward. By specifying forward = FALSE, you can carry the last observation backward.

maxgap

Numeric; By specifying maxgap, you can choose not to bridge overly long gaps.

na.rm

Logical; default is FALSE. Whether to remove NAs.

Value

a vector similar to x.

References

https://stackoverflow.com/questions/7735647/replacing-nas-with-latest-non-na-value


emilelatour/latable documentation built on Jan. 10, 2020, 5:53 p.m.