-
-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Describe the bug
report fails when a character vector has only one unique value with
Error in names(n_char) <- c("Entry", "n_Entry") :
'names' attribute [2] must be the same length as the vector [1]
Reproducible example
library(report)
packageVersion("report")
single_char_vector <- c("big")
df <- data.frame("id" = 1:6, "size" = single_char_vector)
report(df)Session Info
R version 4.5.1 (2025-06-13 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)
Matrix products: default
LAPACK version 3.12.1
locale:
[1] LC_COLLATE=Welsh_United Kingdom.utf8 LC_CTYPE=Welsh_United Kingdom.utf8
[3] LC_MONETARY=Welsh_United Kingdom.utf8 LC_NUMERIC=C
[5] LC_TIME=Welsh_United Kingdom.utf8time zone: Europe/London
tzcode source: internalattached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] report_0.6.1loaded via a namespace (and not attached):
[1] compiler_4.5.1 tools_4.5.1 datawizard_1.2.0 rstudioapi_0.17.1 insight_1.4.2