I'm writing a tutorial for my students to demonstrate what group_by() does. I want to highlight the fact that it doesn't do anything that is visible to the tibble except denote the grouping variable.Like this:
# A tibble: 32 x 11
# Groups: cyl [3]
mpg cyl disp hp drat wt qsec vs am gear carb
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 21 6 160 110 3.9 2.62 16.5 0 1 4 4
2 21 6 160 110 3.9 2.88 17.0 0 1 4 4
However, rmarkdown (I'm using the learnr package, but don't think it should matter) renders the table nicely and eliminates the header portion. How do I get that header portion to display in the rmarkdown output? I thought the results='asis' option would do the trick, but it has no effect. Any help would be appreciated.
Thanks in advance.
Matt