- using R version 4.4.3 (2025-02-28)
- using platform: aarch64-apple-darwin20
- R was compiled by
Apple clang version 14.0.0 (clang-1400.0.29.202)
GNU Fortran (GCC) 12.2.0
- running under: macOS Ventura 13.7.8
- using session charset: UTF-8
- checking for file ‘medicalcoder/DESCRIPTION’ ... OK
- this is package ‘medicalcoder’ version ‘0.7.0’
- package encoding: UTF-8
- 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 ‘medicalcoder’ can be installed ... [9s/9s] OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... 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 ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] OK
- checking whether startup messages can be suppressed ... [1s/1s] 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 ... [4s/4s] OK
- checking Rd files ... [0s/0s] OK
- checking Rd metadata ... 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 R/sysdata.rda ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [7s/7s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [48s/48s] ERROR
Running ‘test-asserts.R’ [5s/5s]
Running ‘test-charlson.R’ [7s/7s]
Running ‘test-comorbidities.R’ [1s/1s]
Running ‘test-data-frame-tools.R’ [1s/1s]
Running ‘test-elixhauser-example.R’ [1s/1s]
Running ‘test-elixhauser.R’ [1s/1s]
Running ‘test-icd_compact_to_full.R’ [1s/1s]
Running ‘test-internal-data.R’ [6s/6s]
Running ‘test-is_icd.R’ [13s/13s]
Running ‘test-locked-bindings.R’ [2s/2s]
Running ‘test-longitudinal-comorbidities.R’ [2s/2s]
Running ‘test-longitudinal-pccc-v3.1.R’ [1s/1s]
Running ‘test-lookup_icd_codes.R’ [6s/6s]
Running the tests in ‘tests/test-lookup_icd_codes.R’ failed.
Complete output:
> source('utilities.R')
> library(medicalcoder)
>
> # lookup exact vs regex consistency
> lx <- lookup_icd_codes(c("E11.9","I50.9"), regex = FALSE)
> lf <- lookup_icd_codes(factor(c("E11.9","I50.9")), regex = FALSE)
> lr <- lookup_icd_codes(c("^E11\\.9$","^I50\\.9$"), regex = TRUE)
> stopifnot(
+ identical(lx, lf),
+ all(lx$full_code %in% lr$full_code),
+ all(lr$full_code %in% lx$full_code)
+ )
>
> # the following gives an error:
> # Error in merge.data.frame(x = input, y = matches, all.x = TRUE, by = c(ifelse(regex, :
> # negative length vectors are not allowed
> m <- tryCatchError(lookup_icd_codes(x = "", regex = TRUE))
*** caught segfault ***
address 0x680008000, cause 'invalid permissions'
Traceback:
1: merge.data.frame(x = input, y = matches, all.x = TRUE, by = col_order[1:2])
2: merge(x = input, y = matches, all.x = TRUE, by = col_order[1:2])
3: lookup_icd_codes(x = "", regex = TRUE)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, ..., error = function(e) { e})
8: tryCatchError(lookup_icd_codes(x = "", regex = TRUE))
An irrecoverable exception occurred. R is aborting now ...
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [38s/33s] OK
- checking PDF version of manual ... [2s/2s] OK
- DONE
Status: 1 ERROR
- using check arguments '--no-clean-on-error '