Skip to content

Instantly share code, notes, and snippets.

@moldach
Created February 5, 2020 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moldach/d184be424098e69f2dde3599b6cba83c to your computer and use it in GitHub Desktop.
Save moldach/d184be424098e69f2dde3599b6cba83c to your computer and use it in GitHub Desktop.
ggtext troubleshooting
# remotes::install_github("wilkelab/ggtext")
library(tibble)
library(ggplot2)
library(dplyr)
data <- tribble(
~bactname, ~OTUname, ~name, ~value,
"Staphylococcaceae", "OTU1", "Staphylococcaceae (OTU1)", -0.5,
"Moraxella", "OTU2", "Moraxella (OTU2)", 0.5,
"Streptoccus", "OTU3", "Streptococcus (OTU3)", 2.0,
"Acinetobacter", "OTU4", "Acinetobacter (OTU4)", 3.0
)
library(ggtext)
data %>%
ggplot(aes(name, value)) +
geom_col() +
coord_flip() +
ggtitle("species names are *in italics*") +
theme(plot.title = element_markdown())
@moldach
Copy link
Author

moldach commented Feb 5, 2020

Error in richtext_grob(label, x = x, y = y, hjust = hj, vjust = vj, halign = halign, :
unused arguments (halign = halign, valign = valign, debug = element$debug)

sessionInfo()

R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252 LC_NUMERIC=C                   
[5] LC_TIME=English_Canada.1252    

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

other attached packages:
[1] glue_1.3.1         ggplot2_3.3.0.9000 tibble_2.1.3       dplyr_0.8.3        ggtext_0.1.0      

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3        compiler_3.6.1    pillar_1.4.3      prettyunits_1.1.1 remotes_2.1.0     tools_3.6.1       digest_0.6.23     packrat_0.5.0    
 [9] pkgbuild_1.0.6    lifecycle_0.1.0   gtable_0.3.0      pkgconfig_2.0.3   rlang_0.4.2       cli_2.0.1         rstudioapi_0.10   curl_4.3         
[17] styler_1.2.0      withr_2.1.2       xml2_1.2.2        vctrs_0.2.2       rprojroot_1.3-2   grid_3.6.1        tidyselect_0.2.5  gridtext_0.1.0   
[25] R6_2.4.1          processx_3.4.1    fansi_0.4.1       rematch2_2.1.0    callr_3.4.1       purrr_0.3.3       farver_2.0.3      magrittr_1.5     
[33] backports_1.1.5   scales_1.1.0      ps_1.3.0          assertthat_0.2.1  colorspace_1.4-1  labeling_0.3      utf8_1.1.4        munsell_0.5.0    
[41] crayon_1.3.4 

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