Description Usage Arguments Value Examples
Transform distribution and concentration profiles to functional data objects of class fd.
1 | profile2fd(object, what, ...)
|
object |
An object of class |
what |
The variable for which the profiles should be transformed to a functional data object. |
... |
Additional arguments passed on to |
An object of class fd
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
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])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.