Closed JiaxiangBU closed 5 years ago
Thank you so much for the heads up and the reprex!
I believe this is now fixed by 0edd78a774b35f48c76add4a2a65651d6231ed50
It works with both reprex
and rmarkdown::render
.
library(demoR)
library(tidyverse)
#> Warning: 程辑包'ggplot2'是用R版本3.5.3 来建造的
#> Warning: 程辑包'tibble'是用R版本3.5.3 来建造的
#> Warning: 程辑包'tidyr'是用R版本3.5.3 来建造的
#> Warning: 程辑包'purrr'是用R版本3.5.3 来建造的
#> Warning: 程辑包'dplyr'是用R版本3.5.3 来建造的
#> Warning: 程辑包'stringr'是用R版本3.5.3 来建造的
#> Warning: 程辑包'forcats'是用R版本3.5.3 来建造的
demo_code('
iris %>%
group_by(Species) %>%
summarize(mean(Sepal.Length))
') %>%
hlt_fixed("%>%")
iris %>%
group_by(Species) %>%
summarize(mean(Sepal.Length))
#> # A tibble: 3 x 2
#> Species `mean(Sepal.Length)`
#> <fct> <dbl>
#> 1 setosa 5.01
#> 2 versicolor 5.94
#> 3 virginica 6.59
Created on 2019-08-09 by the reprex package (v0.2.1)
---
author: Jiaxiang Li
date: "`r Sys.Date()`"
output: html_document
---
```{r}
library(demoR)
library(tidyverse)
demo_code('
iris %>%
group_by(Species) %>%
summarize(mean(Sepal.Length))
') %>%
hlt_fixed("%>%")
![image](https://user-images.githubusercontent.com/15884785/62765692-37db0380-bac3-11e9-99c2-27096d97231a.png)
Thanks a lot! @kbodwin
Here is the reproducible minimal example.
Created on 2019-08-08 by the reprex package (v0.2.1)
It works well when I choose
reprex
to make a reproducible example. However, when I run the same code in a chunk of a Rmd document, I get this sort of error.