From 3b908cb5040133f9561b5229f8838033c1f5c71f Mon Sep 17 00:00:00 2001 From: adibender Date: Mon, 4 Nov 2019 15:49:07 +0100 Subject: [PATCH] Fix test error --- .travis.yml | 3 --- tests/testthat/test-cumulative-effect.R | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 43dc5e54..e4637a70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,6 @@ matrix: include: - r: devel - r: release - - r: release - name: tidyr-dev - before_script: Rscript -e "remotes::install_github('tidyverse/tidyr')" r_packages: - pammtools # for building pkgdown vignettes via travis diff --git a/tests/testthat/test-cumulative-effect.R b/tests/testthat/test-cumulative-effect.R index f08ef9ae..eaeed238 100644 --- a/tests/testthat/test-cumulative-effect.R +++ b/tests/testthat/test-cumulative-effect.R @@ -25,13 +25,13 @@ test_that("LL helpers and as_ped produce equivalent LL windows", { # define lag-lead window function ll_fun <- function(t, tz) t >= tz ll_fun2 <- function(t, tz) t >= tz + 2 & t <= tz + 2 + 5 - ## define tdc functions - f_xyz1 <- function(t, tz, z) 1 # simulate data with cumulative effect sim_df <- sim_pexp( formula = ~ -3.5 - 0.5 * x1 | - fcumu(t, tz1, z.tz1, f_xyz = f_xyz1, ll_fun = ll_fun) + - fcumu(t, tz2, z.tz2, f_xyz = f_xyz1, ll_fun = ll_fun2), + fcumu(t, tz1, z.tz1, f_xyz = function(t, tz, z) 1, + ll_fun = function(t, tz) t >= tz) + + fcumu(t, tz2, z.tz2, f_xyz = function(t, tz, z) 1, + ll_fun = function(t, tz) t >= tz + 2 & t <= tz + 2 + 5), data = df, cut = 0:10) sim_df$time <- 10