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

> ### Name: cohend
> ### Title: Use Cohen's d as the effect size in 'study_parameters'
> ### Aliases: cohend
> 
> ### ** Examples
> 
> 
> # Pretest SD
> p <- study_parameters(n1 = 11,
+                       n2 = 20,
+                       icc_pre_subject = 0.5,
+                       cor_subject = -0.4,
+                       var_ratio = 0.03,
+                       effect_size = cohend(0.4, standardizer = "pretest_SD"))
> 
> get_slope_diff(p)
[1] 5.656854
> 
> # using posttest SD,
> # due to random slope SD will be larger at posttest
> # thus ES = 0.4 indicate larger raw slope difference
> # using posttest SD
> p <- update(p, effect_size = cohend(0.4,
+                                     standardizer = "posttest_SD"))
> get_slope_diff(p)
[1] 7.604587
> 
> 
> # Random slope SD
> p <- study_parameters(n1 = 11,
+                       n2 = 20,
+                       icc_pre_subject = 0.5,
+                       cor_subject = -0.4,
+                       var_ratio = 0.03,
+                       effect_size = cohend(0.4, standardizer = "slope_SD"))
> 
> # Partially nested ----------------------------------------------------------
> p <- study_parameters(n1 = 11,
+                       n2 = 20,
+                       n3 = 4,
+                       icc_pre_subject = 0.5,
+                       icc_pre_cluster = 0.25,
+                       cor_subject = -0.4,
+                       var_ratio = 0.03,
+                       partially_nested = TRUE,
+                       effect_size = cohend(0.4, standardizer = "pretest_SD")
+                       )
> # Default is to use control groups SD
> get_slope_diff(p)
[1] 4.898979
> 
> # Treatment group's SD also include cluster-level intercept variance.
> # Thus, ES of 0.4 will indicate a larger raw difference
> # using the treatment group's SD
> p <- update(p, effect_size = cohend(0.4,
+                                     standardizer = "pretest_SD",
+                                     treatment = "treatment"))
> get_slope_diff(p)
[1] 5.656854
> 
> ## Combine multiple values, and raw and standardized effects ----------------
> p <- study_parameters(n1 = 11,
+                       n2 = 20,
+                       icc_pre_subject = 0.5,
+                       cor_subject = -0.4,
+                       var_ratio = 0.03,
+                       effect_size = c(-5, 9,
+                                       cohend(c(0.5, 0.8), standardizer = "pretest_SD"),
+                                       cohend(c(0.5, 0.8), standardizer = "posttest_SD")))
> 
> 
> ## Recreate results in Raudenbush & Liu 2001 --------------------------------
> rauden_liu <- function(D, f, n = 238) {
+     n1 <- f * D + 1
+     p <- study_parameters(n1 = n1,
+                           n2 = n/2,
+                           T_end = D,
+                           sigma_subject_intercept = sqrt(0.0333),
+                           sigma_subject_slope = sqrt(0.0030),
+                           sigma_error = sqrt(0.0262),
+                           effect_size = cohend(0.4, standardizer = "slope_SD"))
+     x <- get_power(p)
+     round(x$power, 2)
+ }
> 
> ## Table 1 in Raudenbush & Liu 2001
> ## NB, it looks like they made an error in column 1.
> g <- expand.grid(D = 2:8,
+                  f = c(0.5, 1:6))
> g$power <- mapply(rauden_liu, D = g$D, f = g$f)
> tidyr::spread(g, f, power)
Error in library.dynam(lib, package, package.lib) : 
  DLL 'dplyr' not found: maybe not installed for this architecture?
Calls: :: ... namespaceImportFrom -> asNamespace -> loadNamespace -> library.dynam
Execution halted