View source: R/gaudermanModelling.R
| plotGoudermanLongitudinalResults | R Documentation |
Plotting the 'Gouderman' LME Model and Results.
plotGoudermanLongitudinalResults( evaluationresult, main = "Mixed Effect Spline Model Evaluation", ylab = "Value", xlab = "Time", peaknames = NULL )
evaluationresult |
'GaudermanModelEvaluation' data object, created by the modelGoudermanLongitudinal function. |
main |
title of the plot |
ylab |
y axis label |
xlab |
x axis label |
peaknames |
selection of peaks to be plotted |
No return value
wd <- tempdir()
data(LoBraExample)
selectedLDO <- selectComponents(ldo, components)
gaudermanLDOexample <- createGoudermanData(selectedLDO, breaks=c(8, 12), center=12, timeperiod=2)
evalResult<- modelGoudermanLongitudinal(gaudermanLDOexample)
# Plot all peaks
filename<- file.path(wd, "finalModelEvaluation.pdf") ;
oldpar <- par("mfrow")
grDevices::pdf(filename, width=16, height=8);
graphics::par(mfrow=c(1,1));
plotGoudermanLongitudinalResults(evalResult);
par(mfrow = oldpar)
grDevices::dev.off();
#Plot a selection of Peaks
peaknames<- evalResult@gaudermanLDO@peaknames;
filename<- file.path(wd, "finalModelEvaluation-components.pdf") ;
oldpar <- par("mfrow")
grDevices::pdf(filename, width=20, height=8);
graphics::par(mfrow=c(2,5));
plotGoudermanLongitudinalResults(evalResult, main="", peaknames=peaknames);
par(mfrow = oldpar)
grDevices::dev.off();
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.