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

[Bug]: summarize_vars do not use na_level #911

Closed
3 tasks done
clarkliming opened this issue May 12, 2023 · 0 comments · Fixed by #923
Closed
3 tasks done

[Bug]: summarize_vars do not use na_level #911

clarkliming opened this issue May 12, 2023 · 0 comments · Fixed by #923
Assignees
Labels
bug Something isn't working sme

Comments

@clarkliming
Copy link
Contributor

What happened?

iris2 <- iris %>%
  mutate(Species = factor(Species, levels = c("setosa", "versicolor", "virginica", "asda")))
basic_table() %>%
  summarize_vars("Species", .stats = "count_fraction", na_level = "asda") %>%
  build_table(iris2)

since asda in in na_level, should it be excluded from output?

sessionInfo()

R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] chevron_0.1.4.9010 checkmate_2.1.0    testthat_3.1.6    

loaded via a namespace (and not attached):
 [1] pkgload_1.3.2         tidyr_1.3.0           jsonlite_1.8.4       
 [4] splines_4.2.2         brio_1.1.3            shiny_1.7.4          
 [7] Rdpack_2.4            dm_1.0.5              yaml_2.3.7           
[10] remotes_2.4.2         sessioninfo_1.2.2     formatters_0.4.1.9001
[13] pillar_1.8.1          backports_1.4.1       lattice_0.20-45      
[16] rtables_0.6.0.3       glue_1.6.2            digest_0.6.31        
[19] promises_1.2.0.1      rbibutils_2.2.13      colorspace_2.1-0     
[22] htmltools_0.5.4       httpuv_1.6.9          Matrix_1.5-3         
[25] pkgconfig_2.0.3       devtools_2.4.5        dunlin_0.1.2.9007    
[28] broom_1.0.3           purrr_1.0.1           xtable_1.8-4         
[31] scales_1.2.1          processx_3.8.0        later_1.3.0          
[34] tibble_3.1.8          generics_0.1.3        ggplot2_3.4.1        
[37] usethis_2.1.6         ellipsis_0.3.2        cachem_1.0.6         
[40] withr_2.5.0           rlistings_0.2.1.9003  cli_3.6.0            
[43] survival_3.5-3        magrittr_2.0.3        crayon_1.5.2         
[46] mime_0.12             memoise_2.0.1         ps_1.7.2             
[49] fs_1.6.1              fansi_1.0.4           forcats_1.0.0        
[52] pkgbuild_1.4.0        profvis_0.3.7         tools_4.2.2          
[55] prettyunits_1.1.1     lifecycle_1.0.3       stringr_1.5.0        
[58] munsell_0.5.0         callr_3.7.3           compiler_4.2.2       
[61] rlang_1.1.0           nestcolor_0.1.1.9001  grid_4.2.2           
[64] rstudioapi_0.14       htmlwidgets_1.6.1     igraph_1.4.0         
[67] miniUI_0.1.1.1        gtable_0.3.1          DBI_1.1.3            
[70] R6_2.5.1              dplyr_1.1.0           fastmap_1.1.0        
[73] utf8_1.2.3            rprojroot_2.0.3       desc_1.4.2           
[76] stringi_1.7.12        tern_0.8.1.9012       Rcpp_1.0.10          
[79] vctrs_0.6.0           tidyselect_1.2.0      urlchecker_1.0.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@clarkliming clarkliming added the bug Something isn't working label May 12, 2023
@edelarua edelarua self-assigned this May 16, 2023
@edelarua edelarua added the sme label May 16, 2023
edelarua added a commit that referenced this issue May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants