9

I have the following Rmarkdown code, which uses Hadley's emo(ji) package.

---
title: "My First Shiny"
runtime: shiny
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: scroll
---


```{r setup, include=FALSE}
```


Rows {data-height=800}
-----------------------------------------------------------------------

### Section1 `r strrep(emo::ji("heart_eyes_cat"), 5)`

Some text

In my Rstudio IDE it has no problem generating this:

enter image description here

As highligted in the image the emoji failed to show up in my local Shiny-server.

How can I enable it?

pdubois
  • 7,640
  • 21
  • 70
  • 99

1 Answers1

8

According to the github documentation, your files should read something like the following:

S3method(print,emoji)
export(ji)
export(ji_find)
export(ji_p)


ji_p <- function(x) {
   stopifnot(is.numeric(x))

   out <- stats::symnum(x,
     corr = FALSE,
     na = FALSE,
     cutpoints = c(0, 1e-5, 0.001, 0.01, 0.05, 0.1, 1),
     symbols = c(ji("laughing"), ji("joy"), ji("grin"), ji("smile"), ji("thinking"), ji("poop"))
   )

   structure(out, class = c("emoji", class(out)))

 }

I didn't see any shorthand indicated as you seem to have used (using the , 5) in your code and the r prefix seems now to have been removed; when used inline it is used but there is a need to use extra 'ticks' before and after it like so:

 `` `r emo::ji("smile")` ``

Are you using an older version of the commit? The need for knitr has been removed and it now requires only tibble. Check this latest commit doc out

I hope this is of assistance

baxx
  • 3,956
  • 6
  • 37
  • 75
Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81