Running examples in ‘sjmisc-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: merge_imputations
> ### Title: Merges multiple imputed data frames into a single data frame
> ### Aliases: merge_imputations
> 
> ### ** Examples
> 
> library(mice)
Loading required package: lattice

Attaching package: ‘mice’

The following objects are masked from ‘package:base’:

    cbind, rbind

> imp <- mice(nhanes)

 iter imp variable
  1   1  bmi  hyp  chl
  1   2  bmi  hyp  chl
  1   3  bmi  hyp  chl
  1   4  bmi  hyp  chl
  1   5  bmi  hyp  chl
  2   1  bmi  hyp  chl
  2   2  bmi  hyp  chl
  2   3  bmi  hyp  chl
  2   4  bmi  hyp  chl
  2   5  bmi  hyp  chl
  3   1  bmi  hyp  chl
  3   2  bmi  hyp  chl
  3   3  bmi  hyp  chl
  3   4  bmi  hyp  chl
  3   5  bmi  hyp  chl
  4   1  bmi  hyp  chl
  4   2  bmi  hyp  chl
  4   3  bmi  hyp  chl
  4   4  bmi  hyp  chl
  4   5  bmi  hyp  chl
  5   1  bmi  hyp  chl
  5   2  bmi  hyp  chl
  5   3  bmi  hyp  chl
  5   4  bmi  hyp  chl
  5   5  bmi  hyp  chl
> 
> # return data frame with imputed variables
> merge_imputations(nhanes, imp)
     bmi hyp chl
1  27.38   1 176
2  22.70   1 187
3  26.80   1 187
4  24.58   2 212
5  20.40   1 113
6  25.34   1 184
7  22.50   1 118
8  30.10   1 187
9  22.00   1 238
10 24.36   1 183
11 26.86   1 179
12 23.58   1 194
13 21.70   1 206
14 28.70   2 204
15 29.60   1 206
16 28.00   1 170
17 27.20   2 284
18 26.30   2 199
19 35.30   1 218
20 25.50   2 228
21 27.52   1 207
22 33.20   1 229
23 27.50   1 131
24 24.90   1 196
25 27.40   1 186
> 
> # append imputed variables to original data frame
> merge_imputations(nhanes, imp, nhanes)
   age  bmi hyp chl bmi_imp hyp_imp chl_imp
1    1   NA  NA  NA   27.38       1     176
2    2 22.7   1 187   22.70       1     187
3    1   NA   1 187   26.80       1     187
4    3   NA  NA  NA   24.58       2     212
5    1 20.4   1 113   20.40       1     113
6    3   NA  NA 184   25.34       1     184
7    1 22.5   1 118   22.50       1     118
8    1 30.1   1 187   30.10       1     187
9    2 22.0   1 238   22.00       1     238
10   2   NA  NA  NA   24.36       1     183
11   1   NA  NA  NA   26.86       1     179
12   2   NA  NA  NA   23.58       1     194
13   3 21.7   1 206   21.70       1     206
14   2 28.7   2 204   28.70       2     204
15   1 29.6   1  NA   29.60       1     206
16   1   NA  NA  NA   28.00       1     170
17   3 27.2   2 284   27.20       2     284
18   2 26.3   2 199   26.30       2     199
19   1 35.3   1 218   35.30       1     218
20   3 25.5   2  NA   25.50       2     228
21   1   NA  NA  NA   27.52       1     207
22   1 33.2   1 229   33.20       1     229
23   1 27.5   1 131   27.50       1     131
24   3 24.9   1  NA   24.90       1     196
25   2 27.4   1 186   27.40       1     186
> 
> # show summary of quality of merging imputations
> merge_imputations(nhanes, imp, summary = "dens", filter = c("chl", "hyp"))
Error in Summary.unit(c(4.4, 4.4), na.rm = FALSE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... render_strips -> build_strip -> ggstrip -> Summary.unit
Execution halted