tps_g: Fits a thin plate spline to a single group with 'bam'.

View source: R/trajectories.R

tps_gR Documentation

Fits a thin plate spline to a single group with bam.

Description

Fits a thin plate spline to a single group (one list element) in data with bam. Uses data from only one group rather than a zero weights approach. Zero weights would result in incorrect crossvalidation sampling.

Usage

tps_g(g, data, maxdf, nthreads)

Arguments

g

Integer group number.

data

A list of group-separated data using lapply with data.table::copy(data[group == g]) from original data in clustra description.

maxdf

See trajectories description.

nthreads

Controls bam threads.

Value

Returns an object of class "gam". See bam value. If group data has zero rows, NULL is returned instead.


clustra documentation built on Oct. 14, 2023, 9:15 a.m.