1

I am facing an issue while dealing with emojis on RStudio. I am using macOS and LibreOffice to open my CSV files in UTF-8 and it displays emojis perfectly. But when it comes to RStudio it cannot render it. I tried multiple techniques including things mentioned here but still facing the same issue.

Additionally, I checked the encoding of a text column of my data frame which is read using read_csv2() but it gives "unknown"

Even the locale is set as shown here:

> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.4

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/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     

loaded via a namespace (and not attached):
 [1] NLP_0.2-1         Rcpp_1.0.8.3      pillar_1.7.0      compiler_4.2.0    tools_4.2.0      
 [6] stopwords_2.3     digest_0.6.29     evaluate_0.15     lifecycle_1.0.1   tibble_3.1.7     
[11] pkgconfig_2.0.3   rlang_1.0.2       DBI_1.1.2         cli_3.3.0         yaml_2.3.5       
[16] parallel_4.2.0    xfun_0.31         fastmap_1.1.0     knitr_1.39        dplyr_1.0.9      
[21] xml2_1.3.3        generics_0.1.2    vctrs_0.4.1       syuzhet_1.0.6     tidyselect_1.1.2 
[26] glue_1.6.2        data.table_1.14.2 R6_2.5.1          qdapRegex_0.7.5   fansi_1.0.3      
[31] rmarkdown_2.14    lexicon_1.2.1     textclean_0.9.3   purrr_0.3.4       sentimentr_2.9.0 
[36] magrittr_2.0.3    ellipsis_0.3.2    htmltools_0.5.2   assertthat_0.2.1  utf8_1.2.2       
[41] slam_0.1-50       tm_0.7-8          crayon_1.5.1

Also, I checked the Global Options setting on RStudio and reinstalled it again but no promising solution.

enter image description here

I basically want toenter image description here process this emoji and show output on HTML but it seems not done properly

It would be helpful if someone can help with this.

Ranji Raj
  • 778
  • 4
  • 18
  • Please [edit] your question to provide a [mcve]. – JosefZ Jun 18 '22 at 10:04
  • Have you tried [An Introduction to emojifont package ](https://cran.r-project.org/web/packages/emojifont/vignettes/emojifont.html) or (emo(ji))[https://github.com/hadley/emo] – Mohamed Desouky Jun 18 '22 at 10:05
  • You may find [this](https://stackoverflow.com/questions/47855762/displaying-emojis-symbols-in-python-using-tkinter-lib) helpful. – Thingamabobs Jul 24 '22 at 23:13

0 Answers0