Skip to content

Commit

Permalink
Merge pull request #518 from naupaka/knitr-solutions
Browse files Browse the repository at this point in the history
Knitr solutions
  • Loading branch information
naupaka authored Jun 5, 2019
2 parents c5abd11 + 89f22dd commit 2169686
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions _episodes_rmd/15-knitr-markdown.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,23 @@ produced them.
>
> > ## Solution to Challenge 2
> >
> > ```{r load-ggplot2}` r ''`
> > <pre>
> > &#96;&#96;&#96;{r load-ggplot2}
> > library("ggplot2")
> > ```
> > &#96;&#96;&#96;
> > </pre>
> >
> > ```{r read-gapminder-data}` r ''`
> > <pre>
> > &#96;&#96;&#96;{r read-gapminder-data}
> > gapminder <- read.csv("gapminder.csv")
> > ```
> > &#96;&#96;&#96;
> > </pre>
> >
> > ```{r make-plot}` r ''`
> > <pre>
> > &#96;&#96;&#96;{r make-plot}
> > plot(lifeExp ~ year, data = gapminder)
> > ```
> > &#96;&#96;&#96;
> > </pre>
> >
> {: .solution}
{: .challenge}
Expand Down Expand Up @@ -379,9 +385,11 @@ names, like `fig.path="Figs/cleaning-"` and `fig.path="Figs/analysis-"`.
>
> > ## Solution to Challenge 3
> >
> > ```{r, echo = FALSE, fig.width=3}` r ''`
> > <pre>
> > &#96;&#96;&#96;{r echo = FALSE, fig.width = 3}
> > plot(faithful)
> > ```
> > &#96;&#96;&#96;
> > </pre>
> >
> {: .solution}
{: .challenge}
Expand Down

0 comments on commit 2169686

Please sign in to comment.