Skip to content

summarise_long fails when having latest version of vctrs installed. #446

@krystian8207

Description

@krystian8207

Issue description

When having vctrs >= 0.4.1 installed using summarise_long on continuous data returns the following error:

Error: Can't merge the outer name `Q1` with a vector of length > 1.
Please supply a `.name_spec` specification.

Steps to reproduce the issue

t1_title <- "Cohort Summary"
t1_ds <- "ADaM Interim Dataset for Time-to-Event Analysis"
t1_fn <- "My table one footnote"

tbl_gt <-
  adtte %>%
  dplyr::filter(SAFFL == "Y") %>%
  dplyr::select(AGE, AGEGR1, SEX, EVNTDESC, TRTA) %>%
  visR::tableone(
    strata = "TRTA",
    overall = FALSE,
    title = t1_title,
    datasource = t1_ds,
    footnote = t1_fn,
    engine = "gt", 
    summary_function = summarize_long
  )

What's the expected result?

Generated tableone output in long format.

What's the actual result?

Error presented above.

Additional details / screenshot

This error is shown due to having nested names when computing quantiles with quantile function in visR:::summarize_long.numeric.
Removing the names fixes the error. I'll create a PR closing the issue soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingissueUsed for project filtering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions