From a0bab7f286ca5bdf2044679fa33d448f87105c80 Mon Sep 17 00:00:00 2001 From: Rammprasad Ganapathy Date: Tue, 18 Jun 2024 23:04:00 +0000 Subject: [PATCH] remove white spaces --- R/assign_datetime.R | 1 - R/hardcode.R | 3 --- tests/testthat/test-assign.R | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/R/assign_datetime.R b/R/assign_datetime.R index aa52aa87..2e635f2a 100644 --- a/R/assign_datetime.R +++ b/R/assign_datetime.R @@ -159,7 +159,6 @@ assign_datetime <- raw_unk = c("UN", "UNK"), id_vars = oak_id_vars(), .warn = TRUE) { - admiraldev::assert_character_vector(raw_var) admiraldev::assert_character_scalar(tgt_var) admiraldev::assert_character_vector(id_vars) diff --git a/R/hardcode.R b/R/hardcode.R index 3562192f..51d263e8 100644 --- a/R/hardcode.R +++ b/R/hardcode.R @@ -44,7 +44,6 @@ sdtm_hardcode <- function(tgt_dat = NULL, ct_spec = NULL, ct_clst = NULL, id_vars = oak_id_vars()) { - admiraldev::assert_character_scalar(raw_var) admiraldev::assert_character_scalar(tgt_var) admiraldev::assert_character_scalar(tgt_val) @@ -177,7 +176,6 @@ hardcode_no_ct <- function(tgt_dat = NULL, raw_var, tgt_var, id_vars = oak_id_vars()) { - admiraldev::assert_character_scalar(raw_var) admiraldev::assert_character_scalar(tgt_var) assertthat::assert_that(assertthat::is.scalar(tgt_val), @@ -211,7 +209,6 @@ hardcode_ct <- ct_spec, ct_clst, id_vars = oak_id_vars()) { - admiraldev::assert_character_scalar(raw_var) admiraldev::assert_character_scalar(tgt_var) assertthat::assert_that(assertthat::is.scalar(tgt_val), diff --git a/tests/testthat/test-assign.R b/tests/testthat/test-assign.R index 768a1fbf..0ac42317 100644 --- a/tests/testthat/test-assign.R +++ b/tests/testthat/test-assign.R @@ -117,6 +117,7 @@ test_that("assign_ct works as expected with both `raw_dat` and `tgt_dat` as cond expected_result <- fa_tgt_dat |> tibble::add_column(FASPEC = c("SWABBED MATERIAL", NA, NA, "URINE", NA)) + expect_identical(result, expected_result) })