diff --git a/R/get_summary_records.R b/R/get_summary_records.R index f159935e6..b1a7630dd 100644 --- a/R/get_summary_records.R +++ b/R/get_summary_records.R @@ -177,10 +177,10 @@ get_summary_records <- function(dataset, # I("get_summary_records(anaylsis_var = , summary_fun = )"), # "get_summary_records(set_values_to = )" # ) - # analysis_var <- assert_symbol(enexpr(analysis_var)) - # assert_s3_class(summary_fun, "function") - # set_values_to <- exprs(!!analysis_var := {{ summary_fun }}(!!analysis_var), !!!set_values_to) - #} + # analysis_var <- assert_symbol(enexpr(analysis_var)) + # assert_s3_class(summary_fun, "function") + # set_values_to <- exprs(!!analysis_var := {{ summary_fun }}(!!analysis_var), !!!set_values_to) + # } # Summarise the analysis value dataset %>% diff --git a/tests/testthat/test-get_summary_records.R b/tests/testthat/test-get_summary_records.R index 25968d2b9..61e9ce053 100644 --- a/tests/testthat/test-get_summary_records.R +++ b/tests/testthat/test-get_summary_records.R @@ -176,23 +176,22 @@ test_that("get_summary_records Test 4: Using deprecated formal argument will thr "XYZ-1002", 9, "QTcF Int. (msec)", "Visit 3", "2016-03-24T10:56", 402, "Active 20mg" ) - expect_no_error(get_summary_records( - input, - by_vars = exprs(USUBJID, PARAM, AVISIT), - set_values_to = exprs( - AVAL = mean(AVAL, na.rm = TRUE), - DTYPE = "AVERAGE" - ))) - - expect_no_error(get_summary_records( - input, - by_vars = exprs(USUBJID, PARAM, AVISIT), - set_values_to = exprs( - AVAL = mean(AVAL, na.rm = TRUE), - DTYPE = "AVERAGE" - ), - analysis_var = exprs(AVAL) - ) + expect_no_error(get_summary_records( + input, + by_vars = exprs(USUBJID, PARAM, AVISIT), + set_values_to = exprs( + AVAL = mean(AVAL, na.rm = TRUE), + DTYPE = "AVERAGE" ) + )) + expect_no_error(get_summary_records( + input, + by_vars = exprs(USUBJID, PARAM, AVISIT), + set_values_to = exprs( + AVAL = mean(AVAL, na.rm = TRUE), + DTYPE = "AVERAGE" + ), + analysis_var = exprs(AVAL) + )) })