Skip to content

Sorting error when grouping text values #398

Description

@iMissile

In the case when a text column contains text that can be converted to a number, grouping by this column pulls all such numerical values to the front.

df <- c(rep("Start", 4), rep("End", 3), "2", "1", "1a", "1 ") |>
  data.frame(col_a = _)

df |>
  reactable::reactable(groupBy = "col_a")

image

sessionInfo()
#> R version 4.4.2 (2024-10-31 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 10 x64 (build 19045)
#> 
#> Matrix products: default
#> 
#> 
#> locale:
#> [1] LC_COLLATE=Russian_Russia.utf8  LC_CTYPE=Russian_Russia.utf8   
#> [3] LC_MONETARY=Russian_Russia.utf8 LC_NUMERIC=C                   
#> [5] LC_TIME=Russian_Russia.utf8    
#> 
#> time zone: Europe/Moscow
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] styler_1.10.3     digest_0.6.36     fastmap_1.2.0     xfun_0.45        
#>  [5] magrittr_2.0.3    glue_1.8.0        R.utils_2.12.3    knitr_1.47       
#>  [9] htmltools_0.5.8.1 rmarkdown_2.27    lifecycle_1.0.4   cli_3.6.3        
#> [13] R.methodsS3_1.8.2 vctrs_0.6.5       reprex_2.1.0      withr_3.0.0      
#> [17] compiler_4.4.2    R.oo_1.26.0       R.cache_0.16.0    purrr_1.0.2      
#> [21] rstudioapi_0.16.0 tools_4.4.2       evaluate_0.24.0   yaml_2.3.8       
#> [25] rlang_1.1.4       fs_1.6.4

Activity

  1. added
    bugSomething isn't working
    on Jan 13, 2025
  2. glin commented on Jan 13, 2025

    @glin
    Owner

    Thank you for reporting this - I saw it earlier but just never got a chance to look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions