bllflow builds from the tableone package to present the study cohort and description statistics. Also planned are tools to help create a study codebook.

Create Table 1 with stratification

You can stratify Table 1 in two methods.

  1. Stratify with columns. This is how to describe your data for manuscripts. This method is supported with the CreateTableOne library.
TableOne <- CreateTableOne(data = pbc,strata = c("trt"), factorVars = catVars)
  1. Stratify with rows. This method is helpful if there are many strata. We use this format for interactive visualizations or when we create figures. For example, see an ‘algorithm viewer’ that shows Table 1 stratified for 61 strata (bins).

Check for small cells

Our team works with personal health data in secure settings. For privacy, no summary tables can be exported from the data centre with small cells.

To obtain print of the actual small cells pass print as TRUE

checkedTableOne <- CheckSmallCells(TableOne, print = TRUE)
#> 8  variables with  160  levels checked.
#> 
#> 8  variables with  79  levels have cells < 6  counts.
#> 
#>    variable stratifiedBy strataValues    factors
#> 1    status    trt:stage          1:1       2, 3
#> 2    status    trt:stage          2:1    1, 2, 3
#> 3    status    trt:stage          1:2          2
#> 4    status    trt:stage          2:2          2
#> 5    status    trt:stage          1:3          2
#> 6    status    trt:stage          2:3          2
#> 7    status    trt:stage          1:4          2
#> 8    status    trt:stage          2:4          2
#> 9       trt    trt:stage          1:1          2
#> 10      trt    trt:stage          2:1       1, 2
#> 11      trt    trt:stage          1:2          2
#> 12      trt    trt:stage          2:2          1
#> 13      trt    trt:stage          1:3          2
#> 14      trt    trt:stage          2:3          1
#> 15      trt    trt:stage          1:4          2
#> 16      trt    trt:stage          2:4          1
#> 17      sex    trt:stage          1:1          2
#> 18      sex    trt:stage          2:1       2, 1
#> 19      sex    trt:stage          1:2          2
#> 20      sex    trt:stage          2:2          2
#> 21      sex    trt:stage          2:3          2
#> 22  ascites    trt:stage          1:1          2
#> 23  ascites    trt:stage          2:1       1, 2
#> 24  ascites    trt:stage          1:2          2
#> 25  ascites    trt:stage          2:2          2
#> 26  ascites    trt:stage          1:3          2
#> 27  ascites    trt:stage          2:3          2
#> 28   hepato    trt:stage          1:1          2
#> 29   hepato    trt:stage          2:1       1, 2
#> 30  spiders    trt:stage          1:1          2
#> 31  spiders    trt:stage          2:1       1, 2
#> 32  spiders    trt:stage          1:2          2
#> 33  spiders    trt:stage          2:2          2
#> 34    edema    trt:stage          1:1       2, 3
#> 35    edema    trt:stage          2:1    1, 2, 3
#> 36    edema    trt:stage          1:2       2, 3
#> 37    edema    trt:stage          2:2       2, 3
#> 38    edema    trt:stage          1:3       2, 3
#> 39    edema    trt:stage          2:3          3
#> 40    edema    trt:stage          2:4          2
#> 41    stage    trt:stage          1:1    2, 3, 4
#> 42    stage    trt:stage          2:1 1, 2, 3, 4
#> 43    stage    trt:stage          1:2    1, 3, 4
#> 44    stage    trt:stage          2:2    1, 3, 4
#> 45    stage    trt:stage          1:3    1, 2, 4
#> 46    stage    trt:stage          2:3    1, 2, 4
#> 47    stage    trt:stage          1:4    1, 2, 3
#> 48    stage    trt:stage          2:4    1, 2, 3

Find out which rows and variables contain the small cells.

checkedTableOne$MetaData$smallCells
#>    variable stratifiedBy strataValues    factors
#> 1    status    trt:stage          1:1       2, 3
#> 2    status    trt:stage          2:1    1, 2, 3
#> 3    status    trt:stage          1:2          2
#> 4    status    trt:stage          2:2          2
#> 5    status    trt:stage          1:3          2
#> 6    status    trt:stage          2:3          2
#> 7    status    trt:stage          1:4          2
#> 8    status    trt:stage          2:4          2
#> 9       trt    trt:stage          1:1          2
#> 10      trt    trt:stage          2:1       1, 2
#> 11      trt    trt:stage          1:2          2
#> 12      trt    trt:stage          2:2          1
#> 13      trt    trt:stage          1:3          2
#> 14      trt    trt:stage          2:3          1
#> 15      trt    trt:stage          1:4          2
#> 16      trt    trt:stage          2:4          1
#> 17      sex    trt:stage          1:1          2
#> 18      sex    trt:stage          2:1       2, 1
#> 19      sex    trt:stage          1:2          2
#> 20      sex    trt:stage          2:2          2
#> 21      sex    trt:stage          2:3          2
#> 22  ascites    trt:stage          1:1          2
#> 23  ascites    trt:stage          2:1       1, 2
#> 24  ascites    trt:stage          1:2          2
#> 25  ascites    trt:stage          2:2          2
#> 26  ascites    trt:stage          1:3          2
#> 27  ascites    trt:stage          2:3          2
#> 28   hepato    trt:stage          1:1          2
#> 29   hepato    trt:stage          2:1       1, 2
#> 30  spiders    trt:stage          1:1          2
#> 31  spiders    trt:stage          2:1       1, 2
#> 32  spiders    trt:stage          1:2          2
#> 33  spiders    trt:stage          2:2          2
#> 34    edema    trt:stage          1:1       2, 3
#> 35    edema    trt:stage          2:1    1, 2, 3
#> 36    edema    trt:stage          1:2       2, 3
#> 37    edema    trt:stage          2:2       2, 3
#> 38    edema    trt:stage          1:3       2, 3
#> 39    edema    trt:stage          2:3          3
#> 40    edema    trt:stage          2:4          2
#> 41    stage    trt:stage          1:1    2, 3, 4
#> 42    stage    trt:stage          2:1 1, 2, 3, 4
#> 43    stage    trt:stage          1:2    1, 3, 4
#> 44    stage    trt:stage          2:2    1, 3, 4
#> 45    stage    trt:stage          1:3    1, 2, 4
#> 46    stage    trt:stage          2:3    1, 2, 4
#> 47    stage    trt:stage          1:4    1, 2, 3
#> 48    stage    trt:stage          2:4    1, 2, 3

You can also check small cells inside your Summary Data in case you have multiple tables

For a print of the found rows pass print as TRUE

Find out which rows and variables contain the small cells.