Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
krystian8207 opened this issue Jul 25, 2022 · 0 comments · May be fixed by #447
Open

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

krystian8207 opened this issue Jul 25, 2022 · 0 comments · May be fixed by #447
Labels
bug Something isn't working issue Used for project filtering

Comments

@krystian8207
Copy link

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.

@krystian8207 krystian8207 added bug Something isn't working issue Used for project filtering labels Jul 25, 2022
@krystian8207 krystian8207 linked a pull request Jul 25, 2022 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working issue Used for project filtering
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant