Skip to content

gg_check() does not identify spelling errors #77

Description

@adcascone

Hello,

I have noticed that with a more recent version of {ggplot2}, gg_check() does not flag spelling errors as expected.

For example, this is the code I ran and the output I see:

library(ggplot2)
library(hrbrthemes)

df <- data.frame(
  x = c(20, 25, 30),
  y = c(4, 4, 4),
  txt = c("One", "Two", "Three")
)
# not piping
ggplot(mtcars, aes(mpg, wt)) +
  geom_point() +
  labs(
    x = "This is some txt",
    y = "This is more text",
    title = "Thisy is a titlle",
    subtitle = "This is a subtitley",
    caption = "This is a captien"
  ) -> gg
gg_check(gg)
Image

I would have expected to see messages flagging potentially misspelled words here, based on the function help page.

Thank you,
Arianna

> sessionInfo()
R version 4.5.2 (2025-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.5 LTS

Matrix products: default
BLAS:   /opt/R/4.5.2/lib/R/lib/libRblas.so 
LAPACK: /opt/R/4.5.2/lib/R/lib/libRlapack.so;  LAPACK version 3.12.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               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    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Etc/UTC
tzcode source: system (glibc)

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

other attached packages:
[1] hrbrthemes_0.8.7 ggplot2_4.0.1   

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5             cli_3.6.5               rlang_1.1.6             Rttf2pt1_1.3.14         generics_0.1.4         
 [6] S7_0.2.1                gdtools_0.4.4           glue_1.8.0              htmltools_0.5.8.1       extrafontdb_1.1        
[11] fontquiver_0.2.1        scales_1.4.0            grid_4.5.2              tibble_3.3.0            fastmap_1.2.0          
[16] lifecycle_1.0.4         compiler_4.5.2          dplyr_1.1.4             fontLiberation_0.1.0    RColorBrewer_1.1-3     
[21] Rcpp_1.1.0              pkgconfig_2.0.3         extrafont_0.20          rstudioapi_0.17.1       systemfonts_1.3.1      
[26] digest_0.6.39           farver_2.1.2            R6_2.6.1                tidyselect_1.2.1        pillar_1.11.1          
[31] magrittr_2.0.4          fontBitstreamVera_0.1.1 tools_4.5.2             withr_3.0.2             gtable_0.3.6   

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions