* using log directory 'd:/RCompile/CRANincoming/R-devel/SafeVote.Rcheck' * using R Under development (unstable) (2024-10-01 r87205 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'SafeVote/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'SafeVote' version '1.0.1' * package encoding: UTF-8 * checking CRAN incoming feasibility ... [14s] NOTE Maintainer: 'Clark Thomborson ' Found the following (possibly) invalid URLs: URL: https://www.gdc.govt.nz/council/mayor-and-councillors/2022-local-elections/election-results (moved to https://www.gdc.govt.nz/council/mayor-and-councillors/Local-body-elections/2022-local-elections/election-results) From: man/gisborne2022.Rd Status: 301 Message: Moved Permanently URL: https://www.legislation.govt.nz/regulation/public/2001/0145/latest/DLM57125.html From: README.md Status: 403 Message: Forbidden URL: https://www.opavote.com/methods/cambridge-stv-rules (moved to https://opavote.com/methods/cambridge-stv-rules) From: README.md Status: 301 Message: Moved Permanently URL: https://www.yourcityelections.co.nz/assets/Uploads/Results-page/Hamilton-City-Council-Progress-results-for-the-2022-Election.pdf (moved to https://hamilton.govt.nz/electionsassets/Uploads/Results-page/Hamilton-City-Council-Progress-results-for-the-2022-Election.pdf) From: man/hamilton2022.Rd Status: 301 Message: Moved Permanently URL: https://www.yourcityelections.co.nz/results/ (moved to https://hamilton.govt.nz/electionsresults/) From: man/hamilton2022.Rd Status: 301 Message: Moved Permanently For content that is 'Moved Permanently', please change http to https, add trailing slashes, or replace the old by the new URL. The Date field is over a month old. * 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 ... WARNING Found the following file with a non-portable file name: SafeVote RJournal submission 2023-05-24.zip These are not fully portable file names. See section 'Package structure' in the 'Writing R Extensions' manual. * checking whether package 'SafeVote' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... NOTE Non-standard files/directories found at top level: 'SafeVote RJournal submission 2023-05-24.zip' 'analysis' 'article' 'initial_checks.log' * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code 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 ... NOTE Mismatches for apparent methods not registered: rbind: function(..., deparse.level) rbind.SafeRankExpt: function(object, row) See section 'Registering S3 methods' in the 'Writing R Extensions' manual. * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [12s] NOTE stv: no visible global function definition for 'View' view.SafeVote.score: no visible global function definition for 'view.SafeVote.approval' Undefined global functions or variables: View view.SafeVote.approval Consider adding importFrom("utils", "View") to your NAMESPACE file. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... WARNING Undocumented code objects: 'auckland2022' 'gisborne2022analysis' 'hamilton2022analysis' 'wellington2022analysis' Undocumented data sets: 'auckland2022' 'gisborne2022analysis' 'hamilton2022analysis' 'wellington2022analysis' All user-level objects in a package should have documentation entries. See chapter 'Writing R documentation files' in the 'Writing R Extensions' manual. * 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 examples ... ERROR Running examples in 'SafeVote-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: stv > ### Title: Count preferential ballots using an STV method > ### Aliases: stv > > ### ** Examples > > data(food_election) > stv(food_election, safety = 0.0) Error in check_screen_device("View()") : View() should not be used in examples etc Calls: stv -> View -> check_screen_device Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [17s] ERROR Running 'testthat.R' [17s] Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(SafeVote) > > test_check("SafeVote") Detected 29 invalid votes. Number of valid votes is 591 . Use invalid.votes(...) function to view discarded records. [ FAIL 6 | WARN 0 | SKIP 0 | PASS 0 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-stv-regress.R:3:3'): vote.stv defaults on food_election ──────── Error in `check_screen_device("View()")`: View() should not be used in examples etc Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-stv-regress.R:3:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─SafeVote::stv(food_election, backwards.compatible = TRUE) 5. └─utils::View(summary(result, digits = digits)) 6. └─utils:::check_screen_device("View()") ── Error ('test-stv-regress.R:11:3'): vote.stv defaults on ims_election ──────── Error in `check_screen_device("View()")`: View() should not be used in examples etc Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-stv-regress.R:11:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─SafeVote::stv(ims_election, backwards.compatible = TRUE) 5. └─utils::View(summary(result, digits = digits)) 6. └─utils:::check_screen_device("View()") ── Error ('test-stv-regress.R:19:3'): vote.stv defaults on dublin_west ───────── Error in `check_screen_device("View()")`: View() should not be used in examples etc Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-stv-regress.R:19:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─SafeVote::stv(dublin_west, backwards.compatible = TRUE) 5. └─utils::View(summary(result, digits = digits)) 6. └─utils:::check_screen_device("View()") ── Error ('test-stv-regress.R:27:3'): vote.stv on dublin_west with three seats ── Error in `check_screen_device("View()")`: View() should not be used in examples etc Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-stv-regress.R:27:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─SafeVote::stv(dublin_west, nseats = 3, backwards.compatible = TRUE) 5. └─utils::View(summary(result, digits = digits)) 6. └─utils:::check_screen_device("View()") ── Error ('test-stv-regress.R:43:3'): vote.stv on food_election with three seats and seed = 1234 ── Error in `check_screen_device("View()")`: View() should not be used in examples etc Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-stv-regress.R:43:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─SafeVote::stv(food_election, nseats = 3, seed = 1234, backwards.compatible = TRUE) 5. └─utils::View(summary(result, digits = digits)) 6. └─utils:::check_screen_device("View()") ── Error ('test-stv-regress.R:61:3'): stv.STV on yale_ballots with seed = 1234 ── Error in `check_screen_device("View()")`: View() should not be used in examples etc Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-stv-regress.R:61:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─SafeVote::stv(yale_ballots, nseats = 4, seed = 1234, quota.hare = TRUE) 5. └─utils::View(summary(result, digits = digits)) 6. └─utils:::check_screen_device("View()") [ FAIL 6 | WARN 0 | SKIP 0 | PASS 0 ] Error: Test failures Execution halted * checking PDF version of manual ... [27s] OK * checking HTML version of manual ... [12s] OK * DONE Status: 2 ERRORs, 2 WARNINGs, 4 NOTEs