* using log directory ‘/srv/hornik/tmp/CRAN_pretest/REDCapExporter.Rcheck’ * using R Under development (unstable) (2024-09-18 r87177) * using platform: x86_64-pc-linux-gnu * R was compiled by Debian clang version 18.1.8 (9) Debian flang-new version 18.1.8 (9) * running under: Debian GNU/Linux trixie/sid * using session charset: UTF-8 * checking for file ‘REDCapExporter/DESCRIPTION’ ... OK * this is package ‘REDCapExporter’ version ‘0.3.0’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... [4s/6s] INFO Maintainer: ‘Peter DeWitt ’ * 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘REDCapExporter’ can be installed ... [1s/1s] 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 code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [0s/0s] OK * checking whether the package can be loaded with stated dependencies ... [0s/0s] OK * checking whether the package can be unloaded cleanly ... [0s/0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK * checking whether the namespace can be unloaded cleanly ... [0s/0s] OK * checking loading without being on the library search path ... [0s/0s] OK * checking whether startup messages can be suppressed ... [0s/0s] 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 ... [2s/2s] OK * checking Rd files ... [0s/0s] 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 ... [0s/0s] 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 ... [2s/2s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... [3s/6s] ERROR Running ‘test-as.data.frame.R’ [0s/0s] Running ‘test-build_r_pkg.R’ [1s/1s] Running ‘test-export.R’ [0s/4s] Running ‘test-format_record.R’ [0s/0s] Running ‘test-keyring.R’ [0s/0s] Running the tests in ‘tests/test-format_record.R’ failed. Complete output: > library(REDCapExporter) > > # formatting the from the core > > DF <- format_record(avs_raw_core) > classes <- + c(record_id = "character", + uniform_number = "character", + firstname = "character", + lastname = "character", + hof = "integer", + nationality = "character", + position = "factor", + birthdate = "Date", + first_nhl_game = "Date", + last_nhl_game = "Date", + height = "integer", + weight = "integer", + shoots = "factor", + catches = "factor", + experience = "integer", + roster_complete = "factor", + gp = "integer", + goals = "integer", + assists = "integer", + points = "numeric", + plusmn = "integer", + pimi = "integer", + goals_ev = "integer", + goals_pp = "integer", + goals_sh = "integer", + goals_gw = "integer", + assists_ev = "integer", + assists_pp = "integer", + assists_sh = "integer", + shots = "integer", + shooting_percentage = "numeric", + toi = "integer", + atoi = "Period", + regular_season_scoring_complete = "factor", + wins = "integer", + losses = "integer", + ties_otl = "integer", + goals_against = "integer", + shots_against = "integer", + saves = "integer", + save_percentage = "numeric", + gaa = "numeric", + so = "integer", + regular_season_goalies_complete = "factor", + gp_postseason = "integer", + goals_postseason = "integer", + assists_postseason = "integer", + points_postseason = "numeric", + plusmn_postseason = "integer", + pimi_postseason = "integer", + goals_ev_postseason = "integer", + goals_pp_postseason = "integer", + goals_sh_postseason = "integer", + goals_gw_postseason = "integer", + assists_ev_postseason = "integer", + assists_pp_postseason = "integer", + assists_sh_postseason = "integer", + shots_postseason = "integer", + shooting_percentage_postseason = "numeric", + toi_postseason = "integer", + atoi_postseason = "Period", + post_season_scoring_complete = "factor", + wins_postseason = "integer", + losses_postseason = "integer", + ties_otl_postseason = "integer", + goals_allowed_postseason = "integer", + saves_postseason = "integer", + save_percentage_postseason = "numeric", + gaa_postseason = "numeric", + so_postseason = "integer", + post_season_goalies_complete = "factor", + eg_checkbox___cb01 = "integer", + eg_checkbox___cb02 = "integer", + eg_checkbox___cb03 = "integer", + extras_complete = "factor" + ) > > stopifnot(identical(sapply(DF, class), classes)) > > # verify that the same result comes from calls with the same information but > # different sets of arguments > DF2 <- format_record(avs_raw_record, avs_raw_metadata) > DF3 <- format_record(avs_raw_record, col_type = col_type(avs_raw_metadata)) > stopifnot(identical(DF, DF2)) > stopifnot(identical(DF, DF3)) > > # expect an error if the project info is passed to format record > DF <- tryCatch(format_record(avs_raw_project), error = function(e) e) > stopifnot(inherits(DF, 'error')) > > # expect an error when only the record is passed in > DF <- tryCatch(format_record(avs_raw_record), error = function(e) e) > stopifnot(inherits(DF, 'error')) > > # expect an error when metadata is used without col_type and the metadata is not > # the correct class > DF <- tryCatch(format_record(avs_raw_record, metadata = avs_raw_core) + , error = function(e) e) > stopifnot(inherits(DF, 'error')) > > # expected and error when col_type is not null and an incorrect type > DF <- tryCatch(format_record(avs_raw_record, col_type = avs_raw_metadata), error = function(e) e) > stopifnot(inherits(DF, 'error')) > > # expected and error when col_type is not null and an incorrect type even when > # meta data is provided and is correct > DF <- tryCatch(format_record(avs_raw_record, metadata = avs_raw_metadata, col_type = avs_raw_metadata), error = function(e) e) Ignoring metadata, using col_type > stopifnot(inherits(DF, 'error')) > > # verify that col_type(factors = FALSE) will return characters instead of > # factors > DF <- format_record(avs_raw_core, col_type = col_type(avs_raw_metadata, factors = FALSE)) Ignoring metadata, using col_type > classes[classes == "factor"] <- "character" > stopifnot(identical(sapply(DF, class), classes)) > stopifnot(!any(sapply(DF, class) == "factor")) > > # verify that you can set the timezone for the dates > DF0 <- format_record(avs_raw_core) > DF1 <- format_record(avs_raw_record, col_type = col_type(avs_raw_metadata, lubridate_args = list(tz = "US/Mountain"))) Error in C_force_tz(to_posixct(time), tz, roll_dst) : CCTZ: Unrecognized output timezone: "US/Mountain" Calls: format_record ... -> .force_tz -> from_posixct -> C_force_tz Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [8s/8s] OK * checking PDF version of manual ... [3s/3s] OK * checking HTML version of manual ... [0s/0s] OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR