* using log directory 'd:/Rcompile/CRANpkg/local/4.2/mtvc.Rcheck' * using R version 4.2.3 (2023-03-15 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: UTF-8 * checking for file 'mtvc/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'mtvc' version '1.0.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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'mtvc' can be installed ... OK * checking installed package size ... OK * checking package 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 R 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 ... [4s] OK * checking Rd files ... [1s] 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 ... [2s] ERROR Running examples in 'mtvc-Ex.R' failed The error most likely occurred in: > ### Name: mtvc > ### Title: (mtvc) Multiple Time Varying Covariates > ### Aliases: mtvc > > ### ** Examples > > data(simwide) > cp.dataframe=mtvc(data=simwide, + origin='1970-01-01', + dates=c(FIRST_CHRONIC,FIRST_ACUTE,FIRST_RELAPSE), + complications=c(CHRONIC,ACUTE,RELAPSE), + start=DATETRAN, + stop=DLASTSE, + event=EVENT) Error in `mutate()`: ℹ In argument: `FIRST_CHRONIC = (structure(function (..., .x = ..1, .y = ..2, . = ..1) ...`. Caused by error in `as.Date.numeric()`: ! 'origin' must be supplied Backtrace: ▆ 1. ├─mtvc::mtvc(...) 2. │ └─data %>% ungroup() %>% mutate(id = row_number()) %>% ... 3. ├─dplyr::mutate_at(...) 4. │ ├─dplyr::mutate(.tbl, !!!funs) 5. │ └─dplyr:::mutate.data.frame(.tbl, !!!funs) 6. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by) 7. │ ├─base::withCallingHandlers(...) 8. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns) 9. │ └─mask$eval_all_mutate(quo) 10. │ └─dplyr (local) eval() 11. ├─mtvc (local) ``(FIRST_CHRONIC) 12. │ └─rlang::eval_bare(`_quo`, base::parent.frame()) 13. ├─rlang (local) as.Date(ifelse(is.na(.), as.Date(origin), as.Date(.))) 14. ├─base::as.Date(ifelse(is.na(.), as.Date(origin), as.Date(.))) 15. ├─base::as.Date.numeric(ifelse(is.na(.), as.Date(origin), as.Date(.))) 16. │ └─base::stop("'origin' must be supplied") 17. └─base::.handleSimpleError(...) 18. └─dplyr (local) h(simpleError(msg, call)) 19. └─rlang::abort(message, class = error_class, parent = parent, call = error_call) Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [3s] ERROR Running 'testthat.R' [3s] Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(mtvc) > > test_check("mtvc") [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-mtvc.R:2:1'): (code run outside of `test_that()`) ────────────── Error in `mutate(.tbl, !!!funs)`: ℹ In argument: `FIRST_CHRONIC = (structure(function (..., .x = ..1, .y = ..2, . = ..1) ...`. Caused by error in `as.Date.numeric()`: ! 'origin' must be supplied Backtrace: ▆ 1. ├─mtvc::mtvc(...) at test-mtvc.R:2:1 2. │ └─data %>% ungroup() %>% mutate(id = row_number()) %>% ... 3. ├─dplyr::mutate_at(...) 4. │ ├─dplyr::mutate(.tbl, !!!funs) 5. │ └─dplyr:::mutate.data.frame(.tbl, !!!funs) 6. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by) 7. │ ├─base::withCallingHandlers(...) 8. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns) 9. │ └─mask$eval_all_mutate(quo) 10. │ └─dplyr (local) eval() 11. ├─mtvc (local) ``(FIRST_CHRONIC) 12. │ └─rlang::eval_bare(`_quo`, base::parent.frame()) 13. ├─rlang (local) as.Date(ifelse(is.na(.), as.Date(origin), as.Date(.))) 14. ├─base::as.Date(ifelse(is.na(.), as.Date(origin), as.Date(.))) 15. ├─base::as.Date.numeric(ifelse(is.na(.), as.Date(origin), as.Date(.))) 16. │ └─base::stop("'origin' must be supplied") 17. └─base::.handleSimpleError(...) 18. └─dplyr (local) h(simpleError(msg, call)) 19. └─rlang::abort(message, class = error_class, parent = parent, call = error_call) [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ] Error: Test failures Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs