Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

revealEquations

This is some code that can be used to reveal equations line by line when making quarto or xaringan presentations, similar to “pausing” in Beamer. It’s possible this functionality exists somewhere else, but I had trouble finding it.

Here is an example of some code (for quarto) to produce slides that step through equations:

---
title: "revealEquations Demo"
format: revealjs
---

## Slide 1

Some info

```{r results="asis"}
eqlist <- list("E[Y] &= E[Y|X=1]P(X=1) + E[Y|X=0]P(X=0) \\",
               "&= 1 \\times 0.5 + 0 \\times 0.5 \\",
               "&= 0.5")
before <- "Suppose that we know that $E[Y|X=1]=1$, $E[Y|X=0]=0$, $P(X=1)=0.5$,
 and $P(X=0) = 0.5$, then the law of iterated expecations implies that"
after <- "concluding text"
title <- "Law of Iterated Expectations Example"
revealEquations::step_by_step_eq(eqlist, before, after, title)
``` 

and you can see the slides themselves here.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages