easystats/datawizard

Need better error for `describe_distribution()` with character column

etiennebacher opened this issue · 0 comments

Asked in #419

Only happens when we use select:

library(datawizard)

describe_distribution(iris$Species)
#> Mean | SD |               Range | Skewness | Kurtosis |   n | n_Missing
#> -----------------------------------------------------------------------
#>      |    | [setosa, virginica] |        0 |    -1.51 | 150 |         0

describe_distribution(iris, select = "Species")
#> Error in class(out) <- unique(c("parameters_distribution", "see_parameters_distribution", : attempt to set an attribute on NULL