spline_stats: Computes background quantities using splines

View source: R/event_functions_2d.R

spline_statsR Documentation

Computes background quantities using splines

Description

This function computes 4 splines, from median, iqr, mean and standard deviation values.

Usage

spline_stats(dat)

Arguments

dat

The data matrix

Value

A list with following components

med.spline

The spline computed from the median values.

iqr.spline

The spline computed from IQR values.

mean.spline

The spline computed from mean values.

sd.spline

The spline computed from standard deviation values.

mean.dat

The mean of the data matrix.

sd.dat

The standard deviation of the data matrix.

Examples

out <- gen_stream(1, sd=15)
zz <- as.matrix(out$data)
sstats <- spline_stats(zz[1:100,])
oldpar <- par(mfrow=c(2,1))
image(1:ncol(zz), 1:nrow(zz),t(zz), xlab="Location", ylab="Time" )
plot(sstats[[1]], type="l")
par(oldpar)       

sevvandi/eventstream documentation built on May 16, 2022, 11:23 a.m.