From 7a4e31d0ddcb58eaac071214e8faa6edbb77b773 Mon Sep 17 00:00:00 2001 From: Jonathon Love Date: Thu, 27 Jan 2022 11:30:51 +1100 Subject: [PATCH] contTables fix to translation Fixes #336 --- R/conttables.b.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/conttables.b.R b/R/conttables.b.R index ace6f11c..8bb6ffc0 100644 --- a/R/conttables.b.R +++ b/R/conttables.b.R @@ -528,8 +528,11 @@ contTablesClass <- R6::R6Class( `v[rr]`=rr$rr, `cil[rr]`=rr$lower, `ciu[rr]`=rr$upper)) - odds$addFootnote(rowNo=othRowNo, 'v[dp]', paste(self$options$compare, .('compared'))) - odds$addFootnote(rowNo=othRowNo, 'v[rr]', paste(self$options$compare, .('compared'))) + + footnote <- `if`(self$options$compare == 'rows', .('Rows compared'), .('Columns compared')) + odds$addFootnote(rowNo=othRowNo, 'v[dp]', footnote) + odds$addFootnote(rowNo=othRowNo, 'v[rr]', footnote) + if (any(mat == 0)){ odds$addFootnote(rowNo=othRowNo, 'v[lo]', .('Haldane-Anscombe correction applied')) odds$addFootnote(rowNo=othRowNo, 'v[o]', .('Haldane-Anscombe correction applied'))