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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: spread_coef
> ### Title: Spread model coefficients of list-variables into columns
> ### Aliases: spread_coef
> 
> ### ** Examples
> 
> library(dplyr)

Attaching package: ‘dplyr’

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

    filter, lag

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

    intersect, setdiff, setequal, union

> library(tidyr)

Attaching package: ‘tidyr’

The following object is masked from ‘package:sjmisc’:

    replace_na

> library(purrr)

Attaching package: ‘purrr’

The following object is masked from ‘package:sjmisc’:

    is_empty

> data(efc)
> 
> # create nested data frame, grouped by dependency (e42dep)
> # and fit linear model for each group. These models are
> # stored in the list variable "models".
> model.data <- efc %>%
+   filter(!is.na(e42dep)) %>%
+   group_by(e42dep) %>%
+   nest() %>%
+   mutate(
+     models = map(data, ~lm(neg_c_7 ~ c12hour + c172code, data = .x))
+   )
> 
> # spread coefficients, so we can easily access and compare the
> # coefficients over all models. arguments `se` and `p.val` default
> # to `FALSE`, when `model.term` is not specified
> spread_coef(model.data, models)
# A tibble: 4 x 6
# Groups:   e42dep [4]
  e42dep            data models `(Intercept)` c12hour c172code
   <dbl> <list<df[,25]>> <list>         <dbl>   <dbl>    <dbl>
1      3      [306 × 25] <lm>           10.9  0.00372   0.385 
2      4      [304 × 25] <lm>           13.0  0.00824   0.0491
3      1       [66 × 25] <lm>           10.9  0.0128   -1.00  
4      2      [225 × 25] <lm>            8.27 0.0345    0.770 
> spread_coef(model.data, models, se = TRUE)
# A tibble: 4 x 9
# Groups:   e42dep [4]
  e42dep       data models `(Intercept)` `(Intercept).se` c12hour c12hour.se
   <dbl> <list<df[> <list>         <dbl>            <dbl>   <dbl>      <dbl>
1      3 [306 × 25] <lm>           10.9             0.681 0.00372    0.00485
2      4 [304 × 25] <lm>           13.0             0.925 0.00824    0.00419
3      1  [66 × 25] <lm>           10.9             1.34  0.0128     0.0391 
4      2 [225 × 25] <lm>            8.27            0.786 0.0345     0.0151 
# … with 2 more variables: c172code <dbl>, c172code.se <dbl>
> 
> # select only specific model term. `se` and `p.val` default to `TRUE`
> spread_coef(model.data, models, c12hour)
# A tibble: 4 x 6
# Groups:   e42dep [4]
  e42dep            data models c12hour std.error p.value
   <dbl> <list<df[,25]>> <list>   <dbl>     <dbl>   <dbl>
1      3      [306 × 25] <lm>   0.00372   0.00485  0.443 
2      4      [304 × 25] <lm>   0.00824   0.00419  0.0502
3      1       [66 × 25] <lm>   0.0128    0.0391   0.745 
4      2      [225 × 25] <lm>   0.0345    0.0151   0.0237
> 
> # spread_coef can be used directly within a pipe-chain
> efc %>%
+   filter(!is.na(e42dep)) %>%
+   group_by(e42dep) %>%
+   nest() %>%
+   mutate(
+     models = map(data, ~lm(neg_c_7 ~ c12hour + c172code, data = .x))
+   ) %>%
+   spread_coef(models)
# A tibble: 4 x 6
# Groups:   e42dep [4]
  e42dep            data models `(Intercept)` c12hour c172code
   <dbl> <list<df[,25]>> <list>         <dbl>   <dbl>    <dbl>
1      3      [306 × 25] <lm>           10.9  0.00372   0.385 
2      4      [304 × 25] <lm>           13.0  0.00824   0.0491
3      1       [66 × 25] <lm>           10.9  0.0128   -1.00  
4      2      [225 × 25] <lm>            8.27 0.0345    0.770 
> 
> # spread_coef() makes it easy to generate bootstrapped
> # confidence intervals, using the 'bootstrap()' and 'boot_ci()'
> # functions from the 'sjstats' package, which creates nested
> # data frames of bootstrap replicates
> library(sjstats)
Error in library(sjstats) : there is no package called ‘sjstats’
Execution halted