* using log directory 'd:/RCompile/CRANincoming/R-devel/svrep.Rcheck' * using R Under development (unstable) (2023-09-07 r85102 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 12.2.0 GNU Fortran (GCC) 12.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'svrep/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'svrep' version '0.6.2' * package encoding: UTF-8 * checking CRAN incoming feasibility ... [93s] NOTE Maintainer: 'Ben Schneider ' Found the following (possibly) invalid URLs: URL: https://www.census.gov/programs-surveys/acs/ From: inst/doc/two-phase-sampling.html Status: Error Message: Operation timed out after 60010 milliseconds with 0 bytes received URL: https://www.nsf.gov/statistics/srvygrads From: inst/doc/two-phase-sampling.html Status: Error Message: Could not resolve host: ncses.nsf.gov URL: https://www150.statcan.gc.ca/n1/pub/12-001-x/12-001-x2014001-eng.pdf From: inst/doc/bootstrap-replicates.html Status: Error Message: Operation timed out after 60009 milliseconds with 0 bytes received URL: https://www150.statcan.gc.ca/n1/pub/12-001-x/2021002/article/00006-eng.htm From: DESCRIPTION man/svrep-package.Rd Status: Error Message: Operation timed out after 60009 milliseconds with 0 bytes received * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking serialization versions ... OK * checking whether package 'svrep' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [17s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... ERROR Running examples in 'svrep-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: make_fays_gen_rep_factors > ### Title: Form replication factors using Fay's generalized replication > ### method > ### Aliases: make_fays_gen_rep_factors > > ### ** Examples > > library(survey) Loading required package: grid Loading required package: Matrix Loading required package: survival Attaching package: 'survey' The following object is masked from 'package:graphics': dotchart > > # Load an example dataset that uses unequal probability sampling ---- > data('election', package = 'survey') > > # Create matrix to represent the Horvitz-Thompson estimator as a quadratic form ---- > n <- nrow(election_pps) > pi <- election_jointprob > horvitz_thompson_matrix <- matrix(nrow = n, ncol = n) > for (i in seq_len(n)) { + for (j in seq_len(n)) { + horvitz_thompson_matrix[i,j] <- 1 - (pi[i,i] * pi[j,j])/pi[i,j] + } + } > > ## Equivalently: > > horvitz_thompson_matrix <- make_quad_form_matrix( + variance_estimator = "Horvitz-Thompson", + joint_probs = election_jointprob + ) > > # Make generalized replication adjustment factors ---- > > adjustment_factors <- make_fays_gen_rep_factors( + Sigma = horvitz_thompson_matrix, + max_replicates = 50 + ) > attr(adjustment_factors, 'scale') [1] 1 > > # Compute the Horvitz-Thompson estimate and the replication estimate > > ht_estimate <- svydesign(data = election_pps, ids = ~ 1, + prob = diag(election_jointprob), + pps = ppsmat(election_jointprob)) |> + svytotal(x = ~ Kerry) Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'as.matrix': 'crossprod' is not an exported object from 'namespace:Matrix' Calls: svytotal ... apply -> FUN -> as.matrix -> .handleSimpleError -> h Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [32s] ERROR Running 'testthat.R' [32s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(svrep) > > test_check("svrep") [ FAIL 3 | WARN 0 | SKIP 0 | PASS 181 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-generalized-bootstrap.R:338:7'): `exact_vcov = TRUE` gives exact variance estimate for totals ── Error in `h(simpleError(msg, call))`: 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. ├─stats::vcov(svytotal(pps_design_yg, x = ~Bush + Kerry)) at test-generalized-bootstrap.R:338:6 2. ├─survey::svytotal(pps_design_yg, x = ~Bush + Kerry) 3. ├─survey:::svytotal.pps(pps_design_yg, x = ~Bush + Kerry) 4. │ └─survey:::ppsvar(x/design$prob, design) 5. │ └─survey:::ygvar.matrix(...) 6. │ └─survey:::htvar.matrix(xcheck, Dcheck) 7. │ └─base::apply(...) 8. │ └─survey (local) FUN(newX[, i], ...) 9. │ └─base::apply(...) 10. │ └─survey (local) FUN(newX[, i], ...) 11. │ └─base::as.matrix(Matrix::crossprod(xicheck, Dcheck %*% xjcheck)) 12. └─base::.handleSimpleError(...) 13. └─base (local) h(simpleError(msg, call)) ── Error ('test-generalized-bootstrap.R:380:7'): Bootstrap estimate with many replicates close to expected value ── Error in `h(simpleError(msg, call))`: 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. ├─stats::vcov(svytotal(x = ~Bush, design = pps_design_yg)) at test-generalized-bootstrap.R:380:6 2. ├─survey::svytotal(x = ~Bush, design = pps_design_yg) 3. ├─survey:::svytotal.pps(x = ~Bush, design = pps_design_yg) 4. │ └─survey:::ppsvar(x/design$prob, design) 5. │ └─survey:::ygvar.matrix(...) 6. │ └─survey:::htvar.matrix(xcheck, Dcheck) 7. │ └─base::apply(...) 8. │ └─survey (local) FUN(newX[, i], ...) 9. │ └─base::apply(...) 10. │ └─survey (local) FUN(newX[, i], ...) 11. │ └─base::as.matrix(Matrix::crossprod(xicheck, Dcheck %*% xjcheck)) 12. └─base::.handleSimpleError(...) 13. └─base (local) h(simpleError(msg, call)) ── Error ('test-quadratic-forms.R:169:3'): (code run outside of `test_that()`) ── Error in `h(simpleError(msg, call))`: 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. ├─stats::vcov(...) at test-quadratic-forms.R:169:2 2. ├─survey::svytotal(...) 3. ├─survey:::svytotal.pps(...) 4. │ └─survey:::ppsvar(x/design$prob, design) 5. │ └─survey:::htvar.matrix(...) 6. │ └─base::apply(...) 7. │ └─survey (local) FUN(newX[, i], ...) 8. │ └─base::apply(...) 9. │ └─survey (local) FUN(newX[, i], ...) 10. │ └─base::as.matrix(Matrix::crossprod(xicheck, Dcheck %*% xjcheck)) 11. └─base::.handleSimpleError(...) 12. └─base (local) h(simpleError(msg, call)) [ FAIL 3 | WARN 0 | SKIP 0 | PASS 181 ] Error: Test failures In addition: Warning message: call dbDisconnect() when finished working with a connection Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [48s] ERROR Error(s) in re-building vignettes: --- re-building 'bootstrap-replicates.Rmd' using rmarkdown Quitting from lines 123-135 [unnamed-chunk-3] (bootstrap-replicates.Rmd) Error: processing vignette 'bootstrap-replicates.Rmd' failed with diagnostics: error in evaluating the argument 'x' in selecting a method for function 'as.matrix': 'crossprod' is not an exported object from 'namespace:Matrix' --- failed re-building 'bootstrap-replicates.Rmd' --- re-building 'nonresponse-adjustments.Rmd' using rmarkdown --- finished re-building 'nonresponse-adjustments.Rmd' --- re-building 'sample-based-calibration.Rmd' using rmarkdown --- finished re-building 'sample-based-calibration.Rmd' --- re-building 'two-phase-sampling.Rmd' using rmarkdown --- finished re-building 'two-phase-sampling.Rmd' SUMMARY: processing the following file failed: 'bootstrap-replicates.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... [30s] OK * checking HTML version of manual ... OK * DONE Status: 3 ERRORs, 1 NOTE