Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

funplot

Plot functional data with linear interpolation of missing values


Description

Plot functional data with linear interpolation of missing values

Usage

funplot(x, y, id = NULL, rug = TRUE, ...)

Arguments

x

optional, time-vector for plotting

y

matrix of functional data with functions in rows and measured times in columns; or vector or functional observations, in this case id has to be specified

id

defaults to NULL for y matrix, is id-variables for y in long format

rug

logical. Should rugs be plotted? Defaults to TRUE.

...

further arguments passed to matplot.

Details

All observations are marked by a small cross (pch=3). Missing values are imputed by linear interpolation. Parts that are interpolated are plotted by dotted lines, parts with non-missing values as solid lines.

Examples

### examples for regular data in wide format
data(viscosity)
with(viscosity, funplot(timeAll, visAll, pch=20))
if(require(fda)){
  with(fda::growth, funplot(age, t(hgtm)))
}

FDboost

Boosting Functional Regression Models

v1.0-0
GPL-2
Authors
Sarah Brockhaus [aut], David Ruegamer [aut, cre], Almond Stoecker [aut], Torsten Hothorn [ctb], with contributions by many others (see inst/CONTRIBUTIONS) [ctb]
Initial release
2020-08-31

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.