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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: zfunction
> ### Title: Create a pipe-friendly version of a function
> ### Aliases: zfunction zfold zfitter
> 
> ### ** Examples
> 
> # A a grep function with x as first param is often useful
> zgrep <- zfunction(grep, x)
> carnames <- rownames(mtcars)
> grep("ll", carnames, value=TRUE)
[1] "Cadillac Fleetwood" "Toyota Corolla"     "Dodge Challenger"  
> zgrep(carnames, "ll", value=TRUE)
[1] "Cadillac Fleetwood" "Toyota Corolla"     "Dodge Challenger"  
> 
> # zfunction() is the best approach to wrapping functions such as
> # `pls::plsr()` that hide the data parameter behind the `...`.
> if (requireNamespace("pls")) {
+   zplsr <- zfunction(pls::plsr, data, x_not_found = "ok")
+   zplsr(cars, dist ~ speed)
+ }
Partial least squares regression, fitted with the kernel algorithm.
Call:
plsr(formula = dist ~ speed, data = cars)
> 
> # Curly {x} handling: These are all equivalent
> param_name <- "to";
> f1 <- zfunction(file.rename, to)
> f2 <- zfunction(file.rename, "to")
> f3 <- zfunction(file.rename, {param_name})
> 
> # Using zfold() to create a grep() wrapper with the desired arg order
> zgrep <- zfold(grep, x)
> carnames <- rownames(mtcars)
> grep("ll", carnames, value=TRUE)
[1] "Cadillac Fleetwood" "Toyota Corolla"     "Dodge Challenger"  
> zgrep(carnames, "ll", value=TRUE)
[1] "Cadillac Fleetwood" "Toyota Corolla"     "Dodge Challenger"  
> 
> # Using zfitter to wrap around a fitting function
> # (this is the actual way zlm_robust is defined in this package)
> if (requireNamespace("estimatr", quietly = TRUE)) {
+   zlm_robust <- zfitter(estimatr::lm_robust)
+   zlm_robust(cars, speed~dist)
+ 
+   # The resulting function works well the native pipe ...
+   if ( getRversion() >= "4.1.0" ) {
+     cars |> zlm_robust( speed ~ dist )
+   }
+ }
> 
> # ... or with dplyr
> if ( require("dplyr", warn.conflicts=FALSE) ) {
+ 
+   # Pipe cars dataset into zlm_robust for fitting
+   cars %>% zlm_robust( speed ~ dist )
+ 
+   # Process iris with filter() before piping. Print a summary()
+   # of the fitted model using zprint() before assigning the
+   # model itself (not the summary) to m.
+   m <- iris %>%
+     dplyr::filter(Species=="setosa") %>%
+     zlm_robust(Sepal.Length ~ Sepal.Width + Petal.Width) %>%
+     zprint(summary)
+ }
Loading required package: dplyr
Error in zlm_robust(., speed ~ dist) : 
  'zlm_robust()' requires the 'estimatr' package.
  Install with install.packages("estimatr") and restart R.
Calls: %>% -> zlm_robust
Execution halted