Learn R Programming

sdsfun (version 0.7.0)

rm_lineartrend: remove variable linear trend based on covariate

Description

remove variable linear trend based on covariate

Usage

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

Value

A numeric vector.

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.

Examples

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

Run the code above in your browser using DataLab