Skip to content

Better error message when an ARD is accidentally passed to tbl_summary() #1992

@ddsjoberg

Description

@ddsjoberg

This may apply to more of the tbl_*() functions as well. This could be generalized to a check that there are no list columns.

library(cards)

mtcars |> 
  ard_categorical(variables = cyl) |> 
  gtsummary::tbl_summary()
#> Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...): 'x' must be atomic

Created on 2024-09-22 with reprex v2.1.1

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