Skip to content

t1flex() still causes errors when more than one header column has the same N #136

@Koehlibert

Description

@Koehlibert

Sorry for the potentially duplicated issue, but the error in #103 seems to have resurfaced.
When I have multiple levels in my table1 headers, applying t1flex throws an error. Here's a reprex:

library(table1)
library(flextable)
library(dplyr)
df <- data.frame(
  l1 = rep(c("A", "B"), each = 200),
  l2 = rep(rep(c("x", "y"), each = 100), 2),
  x = rnorm(400)
)
table1(~x | l1/l2, data = df) %>% t1flex() %>% flextable::autofit()

R version 4.2.2, all packages up to date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions