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

> ### Name: fit.simpr_tibble
> ### Title: Fit models to the simulated data
> ### Aliases: fit.simpr_tibble fit.simpr_spec
> 
> ### ** Examples
> 
> ## Generate data to fit models
> simple_linear_data = specify(a = ~ 2 + rnorm(n),
+                                b = ~ 5 + 3*a + rnorm(n, 0, sd = 0.5)) %>%
+   define(n = 100:101) %>%
+   generate(2)
> 
> ## Fit with a single linear term
> linear_fit = simple_linear_data %>%
+   fit(linear = ~lm(b ~ a, data = .))
> 
> linear_fit # first fit element also prints
full tibble
--------------------------
# A tibble: 4 × 5
  .sim_id     n   rep sim                linear
    <int> <int> <int> <list>             <list>
1       1   100     1 <tibble [100 × 2]> <lm>  
2       2   101     1 <tibble [101 × 2]> <lm>  
3       3   100     2 <tibble [100 × 2]> <lm>  
4       4   101     2 <tibble [101 × 2]> <lm>  

sim[[1]]
--------------------------
# A tibble: 100 × 2
       a     b
   <dbl> <dbl>
 1 1.82  10.5 
 2 3.06  14.7 
 3 4.65  19.4 
 4 2.30  11.5 
 5 3.47  15.5 
 6 1.74   9.84
 7 1.51   9.77
 8 0.750  7.28
 9 2.47  12.4 
10 2.29  11.8 
# ℹ 90 more rows

linear[[1]]
--------------------------

Call:
lm(formula = b ~ a, data = .)

Coefficients:
(Intercept)            a  
      5.044        2.986  


> 
> ## Each element of $linear is a model object
> linear_fit$linear
[[1]]

Call:
lm(formula = b ~ a, data = .)

Coefficients:
(Intercept)            a  
      5.044        2.986  


[[2]]

Call:
lm(formula = b ~ a, data = .)

Coefficients:
(Intercept)            a  
      5.038        2.980  


[[3]]

Call:
lm(formula = b ~ a, data = .)

Coefficients:
(Intercept)            a  
      4.945        3.064  


[[4]]

Call:
lm(formula = b ~ a, data = .)

Coefficients:
(Intercept)            a  
      4.929        3.035  


> 
> ## We can fit multiple models to the same data
> multi_fit = simple_linear_data %>%
+   fit(linear = ~lm(b ~ a, data = .),
+       quadratic = ~lm(b ~ a + I(a^2), data = .))
> 
> ## Two columns, one for each model
> multi_fit
full tibble
--------------------------
# A tibble: 4 × 6
  .sim_id     n   rep sim                linear quadratic
    <int> <int> <int> <list>             <list> <list>   
1       1   100     1 <tibble [100 × 2]> <lm>   <lm>     
2       2   101     1 <tibble [101 × 2]> <lm>   <lm>     
3       3   100     2 <tibble [100 × 2]> <lm>   <lm>     
4       4   101     2 <tibble [101 × 2]> <lm>   <lm>     

sim[[1]]
--------------------------
# A tibble: 100 × 2
       a     b
   <dbl> <dbl>
 1 1.82  10.5 
 2 3.06  14.7 
 3 4.65  19.4 
 4 2.30  11.5 
 5 3.47  15.5 
 6 1.74   9.84
 7 1.51   9.77
 8 0.750  7.28
 9 2.47  12.4 
10 2.29  11.8 
# ℹ 90 more rows

linear[[1]]
--------------------------

Call:
lm(formula = b ~ a, data = .)

Coefficients:
(Intercept)            a  
      5.044        2.986  


quadratic[[1]]
--------------------------

Call:
lm(formula = b ~ a + I(a^2), data = .)

Coefficients:
(Intercept)            a       I(a^2)  
   5.055689     2.972430     0.003048  


> 
> ## Again, each element is a model object
> multi_fit$quadratic
[[1]]

Call:
lm(formula = b ~ a + I(a^2), data = .)

Coefficients:
(Intercept)            a       I(a^2)  
   5.055689     2.972430     0.003048  


[[2]]

Call:
lm(formula = b ~ a + I(a^2), data = .)

Coefficients:
(Intercept)            a       I(a^2)  
    4.95366      3.10635     -0.03204  


[[3]]

Call:
lm(formula = b ~ a + I(a^2), data = .)

Coefficients:
(Intercept)            a       I(a^2)  
   4.924078     3.096395    -0.008465  


[[4]]

Call:
lm(formula = b ~ a + I(a^2), data = .)

Coefficients:
(Intercept)            a       I(a^2)  
   4.898686     3.071379    -0.008416  


> 
> ## Can view terms more nicely with tidy_fits
> multi_fit %>%
+   tidy_fits
# A tibble: 20 × 9
   .sim_id     n   rep Source    term      estimate std.error statistic  p.value
     <int> <int> <int> <chr>     <chr>        <dbl>     <dbl>     <dbl>    <dbl>
 1       1   100     1 linear    (Interce…  5.04       0.119    42.3    1.02e-64
 2       1   100     1 linear    a          2.99       0.0510   58.6    4.53e-78
 3       1   100     1 quadratic (Interce…  5.06       0.207    24.4    3.90e-43
 4       1   100     1 quadratic a          2.97       0.198    15.0    4.14e-27
 5       1   100     1 quadratic I(a^2)     0.00305    0.0428    0.0713 9.43e- 1
 6       2   101     1 linear    (Interce…  5.04       0.112    44.9    1.19e-67
 7       2   101     1 linear    a          2.98       0.0492   60.5    5.13e-80
 8       2   101     1 quadratic (Interce…  4.95       0.142    34.8    5.87e-57
 9       2   101     1 quadratic a          3.11       0.140    22.1    6.20e-40
10       2   101     1 quadratic I(a^2)    -0.0320     0.0333   -0.962  3.38e- 1
11       3   100     2 linear    (Interce…  4.94       0.0959   51.6    7.94e-73
12       3   100     2 linear    a          3.06       0.0425   72.2    9.14e-87
13       3   100     2 quadratic (Interce…  4.92       0.132    37.4    1.99e-59
14       3   100     2 quadratic a          3.10       0.147    21.1    5.49e-38
15       3   100     2 quadratic I(a^2)    -0.00846    0.0368   -0.230  8.18e- 1
16       4   101     2 linear    (Interce…  4.93       0.114    43.3    3.59e-66
17       4   101     2 linear    a          3.03       0.0513   59.2    4.24e-79
18       4   101     2 quadratic (Interce…  4.90       0.177    27.7    3.80e-48
19       4   101     2 quadratic a          3.07       0.169    18.2    3.50e-33
20       4   101     2 quadratic I(a^2)    -0.00842    0.0370   -0.228  8.20e- 1
> 
> ## Can view model summaries with glance_fits
> multi_fit %>%
+   glance_fits
Error in `map()`:
ℹ In index: 1.
ℹ With name: linear.
Caused by error:
ℹ In index: 1.
ℹ With name: 1.
Caused by error in `ll()`:
! could not find function "ll"
Backtrace:
     ▆
  1. ├─multi_fit %>% glance_fits
  2. ├─simpr::glance_fits(.)
  3. │ ├─simpr::apply_fits(...)
  4. │ └─simpr:::apply_fits.simpr_tibble(...)
  5. │   └─purrr::map_dfr(...)
  6. │     └─purrr::map(.x, .f, ...)
  7. │       └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
  8. │         ├─purrr:::with_indexed_errors(...)
  9. │         │ └─base::withCallingHandlers(...)
 10. │         ├─purrr:::call_with_cleanup(...)
 11. │         └─simpr (local) .f(.x[[i]], ...)
 12. │           └─furrr::future_map_dfr(...)
 13. │             └─furrr::future_map(...)
 14. │               └─furrr:::furrr_map_template(...)
 15. │                 └─furrr:::furrr_template(...)
 16. │                   └─future::future(...)
 17. │                     ├─future::run(future)
 18. │                     └─future:::run.Future(future)
 19. │                       ├─base::tryCatch(...)
 20. │                       │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 21. │                       │   ├─base (local) tryCatchOne(...)
 22. │                       │   │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 23. │                       │   └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
 24. │                       │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 25. │                       │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 26. │                       ├─future::launchFuture(backend, future = future)
 27. │                       └─future:::launchFuture.SequentialFutureBackend(backend, future = future)
 28. │                         └─future:::evalFuture(data)
 29. │                           ├─base::tryCatch(...)
 30. │                           │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 31. │                           │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 32. │                           │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 33. │                           └─future:::evalFutureInternal(data)
 34. │                             ├─base::tryCatch(...)
 35. │                             │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 36. │                             │   ├─base (local) tryCatchOne(...)
 37. │                             │   │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 38. │                             │   └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
 39. │                             │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 40. │                             │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
 41. │                             ├─base::tryCatch(...)
 42. │                             │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 43. │                             ├─base::withCallingHandlers(...)
 44. │                             ├─base::withVisible(...)
 45. │                             └─base::eval(expr, envir = globalenv())
 46. │                               └─base::eval(expr, envir = globalenv())
 47. ├─base::local(...)
 48. │ └─base::eval.parent(substitute(eval(quote(expr), envir)))
 49. │   └─base::eval(expr, p)
 50. │     └─base::eval(expr, p)
 51. ├─base::eval(...)
 52. │ └─base::eval(...)
 53. │   ├─base::do.call(...furrr_map_fn, args)
 54. │   └─purrr (local) `<fn>`(.x = `<named list>`, .f = `<fn>`)
 55. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
 56. │       ├─purrr:::with_indexed_errors(...)
 57. │       │ └─base::withCallingHandlers(...)
 58. │       ├─purrr:::call_with_cleanup(...)
 59. │       └─.f(.x[[i]], ...)
 60. │         └─simpr (local) ...furrr_fn(...)
 61. │           ├─tibble::as_tibble((purrr::as_mapper(.f))(...))
 62. │           ├─(purrr::as_mapper(.f))(...)
 63. │           └─broom:::glance.lm(...)
 64. │             ├─base::with(...)
 65. │             └─base::with.default(...)
 66. │               └─base::eval(substitute(expr), data, enclos = parent.frame())
 67. │                 └─base::eval(substitute(expr), data, enclos = parent.frame())
 68. │                   └─tibble::tibble(...)
 69. │                     └─tibble:::tibble_quos(xs, .rows, .name_repair)
 70. │                       └─rlang::eval_tidy(xs[[j]], mask)
 71. ├─stats::AIC(x)
 72. ├─stats:::AIC.default(x)
 73. └─base::.handleSimpleError(...)
 74.   └─purrr (local) h(simpleError(msg, call))
 75.     └─cli::cli_abort(...)
 76.       └─rlang::abort(...)
Execution halted