Closed danielnjoo closed 4 years ago
reproducible example pls.
My bad!
OK, working with your examples, in the case of the Base R version, I can't install remoji
because
Warning in install.packages : package ‘remoji’ is not available (for R version 3.4.1)
,
In the case of the ggplot2 example, no plot is made, and I receive the following warning 1: In grid.Call(C_textBounds, as.graphicsAnnot(x$label), ... : no font could be found for family "OpenSansEmoji"
I'm sure this is a really silly mistake!
you should use emojifont
, but not remoji
.
Totally understood, that's what I've tried using, but I was just running your baseR example code from here
require(remoji)
set.seed(123)
x <- rnorm(10)
set.seed(321)
y <- rnorm(10)
plot(x, y, cex=0)
text(x, y, labels=emoji('cow'), cex=1.5, col='steelblue', family='OpenSansEmoji')
Currently, I don't get errors but the emojis just fail to display? This is my code:
subset(Alcohol, year=2015) %>%
ggplot(aes(country, alcohol)) +
geom_point() +
geom_text(aes(country, alcohol, label=emoji('cow')))
and this is what it looks like: picture
Oh, that's my fault. I will update the web page soon.
Please follow the vignette.
Copying the examples in the vignette word for word gives me plots with no emojis and the following warnings:
In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "EmojiOne
Still
did you really load the package, library(emojifont)
?
Of course! You can see it in the namespace in my very first post
Just wanted to note that I'm having the same issue as @danielnjoo (e.g., running the vignette results in plots without emojis), and would love to know if there's a solution!
I also want to report the very same bug for me on mac
Same here. I'm on a Mac and it works as expect in the interactive session but as soon as I try to knit I get the above mentioned error.
Ah, sorry about the noise. I forgot to set the chunk option fig.showtext = TRUE
.
Also wanted to second the same warning and display issue. In the example below, the display is blank white:
library(emojifont)
library(ggplot2)
ggplot() +
geom_emoji("rose", color='steelblue') +
theme_void()
When the plot it is saved to a file, though, it displays as expected.
devtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#> setting value
#> version R version 3.5.1 (2018-07-02)
#> os macOS 10.14
#> system x86_64, darwin15.6.0
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz America/New_York
#> date 2019-01-16
#>
#> ─ Packages ──────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.0 2017-04-11 [1] CRAN (R 3.5.0)
#> backports 1.1.2 2017-12-13 [1] CRAN (R 3.5.0)
#> callr 2.0.4 2018-05-15 [1] CRAN (R 3.5.0)
#> cli 1.0.1 2018-09-25 [1] CRAN (R 3.5.0)
#> crayon 1.3.4 2018-12-20 [1] Github (r-lib/crayon@74bee76)
#> debugme 1.1.0 2017-10-22 [1] CRAN (R 3.5.0)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.0)
#> devtools 2.0.1 2018-10-26 [1] CRAN (R 3.5.1)
#> digest 0.6.18 2018-10-10 [1] CRAN (R 3.5.0)
#> evaluate 0.11 2018-07-17 [1] CRAN (R 3.5.0)
#> fs 1.2.6 2018-08-23 [1] CRAN (R 3.5.0)
#> glue 1.3.0 2018-07-17 [1] CRAN (R 3.5.0)
#> htmltools 0.3.6 2017-04-28 [1] CRAN (R 3.5.0)
#> knitr 1.20 2018-02-20 [1] CRAN (R 3.5.0)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.0)
#> memoise 1.1.0 2018-10-26 [1] Github (r-lib/memoise@99db7eb)
#> pkgbuild 1.0.2 2018-10-16 [1] CRAN (R 3.5.0)
#> pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.0)
#> prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.0)
#> processx 3.1.0 2018-05-15 [1] CRAN (R 3.5.0)
#> R6 2.3.0 2018-10-04 [1] CRAN (R 3.5.0)
#> Rcpp 1.0.0 2018-11-07 [1] CRAN (R 3.5.0)
#> remotes 2.0.2 2018-10-30 [1] CRAN (R 3.5.0)
#> rlang 0.3.1 2019-01-08 [1] CRAN (R 3.5.2)
#> rmarkdown 1.10 2018-06-11 [1] CRAN (R 3.5.0)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.0)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.0)
#> stringi 1.2.4 2018-07-20 [1] CRAN (R 3.5.0)
#> stringr 1.3.1 2018-05-10 [1] CRAN (R 3.5.0)
#> testthat 2.0.0 2017-12-13 [1] CRAN (R 3.5.0)
#> usethis 1.4.0 2018-08-14 [1] CRAN (R 3.5.0)
#> withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.0)
#> yaml 2.2.0 2018-07-25 [1] CRAN (R 3.5.0)
#>
#> [1] /Library/Frameworks/R.framework/Versions/3.5/Resources/library
Created on 2019-01-16 by the reprex package (v0.2.1)
Same issue. Anyone manage to fix this?
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Anarchy Linux
Matrix products: default
BLAS: /usr/lib/libblas.so.3.8.0
LAPACK: /usr/lib/liblapack.so.3.8.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] ggplot2_3.2.1 emojifont_0.5.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 sysfonts_0.8 withr_2.1.2 showtextdb_2.0
[5] crayon_1.3.4 dplyr_0.8.3 assertthat_0.2.1 grid_3.6.1
[9] R6_2.4.0 gtable_0.3.0 magrittr_1.5 scales_1.0.0
[13] pillar_1.4.2 rlang_0.4.0 lazyeval_0.2.2 labeling_0.3
[17] proto_1.0.0 showtext_0.7 glue_1.3.1 purrr_0.3.2
[21] munsell_0.5.0 compiler_3.6.1 pkgconfig_2.0.3 colorspace_1.4-1
[25] tidyselect_0.2.5 tibble_2.1.3
I can still report the same issue. Running on mac which a few of the others have reported.
library(emojifont)
library(ggplot2)
ggplot() +
geom_emoji("rose", color='steelblue') +
theme_void()
On loading the package I get 24 warnings:
1: In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "EmojiOne"
2: In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "EmojiOne"
3: In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "EmojiOne"
4: In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "EmojiOne"
5: In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "EmojiOne"
6: In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
no font could be found for family "EmojiOne"
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS 10.15.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] emojifont_0.5.3 ggplot2_3.3.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4 rstudioapi_0.11 knitr_1.28 magrittr_1.5 sysfonts_0.8 tidyselect_1.0.0
[7] munsell_0.5.0 colorspace_1.4-1 R6_2.4.1 rlang_0.4.5 dplyr_0.8.5 showtextdb_2.0
[13] tools_3.6.0 grid_3.6.0 gtable_0.3.0 xfun_0.12 withr_2.1.2 htmltools_0.4.0
[19] yaml_2.2.1 digest_0.6.25 assertthat_0.2.1 tibble_2.1.3 lifecycle_0.2.0 crayon_1.3.4
[25] farver_2.0.3 purrr_0.3.3 RColorBrewer_1.1-2 rsconnect_0.8.13 evaluate_0.14 glue_1.3.2
[31] rmarkdown_2.1 labeling_0.3 compiler_3.6.0 pillar_1.4.3 scales_1.1.0 showtext_0.7-1
[37] pkgconfig_2.0.3 proto_1.0.0
Interestingly the code runs in R, but it will have the same issue when running in RStudio on a Macintosh.
The following results in
In grid.Call.graphics(C_text, as.graphicsAnnot(x$label), ... :no font could be found for family "EmojiOne"
sessionInfo: R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Sierra 10.12.6
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] emojifont_0.5.0 lubridate_1.6.0 bindrcpp_0.2 okcupiddata_0.1.0 mosaic_1.1.0
[6] Matrix_1.2-11 mosaicData_0.14.0 ggformula_0.6 lattice_0.20-35 broom_0.4.2
[11] stringr_1.2.0 dplyr_0.7.3 purrr_0.2.3 readr_1.1.1 tidyr_0.7.1
[16] tibble_1.3.4 ggplot2_2.2.1 tidyverse_1.1.1
loaded via a namespace (and not attached): [1] reshape2_1.4.2 splines_3.4.1 haven_1.1.0 colorspace_1.3-2 rlang_0.1.2 foreign_0.8-69
[7] glue_1.1.1 modelr_0.1.1 readxl_1.0.0 bindr_0.1 plyr_1.8.4 mosaicCore_0.4.0 [13] munsell_0.4.3 gtable_0.2.0 cellranger_1.1.0 rvest_0.3.2 psych_1.7.5 labeling_0.3
[19] knitr_1.17 forcats_0.2.0 parallel_3.4.1 proto_1.0.0 Rcpp_0.12.13 scales_0.5.0
[25] showtext_0.4-6 jsonlite_1.5 sysfonts_0.7.1 gridExtra_2.2.1 mnormt_1.5-5 digest_0.6.12
[31] hms_0.3 stringi_1.1.5 showtextdb_2.0 grid_3.4.1 tools_3.4.1 magrittr_1.5
[37] lazyeval_0.2.0 ggdendro_0.1-20 pkgconfig_2.0.1 MASS_7.3-47 xml2_1.1.1 assertthat_0.2.0 [43] httr_1.3.1 R6_2.2.2 nlme_3.1-131 compiler_3.4.1