
Using typeR with Quarto Presentations
Source:vignettes/quarto-presentations.Rmd
quarto-presentations.RmdOverview
The typeR package provides excellent support for Quarto presentations, allowing you to create engaging live coding demonstrations for:
- 🎓 Teaching - Show students how code is written step-by-step
- 🎤 Conference talks - Demonstrate concepts with live coding effects
- 📹 Tutorial videos - Record professional coding tutorials
- 👥 Workshops - Engage audiences with interactive demonstrations
Quick Start
Included Examples
The package includes ready-to-use Quarto presentation examples:
# Find the example file
demo_file <- system.file("examples/demo-presentation.qmd", package = "typeR")
# Run it
typeRun(demo_file)
# Or the simpler version
simple_file <- system.file("examples/simple-presentation.qmd",
package = "typeR")
typeRun(simple_file, delay = 0.05)Supported Quarto Formats
typeR works with various Quarto presentation
formats:
reveal.js (Default)
Most popular format for HTML presentations. Supports themes, transitions, and interactive features.
PowerPoint
While the typing effect works during development, the final PowerPoint won’t show animation.
Beamer (PDF)
LaTeX-based PDF slides. typeRun() helps during
development to test code.
Best Practices
3. Use Interactive Pause
During live presentations, pause to answer questions:
typeRun("presentation.qmd")
# Press ESC to pause
# Enter 1 to resume
# Enter 2 to stop4. Test Before Presenting
Always do a full run-through before your actual presentation:
# Full test run
typeRun("my-talk.qmd", delay = 0.05)
# Check for errors or unexpected outputExample: Full Presentation Workflow
Step 1: Create Content
---
title: "Data Analysis in R"
format:
revealjs:
theme: moon
transition: slide
---
## Introduction
Today we'll analyze the mtcars dataset.
## Load Data
# ```{r}
# data(mtcars)
# head(mtcars, 3)
# ```
## Summary Statistics
# ```{r}
# summary(mtcars$mpg)
# ```
## Visualization
# ```{r}
# plot(mtcars$wt, mtcars$mpg,
# xlab = "Weight", ylab = "MPG",
# main = "Fuel Efficiency vs Weight")
# ```
## Model
# ```{r}
# model <- lm(mpg ~ wt, data = mtcars)
# summary(model)
# ```Step 2: Practice
# Save the above as "data-analysis.qmd"
typeRun("data-analysis.qmd", delay = 0.06, max_print = 8)Step 3: Present Live
During your presentation:
- Open R/RStudio
- Load typeR:
library(typeR) - Run:
typeRun("data-analysis.qmd", delay = 0.08) - Let the code type out automatically
- Use ESC to pause for questions
Tips for Success
Troubleshooting
Issue: Code types too fast
Solution: Increase the delay parameter
typeRun("presentation.qmd", delay = 0.12)Issue: Output is too long
Solution: Use max_print or modify your code to show less
typeRun("presentation.qmd", max_print = 5)Issue: Plots don’t display
Solution: Make sure your graphics device is open and functioning
# Test graphics device
plot(1:10) # Should work before starting typeRunReal-World Use Cases
Conference Talk
# 20-minute presentation
typeRun("conference-talk.qmd",
delay = 0.06, # Fast enough to keep pace
max_print = 6) # Brief outputsGetting Help
-
Documentation: See
?typeRunfor all parameters -
Examples: Check
inst/examples/directory - Issues: Report bugs at https://github.com/Fgazzelloni/typeR/issues
- Community: Share your presentations using #typeR
Conclusion
typeR makes Quarto presentations more engaging and professional. The combination of:
- ✨ Visual appeal - Typing animation catches attention
- 🎯 Educational value - Shows code construction process
- 💪 Flexibility - Works with any Quarto format
- 🛠️ Ease of use - Just one function call
Makes it an excellent tool for anyone presenting R code.
Happy presenting! 🎉