plotfd: plot a functional data object

Description Usage Arguments Examples

Description

This function plots a functional data object (after smoothing or interpolation). If you want to color the curves according to a cluster's membership, please specify the parmetere col. Note: this function works only for univariate functional data.

Usage

1
2
  plotfd(fd, col = c(1:nrow(fd$coefs)), xlab = "time",
    ylab = "value", main = "Functional data curves")

Arguments

fd

a functional data object

col

the color vector.

xlab

label of the horizontal axis

ylab

label of the vertical axis

main

the title of the graphic

Examples

1
2
3
4
5
6
7
data(growth)
data=cbind(matrix(growth$hgtm,31,39),matrix(growth$hgtf,31,54));
t=growth$age;
splines <- create.bspline.basis(rangeval=c(1, max(t)), nbasis = 20,norder=4);
fd <- Data2fd(data, argvals=t, basisobj=splines);
cls=c(rep(1,39),rep(2,54)) #there is 39 boys and 54 girls in this data
plotfd(fd,col=cls)


Search within the Funclustering package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.