Running examples in 'PCMBase-Ex.R' failed
The error most likely occurred in:

> ### Name: PCMTrajectory
> ### Title: Generate a trajectory for the mean in one regime of a PCM
> ### Aliases: PCMTrajectory
> 
> ### ** Examples
> 
> set.seed(1, kind = "Mersenne-Twister", normal.kind = "Inversion")
> 
> # a Brownian motion model with one regime
> modelOU <- PCM(model = PCMDefaultModelTypes()['F'], k = 2)
> 
> # assign the model parameters at random: this will use uniform distribution
> # with boundaries specified by PCMParamLowerLimit and PCMParamUpperLimit
> # We do this in two steps:
> # 1. First we generate a random vector. Note the length of the vector equals
> # PCMParamCount(modelBM).
> 
> randomParams <- PCMParamRandomVecParams(
+   modelOU, PCMNumTraits(modelOU), PCMNumRegimes(modelOU))
> # 2. Then we load this random vector into the model.
> PCMParamLoadOrStore(
+   modelOU,
+   randomParams,
+   0, PCMNumTraits(modelBM), PCMNumRegimes(modelBM), load = TRUE)
[1] 11
> 
> # let's plot the trajectory of the model starting from X0 = c(0,0)
> PCMTrajectory(
+   model = modelOU,
+   X0 = c(0, 0),
+   doPlot2D = TRUE)
Warning: Removed 98 rows containing non-finite values (stat_ellipse).
> 
> 
> # A faceted grid of plots for the two regimes in a mixed model:
> pla <- PCMTrajectory(
+   model = PCMBaseTestObjects$model_MixedGaussian_ab, regime = "a",
+   X0 = c(0, 0, 0),
+   doPlot2D = TRUE) +
+   ggplot2::scale_y_continuous(limits = c(0, 10)) +
+   ggplot2::facet_grid(.~regime)
> 
> plb <- PCMTrajectory(
+   model = PCMBaseTestObjects$model_MixedGaussian_ab, regime = "b",
+   X0 = c(0, 0, 0),
+   doPlot2D = TRUE) +
+   ggplot2::scale_y_continuous(limits = c(0, 10)) +
+   ggplot2::facet_grid(.~regime) +
+   ggplot2::theme(
+     axis.title.y = ggplot2::element_blank(),
+     axis.text.y = ggplot2::element_blank(),
+     axis.ticks.y = ggplot2::element_blank())
> cowplot::plot_grid(pla, plb)
Error in loadNamespace(name) : there is no package called 'cowplot'
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted