Running 'test-interval-timeSplitter.R' [4s]
  Running 'test-nonlin_4_coxph.R' [167s]
  Running 'testthat.R' [174s]
Running the tests in 'tests/test-nonlin_4_coxph.R' failed.
Complete output:
  > library(Greg)
  Loading required package: Gmisc
  Loading required package: Rcpp
  Loading required package: htmlTable
  Loading required package: forestplot
  Loading required package: grid
  Loading required package: checkmate
  Loading required package: abind
  > library(dplyr)
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  > data("melanoma", package = "boot", envir = environment())
  > 
  > melanoma <- mutate(melanoma,
  +                    status = factor(status,
  +                                    levels = 1:3,
  +                                    labels = c("Died from melanoma",
  +                                               "Alive",
  +                                               "Died from other causes")),
  +                    ulcer = factor(ulcer,
  +                                   levels = 0:1,
  +                                   labels = c("Absent", "Present")),
  +                    # All variables should be in the same time unit
  +                    time = time/365.25,
  +                    sex = factor(sex,
  +                                 levels = 0:1,
  +                                 labels = c("Female", "Male")))
  > 
  > library(survival)
  > model <- coxph(Surv(time, status == "Died from melanoma") ~ sex + age,
  +   data = melanoma
  + )
  > 
  > library(splines)
  > nl_model <- addNonlinearity(model, "age", "ns",
  +   flex_param = 2:7,
  +   workers = FALSE
  + )
  > if (!all.equal(model, nl_model)) {
  +   stop("Failed check coxph with ns")
  + }
  > 
  > nl_model <- addNonlinearity(model, "age", "ns",
  +   flex_param = 2:7, sig_level = .7,
  +   workers = FALSE
  + )
  > if (length(all.equal(model, nl_model)) == 1) {
  +   stop("Failed check coxph with ns with sensitivity increased")
  + }
  > 
  > nl_model <- addNonlinearity(model, "age", "pspline",
  +   flex_param = "Asdasdsadasda",
  +   workers = FALSE
  + )
  > if (!all.equal(model, nl_model)) {
  +   stop("Failed check coxph with pspline")
  + }
  > 
  > nl_model <- addNonlinearity(model, "age", "pspline",
  +   flex_param = "Asdasdsadasda", sig_level = .7,
  +   workers = FALSE
  + )
  > if (length(all.equal(model, nl_model)) == 1) {
  +   stop("Failed check coxph with pspline with sensitivity increased")
  + }
  > 
  > proc.time()
     user  system elapsed 
     3.76    0.56    4.31 
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > 
  > test_check("Greg")
  Loading required package: Greg
  Loading required package: Gmisc
  Loading required package: Rcpp
  Loading required package: htmlTable
  Loading required package: forestplot
  Loading required package: grid
  Loading required package: checkmate
  Loading required package: abind
  [ FAIL 0 | WARN 1 | SKIP 0 | PASS 292 ]
  
  [ FAIL 0 | WARN 1 | SKIP 0 | PASS 292 ]
  > 
  > proc.time()
     user  system elapsed 
    14.20    1.32   15.54