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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: as_survey_twophase
> ### Title: Create a tbl_svy survey object using two phase design
> ### Aliases: as_survey_twophase as_survey_twophase.data.frame
> ###   as_survey_twophase.twophase2
> 
> ### ** Examples
> 
> # Examples from ?survey::twophase
> # two-phase simple random sampling.
> data(pbc, package="survival")
> 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

> 
> pbc <- pbc %>%
+   mutate(randomized = !is.na(trt) & trt > 0,
+          id = row_number())
> d2pbc <- pbc %>%
+   as_survey_twophase(id = list(id, id), subset = randomized)
> 
> d2pbc %>% summarize(mean = survey_mean(bili))
Error in `dplyr::summarise()`:
ℹ In argument: `mean = survey_mean(bili)`.
Caused by error in `h()`:
! error in evaluating the argument 'x' in selecting a method for function 'as.matrix': 'crossprod' is not an exported object from 'namespace:Matrix'
Backtrace:
     ▆
  1. ├─d2pbc %>% summarize(mean = survey_mean(bili))
  2. ├─dplyr::summarize(., mean = survey_mean(bili))
  3. ├─srvyr:::summarise.tbl_svy(., mean = survey_mean(bili))
  4. │ ├─dplyr::summarise(.data$variables, ..., .groups = .groups)
  5. │ └─dplyr:::summarise.data.frame(.data$variables, ..., .groups = .groups)
  6. │   └─dplyr:::summarise_cols(.data, dplyr_quosures(...), by, "summarise")
  7. │     ├─base::withCallingHandlers(...)
  8. │     └─dplyr:::map(quosures, summarise_eval_one, mask = mask)
  9. │       └─base::lapply(.x, .f, ...)
 10. │         └─dplyr (local) FUN(X[[i]], ...)
 11. │           └─mask$eval_all_summarise(quo)
 12. │             └─dplyr (local) eval()
 13. ├─srvyr::survey_mean(bili)
 14. │ ├─survey::svymean(~`__SRVYR_TEMP_VAR__`, .svy, na.rm = na.rm, deff = deff)
 15. │ └─survey:::svymean.twophase2(...)
 16. │   └─survey::twophase2var(x * pweights/psum, design)
 17. │     └─survey:::htvar.matrix(x, design$dcheck$full)
 18. │       └─base::apply(...)
 19. │         └─survey (local) FUN(newX[, i], ...)
 20. │           └─base::apply(...)
 21. │             └─survey (local) FUN(newX[, i], ...)
 22. │               └─base::as.matrix(Matrix::crossprod(xicheck, Dcheck %*% xjcheck))
 23. ├─base::.handleSimpleError(...)
 24. │ └─base (local) h(simpleError(msg, call))
 25. └─base::.handleSimpleError(...)
 26.   └─dplyr (local) h(simpleError(msg, call))
 27.     └─dplyr (local) handler(cnd)
 28.       └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
Execution halted