Learn R Programming

clustra (version 0.2.1)

tps_g: 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)

Value

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

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.