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(tidyr)

Attaching package: ‘tidyr’

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

    replace_na

> 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

> 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 = lapply(data, function(x) {
+     lm(neg_c_7 ~ c12hour + c172code, data = x)
+   }))
> 
> # spread coefficients, so we can easily access and compare
> # the coefficients over all models
> spread_coef(model.data, models)
# A tibble: 4 × 6
  e42dep                data   models `(Intercept)`     c12hour    c172code
   <dbl>              <list>   <list>         <dbl>       <dbl>       <dbl>
1      3 <tibble [306 × 25]> <S3: lm>      10.89687 0.003720769  0.38545070
2      4 <tibble [304 × 25]> <S3: lm>      12.96112 0.008242511  0.04913521
3      1  <tibble [66 × 25]> <S3: lm>      10.92300 0.012767707 -1.00230234
4      2 <tibble [225 × 25]> <S3: lm>       8.27386 0.034491212  0.77048799
> 
> # select only specific model term
> spread_coef(model.data, models, c12hour)
# A tibble: 4 × 5
  e42dep                data   models     c12hour    p.value
   <dbl>              <list>   <list>       <dbl>      <dbl>
1      3 <tibble [306 × 25]> <S3: lm> 0.003720769 0.44346509
2      4 <tibble [304 × 25]> <S3: lm> 0.008242511 0.05018754
3      1  <tibble [66 × 25]> <S3: lm> 0.012767707 0.74491576
4      2 <tibble [225 × 25]> <S3: lm> 0.034491212 0.02368250
> 
> # spread_coef can be used directly within a pipe-chain
> efc %>%
+   filter(!is.na(e42dep)) %>%
+   group_by(e42dep) %>%
+   nest() %>%
+   mutate(models = lapply(data, function(x) {
+     lm(neg_c_7 ~ c12hour + c172code, data = x)
+   })) %>%
+   spread_coef(models)
# A tibble: 4 × 6
  e42dep                data   models `(Intercept)`     c12hour    c172code
   <dbl>              <list>   <list>         <dbl>       <dbl>       <dbl>
1      3 <tibble [306 × 25]> <S3: lm>      10.89687 0.003720769  0.38545070
2      4 <tibble [304 × 25]> <S3: lm>      12.96112 0.008242511  0.04913521
3      1  <tibble [66 × 25]> <S3: lm>      10.92300 0.012767707 -1.00230234
4      2 <tibble [225 × 25]> <S3: lm>       8.27386 0.034491212  0.77048799
> 
> # 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(dplyr)
> library(sjstats)
Error in library(sjstats) : there is no package called ‘sjstats’
Execution halted