Closed Robinlovelace closed 4 years ago
Reproducible example, create a file called test.Rmd and paste the following, then run:
---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
institute: "RStudio, PBC"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
# runtime: shiny
---
background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/be/Sharingan_triple.svg)
```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
???
Image credit: Wikimedia Commons
library(shiny)
library(fabricerin)
ui <- fluidPage(
fabric_drawing(cid = "canvas123")
)
server <- function(input, output){}
shinyApp(ui, server)
Hi Robin,
You can use the fabricerin package in xaringan slides just as you use it with Rmd documents (see here : https://ihaddadenfodil.com/post/fabricering-a-tutorial/). Don't use the Shiny functions with Rmd documents.
Best.
Example ###################################### .pull-left[
library(ggplot2)
ggplot(mpg, aes(hwy, cty)) +
geom_point()
```]
.pull-right[
```{r echo = FALSE}
library(fabricerin)
fabric_drawing("canvaId")
Confirmed, it works, no shiny needed (all examples in the readme use shiny which is what confused me):
Indeed, it's a bit confusing, I've separated Shiny docs (in the README) and Rmd docs (within my website). Maybe I'll modify that structure.
The readme states that
Awesome, but how? I looked at the original tweet and an associated issue: https://github.com/yihui/xaringan/issues/204
Thanks for a fantastic package. FYI, it works great with a Wacom drawing tablet and pen :pen: :tada: