2

When running this code from an r markdown file:

---
output: pdf_document
---

```{r test}
library(extrafont)
library(waffle)
parts <- c(80, 30, 20, 10)
waffle(parts, rows=8, use_glyph="shield")


```

I'm getting the following warnings that look something like:

## Warning: Removed 4 rows containing missing values (geom_text).
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x
## $y, : conversion failure on 'ï„2' in 'mbcsToSbcs': dot substituted for <ef>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x
## $y, : conversion failure on 'ï„2' in 'mbcsToSbcs': dot substituted for <84>  

I've tried several things such as:

Note that the glyphs are properly rendered when outputing an HTML file. They are also correctly rendered when just calling the waffle code in the console.

I can even render fontawesome symbols directly through the latex fontawesome package by typing something such as \faAmazon

I've sunken most of today in trying to figure this out (100% sunken cost fallacy at this point).

Edit: Just FYI incase anyone else runs into this. I rendered the chart as a .png, as a temporary file and called the image back. Still looking for the proper way to do this as I would assume I'm losing some image quality along the way.

Matt
  • 174
  • 1
  • 2
  • 14

0 Answers0