rm_lineartrend: remove variable linear trend based on covariate

rm_lineartrendR Documentation

remove variable linear trend based on covariate

Description

remove variable linear trend based on covariate

Usage

rm_lineartrend(formula, data, method = c("cpp", "r"))

Arguments

formula

A formula.

data

The observation data.

method

(optional) The method for using, which can be chosen as either cpp or r. Default is cpp.

Value

A numeric vector.

Examples

gzma = sf::read_sf(system.file('extdata/gzma.gpkg',package = 'sdsfun'))
rm_lineartrend(PS_Score ~ ., gzma)
rm_lineartrend(PS_Score ~ ., gzma, method = "r")


sdsfun documentation built on April 3, 2025, 8:39 p.m.