* using log directory ‘/Users/ripley/R/packages/tests-devel/insurancerating.Rcheck’ * using R Under development (unstable) (2025-12-24 r89227) * using platform: aarch64-apple-darwin25.2.0 * R was compiled by Apple clang version 17.0.0 (clang-1700.6.3.2) GNU Fortran (GCC) 14.2.0 * running under: macOS Tahoe 26.2 * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘insurancerating/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘insurancerating’ version ‘0.7.5’ * 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 ‘insurancerating’ can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... NOTE Missing dependency on R >= 4.1.0 because package code uses the pipe |> or function shorthand \(...) syntax added in R 4.1.0. File(s) using such syntax: ‘autoplot.restricted.Rd’ ‘autoplot.riskfactor.Rd’ ‘rating_factors.Rd’ * 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 examples ... ERROR Running examples in ‘insurancerating-Ex.R’ failed The error most likely occurred in: > ### Name: rows_per_date > ### Title: Find active rows per date > ### Aliases: rows_per_date > > ### ** Examples > > library(lubridate) Attaching package: ‘lubridate’ The following objects are masked from ‘package:base’: date, intersect, setdiff, union > portfolio <- data.frame( + begin1 = ymd(c("2014-01-01", "2014-01-01")), + end = ymd(c("2014-03-14", "2014-05-10")), + termination = ymd(c("2014-03-14", "2014-05-10")), + exposure = c(0.2025, 0.3583), + premium = c(125, 150), + car_type = c("BMW", "TESLA")) > > ## Find active rows on different dates > dates0 <- data.frame(active_date = seq(ymd("2014-01-01"), ymd("2014-05-01"), + by = "months")) > rows_per_date(portfolio, dates0, df_begin = begin1, df_end = end, + dates_date = active_date) begin1 end termination exposure premium car_type index_df 1 2014-01-01 2014-03-14 2014-03-14 0.2025 125 BMW 1 2 2014-01-01 2014-05-10 2014-05-10 0.3583 150 TESLA 2 3 2014-01-01 2014-03-14 2014-03-14 0.2025 125 BMW 1 4 2014-01-01 2014-05-10 2014-05-10 0.3583 150 TESLA 2 5 2014-01-01 2014-03-14 2014-03-14 0.2025 125 BMW 1 6 2014-01-01 2014-05-10 2014-05-10 0.3583 150 TESLA 2 7 2014-01-01 2014-05-10 2014-05-10 0.3583 150 TESLA 2 8 2014-01-01 2014-05-10 2014-05-10 0.3583 150 TESLA 2 active_date index_dates 1 2014-01-01 1 2 2014-01-01 1 3 2014-02-01 2 4 2014-02-01 2 5 2014-03-01 3 6 2014-03-01 3 7 2014-04-01 4 8 2014-05-01 5 > > ## With extra identifiers (merge claim date with time interval in portfolio) > claim_dates <- data.frame(claim_date = ymd("2014-01-01"), + car_type = c("BMW", "VOLVO")) > > ### Only rows are returned that can be matched > rows_per_date(portfolio, claim_dates, df_begin = begin1, + df_end = end, dates_date = claim_date, car_type) Error in data.table::foverlaps(df1, lookup2, type = "any", which = FALSE, : attempt access index -1/4 in VECTOR_ELT Calls: rows_per_date -> Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ 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, 1 NOTE See ‘/Users/ripley/R/packages/tests-devel/insurancerating.Rcheck/00check.log’ for details. 57.62 real 50.61 user 6.08 sys