* using log directory ‘/Users/ripley/R/packages/tests-devel/heaven.Rcheck’ * using R Under development (unstable) (2026-11-03 r90835) * using platform: aarch64-apple-darwin27.2.0 * R was compiled by Apple clang version 21.0.0 (clang-2100.4.1.1) GNU Fortran (GCC) 14.2.0 * running under: macOS Golden Gate 27.2.1 * using session charset: UTF-8 * current time: 2026-11-20 16:57:31 UTC * using option ‘--no-stop-on-test-error’ * checking for file ‘heaven/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘heaven’ version ‘2026.10.30’ * 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 ‘heaven’ can be installed ... [23s/23s] OK * used C++ compiler: ‘Apple clang version 21.0.0 (clang-2100.4.1.1)’ * used SDK: ‘MacOSX27.3.sdk’ * 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 ... 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 ... OK * checking Rd files ... 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 ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... ERROR Running examples in ‘heaven-Ex.R’ failed The error most likely occurred in: > ### Name: medicinMacro > ### Title: Medicin macro to estimate prescription lengths and averages > ### Aliases: medicinMacro > > ### ** Examples > > set.seed(05021992) > library(data.table) Attaching package: ‘data.table’ The following object is masked from ‘package:base’: %notin% > N=20 > packs = list("R03AK11"=list(c(750,75),c(500,200),c(400,200)), + "R03AL03"=list(c(750,75),c(500,200),c(400,200)), + "C01CA01"=list(c(200,100),c(750,30))) > lmdb=simPrescriptionData(N,packages=packs) > lpr=simAdmissionData(N) > lpr <- getAdmLimits(lpr,collapse=TRUE) No data errors. Nothing to collapse. > drug1 = list(atc=c("R03AK11","R03AL03","R03AC02","R03AC04","R03AC19", + "R03AL02","R03AA01","R03AC18","R03AL01"), + maxdepot=4000, + period=as.Date(c("1995-01-01", "2012-12-31")), + prescriptionwindow=2, + doses=list(value=c(750,500,400,200,75), + min = c(250,200,200,100,25), + max = c(1000,600,800,600,100), + def = c(750,500,400,200,75))) > drug2=list(atc=c("C01CA01","C01AA05"), + maxdepot=4000, + period=as.Date(c("1995-01-01", "2012-12-31")), + prescriptionwindow=2, + doses=list(value=c(200, 400, 500,750), + min = c(100, 200, 250,750), + max = c(300, 800, 1000,750), + def = c(200, 400, 500,750))) > x=medicinMacro(drugs=list("drug1"=drug1,"drug2"=drug2),drugdb=lmdb,admdb=lpr) > x$drug1 Key: pnr dose firstday lastday exposure.days 1: 1 75 1995-01-01 1995-05-18 137 days 2: 1 100 1995-05-18 2008-06-15 4777 days 3: 2 75 1995-01-01 1995-02-16 46 days 4: 2 100 1995-02-16 2002-05-22 2652 days 5: 3 75 1995-01-01 1995-01-22 21 days 6: 3 100 1995-01-22 2003-02-24 2955 days 7: 4 75 1995-01-01 1995-03-03 61 days 8: 4 100 1995-03-03 2001-08-15 2357 days 9: 5 75 1995-01-01 1995-01-10 9 days 10: 5 100 1995-01-10 1996-03-08 423 days 11: 5 0 1996-03-08 1996-03-24 16 days 12: 5 100 1996-03-24 2001-02-12 1786 days 13: 6 75 1995-01-01 1995-01-20 19 days 14: 6 100 1995-01-20 2000-04-14 1911 days 15: 7 75 1995-01-01 1995-03-18 76 days 16: 7 100 1995-03-18 2002-09-13 2736 days 17: 8 75 1995-01-01 1995-02-04 34 days 18: 8 100 1995-02-04 2005-09-06 3867 days 19: 9 75 1995-01-01 1995-01-21 20 days 20: 9 100 1995-01-21 2004-02-05 3302 days 21: 10 75 1995-01-01 1995-06-27 177 days 22: 10 100 1995-06-27 2000-03-11 1719 days 23: 11 75 1995-01-01 1995-01-05 4 days 24: 11 100 1995-01-05 2004-02-12 3325 days 25: 12 75 1995-01-01 1995-03-02 60 days 26: 12 100 1995-03-02 2001-03-09 2199 days 27: 13 75 1995-01-01 1995-02-06 36 days 28: 13 100 1995-02-06 2000-05-28 1938 days 29: 14 75 1995-02-26 1995-03-14 16 days 30: 14 100 1995-03-14 1998-08-15 1250 days 31: 14 0 1998-08-15 1998-10-23 69 days 32: 14 100 1998-10-23 2001-04-24 914 days 33: 15 75 1995-01-01 1995-02-26 56 days 34: 15 100 1995-02-26 2001-12-19 2488 days 35: 16 75 1995-01-01 1995-01-06 5 days 36: 16 100 1995-01-06 2002-01-20 2571 days 37: 17 75 1995-01-01 1995-03-28 86 days 38: 17 100 1995-03-28 1995-12-22 269 days 39: 17 0 1995-12-22 1996-03-04 73 days 40: 17 100 1996-03-04 2006-04-02 3681 days 41: 18 75 1995-01-01 1995-05-05 124 days 42: 18 100 1995-05-05 2004-02-08 3201 days 43: 19 75 1995-01-01 1995-01-09 8 days 44: 19 100 1995-01-09 2008-04-15 4845 days 45: 20 75 1995-01-01 1995-05-20 139 days 46: 20 100 1995-05-20 2000-09-18 1948 days pnr dose firstday lastday exposure.days > > ## without admdata > x1=medicinMacro(drugs=list("drug1"=drug1,"drug2"=drug2),drugdb=lmdb,admdb=NULL) Error: Mat::elem(): index out of bounds Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘test-Matcher.R’ Running ‘test-cran-compliance.R’ Running ‘test-medicin-macro.R’ Running ‘test_patientProfiles.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * checking HTML version of manual ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR See ‘/Users/ripley/R/packages/tests-devel/heaven.Rcheck/00check.log’ for details. 65.70 real 49.73 user 12.56 sys