CRAN Package Check Results for Package tsna

Last updated on 2025-12-06 00:49:05 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.3.6 6.19 208.80 214.99 OK
r-devel-linux-x86_64-debian-gcc 0.3.6 4.22 51.58 55.80 ERROR
r-devel-linux-x86_64-fedora-clang 0.3.6 31.00 302.60 333.60 OK
r-devel-linux-x86_64-fedora-gcc 0.3.6 12.00 310.47 322.47 OK
r-devel-windows-x86_64 0.3.6 8.00 173.00 181.00 OK --no-vignettes
r-patched-linux-x86_64 0.3.6 6.04 195.73 201.77 OK
r-release-linux-x86_64 0.3.6 6.26 197.66 203.92 OK
r-release-macos-arm64 0.3.6 OK
r-release-macos-x86_64 0.3.6 5.00 172.00 177.00 OK
r-release-windows-x86_64 0.3.6 8.00 130.00 138.00 OK --no-vignettes
r-oldrel-macos-arm64 0.3.6 OK
r-oldrel-macos-x86_64 0.3.6 6.00 177.00 183.00 OK
r-oldrel-windows-x86_64 0.3.6 11.00 215.00 226.00 OK --no-vignettes

Check Details

Version: 0.3.6
Check: package dependencies
Result: WARN Cannot process vignettes Packages suggested but not available for checking: 'knitr', 'rmarkdown', 'ergm' VignetteBuilder package required for checking but not installed: ‘knitr’ Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.3.6
Check: tests
Result: ERROR Running ‘degree_tests.R’ [4s/4s] Running ‘density_tests.R’ [2s/2s] Running ‘durations_tests.R’ [2s/2s] Running ‘fromDissTests.R’ [2s/2s] Running ‘pShift_tests.R’ [2s/2s] Running ‘path_tests.R’ [2s/2s] Running ‘reachable_tests.R’ [4s/4s] Running ‘statsWrapper_tests.R’ [3s/3s] Running ‘timeProjectedNetwork_tests.R’ [2s/2s] Running the tests in ‘tests/statsWrapper_tests.R’ failed. Complete output: > # tests for summary stats functions > library(tsna) Loading required package: network 'network' 1.19.0 (2024-12-08), part of the Statnet Project * 'news(package="network")' for changes since last version * 'citation("network")' for citation information * 'https://statnet.org' for help, support, and other information Loading required package: networkDynamic 'networkDynamic' 0.11.5 (2024-11-21), part of the Statnet Project * 'news(package="networkDynamic")' for changes since last version * 'citation("networkDynamic")' for citation information * 'https://statnet.org' for help, support, and other information > require(sna) Loading required package: sna Loading required package: statnet.common Attaching package: 'statnet.common' The following objects are masked from 'package:base': attr, order, replace sna: Tools for Social Network Analysis Version 2.8 created on 2024-09-07. copyright (c) 2005, Carter T. Butts, University of California-Irvine For citation information, type citation("sna"). Type help(package="sna") to get started. > require(testthat) Loading required package: testthat > > # ---- tests for tSnaStats ---- > > data(nd_test_nets) > data(moodyContactSim) > > test_that('tSnaStats output as expected',{ + + # vertex level measure + output<-tSnaStats(moodyContactSim,'degree') + + expect_true(is.ts(output)) + expect_equal(ncol(output),network.size(moodyContactSim)) + expect_equal(nrow(output),756) + + # graph level measure + output<-tSnaStats(moodyContactSim,'gden') + expect_equal(ncol(output),1) + expect_equal(nrow(output),756) + + # change sampling interval + output<-tSnaStats(moodyContactSim,'gden',time.interval=100) + expect_equal(ncol(output),1) + expect_equal(nrow(output),8) + + # check start and end values + expect_equal(attributes(tSnaStats(moodyContactSim,'gden',start=600,time.interval=50))$tsp,c(600.00, 750.00, 0.02)) + expect_equal(attributes(tSnaStats(moodyContactSim,'gden',end=600,time.interval=200))$tsp,c(40.000, 440.000, 0.005)) + + expect_error(tSnaStats(nd_test_nets[[1]],'degree'),regexp = "must be a object of class 'networkDynamic'") + + # error for non supported function + expect_error(tSnaStats(moodyContactSim,'foo'),regexp = 'not one of the sna package descriptive statistics currently supported') + + # test passing in function args (this would give error if FUN not passed in) + tSnaStats(moodyContactSim,'centralization',FUN='degree',time.interval = 100) + + # test aggregate dur + dyads<-network.dyadcount(moodyContactSim) + expect_equal(as.numeric(tSnaStats(moodyContactSim,'gden',start=0,end=400,time.interval = 100,aggregate.dur=100)),c(1/dyads,0,2/dyads,0,2/dyads)) + # this one should miss all the edges + expect_equal(as.numeric(tSnaStats(moodyContactSim,'gden',start=0,end=400,time.interval = 100,aggregate.dur=0)), c(0,0,0,0,0)) + + }) Test passed with 13 successes 🎊. > > > > supported_sna_funs <-c('components', + 'triad.census', + 'connectedness', + 'dyad.census', + 'efficiency', + 'gden', + 'hierarchy', + 'lubness', + 'mutuality', + # 'centralization', leaving off centralization because it requirs additional args + 'closeness', + 'betweenness', + #'bonpow', hidden because has singular value problems + 'degree', + 'evcent', + 'flowbet', + 'graphcent', + 'infocent', + 'loadcent', + 'prestige') > > > # chec > > # test_that('all sna stats used by tSnaStats can be called',{ > # # CRAN reports that one of the functions is erroring with OpenBLAS > # # I haven't been able to reproduce to isolate the function, so disabling these tests on cran > # # SKIP_ON_CRAN NOT WORKING, NEED TO UNCOMMENT AND RUN MANUALLY > # skip_on_cran() > # for (funName in supported_sna_funs){ > # message('testing ',funName) > # tSnaStats(moodyContactSim,funName,start=600,time.interval=50) > # } > # > # }) > > > # code below used to find which edge cases cause errors > # run tests against all the networkDynamic edge case networks > # reports, but does not trigger errors and warnings (because some of them will give errors) > # for(n in 1:length(nd_test_nets)){ > # for (funName in supported_sna_funs){ > # cat('testing net',n,' (',names(nd_test_nets)[n],') with term ',funName, '\n') > # # run in tryCacth block so can report all the errors at once > # tryCatch( > # { > # tSnaStats(nd_test_nets[[n]],funName) > # }, > # warning = function(w){ > # message("\t",w) > # }, > # error = function(e){ > # message("\t",e) > # } > # ) # end try catch > # cat("\n") > # } > # } > > > # ---- tests for tErgmStats ---- > require(ergm) Loading required package: ergm Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called 'ergm' > > test_that('tSnaStats output as expected',{ + + output<-tErgmStats(moodyContactSim,'~edges') + + expect_true(is.ts(output)) + expect_equal(ncol(output),1) + expect_equal(nrow(output),756) + + + output<-tErgmStats(moodyContactSim,'~degree(0:3)') + expect_equal(ncol(output),4) + expect_equal(nrow(output),756) + + # change sampling interval + output<-tErgmStats(moodyContactSim,'~edges',time.interval=100) + expect_equal(ncol(output),1) + expect_equal(nrow(output),8) + + # check start and end values + expect_equal(attributes(tErgmStats(moodyContactSim,'~edges',start=600,time.interval=50))$tsp,c(600.00, 750.00, 0.02)) + expect_equal(attributes(tErgmStats(moodyContactSim,'~edges',end=600,time.interval=200))$tsp,c(40.000, 440.000, 0.005)) + + expect_error(tErgmStats(nd_test_nets[[1]],'edges'),regexp = "must be a object of class 'networkDynamic'") + + expect_error(tErgmStats(as.networkDynamic(network.initialize(3,hyper=TRUE)),'edges'),regexp = "not appropriate for hypergraphic networks") + + expect_error(tErgmStats(as.networkDynamic(network.initialize(3,multi=TRUE)),'edges'),regexp = "not appropriate for multiplex networks") + + # check that it will add '~' in front if ommited + tErgmStats(moodyContactSim,'edges',time.interval=200) + + # error for non supported function + expect_error(tErgmStats(moodyContactSim,'foo'),regexp = 'ERGM term .+ not found.') + + # test aggregate dur + expect_equal(as.numeric(tErgmStats(moodyContactSim,'edges',time.interval = 100)),c(1,0,2,0,0,0,2,1)) + expect_equal(as.numeric(tErgmStats(moodyContactSim,'edges',time.interval = 100,aggregate.dur=100)),c(1,2,2,0,2,4,8,4)) + + }) ── Error: tSnaStats output as expected ───────────────────────────────────────── <packageNotFoundError/error/condition> Error in `loadNamespace(x)`: there is no package called 'ergm' Backtrace: ▆ 1. ├─tsna::tErgmStats(moodyContactSim, "~edges") 2. │ └─base::lapply(...) 3. │ └─tsna (local) FUN(X[[i]], ...) 4. └─base::loadNamespace(x) 5. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 6. └─base (local) withOneRestart(expr, restarts[[1L]]) 7. └─base (local) doWithOneRestart(return(expr), restart) Error: ! Test failed with 1 failure and 0 successes. Backtrace: ▆ 1. └─testthat::test_that(...) 2. └─testthat:::test_code(code, parent.frame()) 3. ├─withr (local) `<fn>`() 4. └─reporter$end_test(context = reporter$.context, test = test) 5. └─cli::cli_abort(...) 6. └─rlang::abort(...) Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.3.6
Check: package vignettes
Result: NOTE Package has ‘vignettes’ subdirectory but apparently no vignettes. Perhaps the ‘VignetteBuilder’ information is missing from the DESCRIPTION file? Flavor: r-devel-linux-x86_64-debian-gcc