tests/testthat/_snaps/big_n.md

big Ns constant by page

Code
  auto <- apply_tfrmt(.data = data, tfrmt = mytfrmt, mock = FALSE)
Message
  Mismatch between big Ns and page_plan. For varying big N's by page (`by_page` = TRUE in `big_n_structure`), data must contain 1 big N value per unique grouping variable/value set to ".default" in `page_plan` and bigNs must be in order of the data
The following columns have multiple Big N's associated with them:
c("Placebo", "Total", "Treatment")

not enough big Ns by page

Code
  apply_tfrmt(.data = data, tfrmt = mytfrmt, mock = FALSE)
Message
  Mismatch between big Ns and page_plan. For varying big N's by page (`by_page` = TRUE in `big_n_structure`), data must contain 1 big N value per unique grouping variable/value set to ".default" in `page_plan` and bigNs must be in order of the data
Output
  [[1]]
  # A tibble: 3 x 5
    Label     `Placebo\nN = 12` `Treatment\nN = 14` `Total\nN = 31`
  * <chr>     <chr>             <chr>               <chr>          
  1 "Age (y)" <NA>              <NA>                <NA>           
  2 "  n"     "12"              "14"                "31"           
  3 "   "     " "               " "                 " "            
  # i 1 more variable: ..tfrmt_row_grp_lbl <lgl>

  [[2]]
  # A tibble: 3 x 5
    Label `Placebo\nN = 12` `Treatment\nN = 14` `Total\nN = 31`
  * <chr> <chr>             <chr>               <chr>          
  1 "Sex" <NA>              <NA>                <NA>           
  2 "  n" "20"              "32"                "18"           
  3 "   " " "               " "                 " "            
  # i 1 more variable: ..tfrmt_row_grp_lbl <lgl>

Paging (group) variable is sorted non-alphabetically

Code
  apply_tfrmt(.data = data, tfrmt = mytfrmt, mock = FALSE)
Message
  Mismatch between big Ns and page_plan. For varying big N's by page (`by_page` = TRUE in `big_n_structure`), data must contain 1 big N value per unique grouping variable/value set to ".default" in `page_plan` and bigNs must be in order of the data
Output
  [[1]]
  # A tibble: 3 x 5
    Label `Placebo\nN = 12` `Treatment\nN = 14` `Total\nN = 31`
  * <chr> <chr>             <chr>               <chr>          
  1 "Sex" <NA>              <NA>                <NA>           
  2 "  n" "20"              "32"                "18"           
  3 "   " " "               " "                 " "            
  # i 1 more variable: ..tfrmt_row_grp_lbl <lgl>

  [[2]]
  # A tibble: 3 x 5
    Label     `Placebo\nN = 20` `Treatment\nN = 32` `Total\nN = 18`
  * <chr>     <chr>             <chr>               <chr>          
  1 "Age (y)" <NA>              <NA>                <NA>           
  2 "  n"     "12"              "14"                "31"           
  3 "   "     " "               " "                 " "            
  # i 1 more variable: ..tfrmt_row_grp_lbl <lgl>


Try the tfrmt package in your browser

Any scripts or data that you put into this service are public.

tfrmt documentation built on Nov. 5, 2025, 6:12 p.m.