View source: R/utilityFunctions.R
funplot | R Documentation |
Plot functional data with linear interpolation of missing values
funplot(x, y, id = NULL, rug = TRUE, ...)
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 |
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.
see matplot
### 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)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.