SmoothGradient: SmoothGradient

View source: R/emFunctions.r

SmoothGradientR Documentation

SmoothGradient

Description

Function to smooth data and calculate derivative with pspline

Usage

SmoothGradient(
  m,
  t,
  breaks,
  t.out = t,
  deriv = 1,
  ncpu = 10,
  method = "pspline",
  ...
)

Arguments

m

a matrix of data (variable in columns and time in rows)

t

matrix or vector of time points for each data

breaks

break points to re-smooth the data

t.out

time stamps of output (default: to be the same as input)

deriv

order of derivative to calculate

ncpu

number of cpus (default: 10)

method

smoothing method used to calculate gradients (default: pspline)

Value

a matrix of gradients calculated (deriv=1), a matrix of smoothed data (deriv=0)


lch14forever/BEEM documentation built on April 5, 2025, 11:24 p.m.