From 3aba93790425df996511a2ea933164dbd1af41fa Mon Sep 17 00:00:00 2001 From: fweber144 Date: Thu, 14 Jul 2022 22:24:34 +0200 Subject: [PATCH] Simplify small parts of the `d_test` tests. --- tests/testthat/test_varsel.R | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/testthat/test_varsel.R b/tests/testthat/test_varsel.R index f9a9344c6..c7a98b8ca 100644 --- a/tests/testthat/test_varsel.R +++ b/tests/testthat/test_varsel.R @@ -103,13 +103,7 @@ test_that(paste( data = dat, offset = offs_crr, weights = wobs_crr, - y = dat_crr[[gsub( - "\\(|\\)", - "", - as.character( - rm_addresp(rm_cbind(formul_fit_crr)) - )[2] - )]] + y = dat_crr[[stdize_lhs(formul_fit_crr)$y_nm]] ) vs_repr <- do.call(varsel, c( list(object = refmods[[tstsetup_ref]], d_test = d_test_crr), @@ -190,13 +184,7 @@ test_that(paste( data = dat_indep, offset = offs_crr, weights = wobs_crr, - y = dat_indep_crr[[gsub( - "\\(|\\)", - "", - as.character( - rm_addresp(rm_cbind(formul_fit_crr)) - )[2] - )]] + y = dat_indep_crr[[stdize_lhs(formul_fit_crr)$y_nm]] ) vs_indep <- do.call(varsel, c( list(object = refmods[[tstsetup_ref]], d_test = d_test_crr),