trackeR (version 1.5.2)

profile2fd: Transform distribution and concentration profiles to functional data objects of class fd.

Description

Transform distribution and concentration profiles to functional data objects of class fd.

Usage

profile2fd(object, what, ...)

Value

An object of class fd.

Arguments

object

An object of class distrProfile or conProfile, as returned by distributionProfile and concentrationProfile, respectively.

what

The variable for which the profiles should be transformed to a functional data object.

...

Additional arguments passed on to Data2fd

Examples

Run this code
if (FALSE) {
library('fda')
data('runs', package = 'trackeR')
dp <- distributionProfile(runs, what = 'speed')
dpFun <- profile2fd(dp, what = 'speed',
    fdnames = list('speed', 'sessions', 'time above threshold'))
dp.pca <- pca.fd(dpFun, nharm = 4)
## 1st harmonic  captures vast majority of the variation
dp.pca$varprop
## time spent above speed = 0 is the characteristic distinguishing the profiles
plot(dp.pca, harm = 1)
sumRuns <- summary(runs)
plot(sumRuns$durationMoving, dp.pca$scores[,1])
}

Run the code above in your browser using DataLab