Reputation: 435
I have this report.Rmd example below
---
title: "Report"
author: "Me"
date: "`r format(Sys.time(), '%d de %B de %Y')`"
output:
html_document
---
## Test
```{r first, echo=FALSE, message=FALSE, results='asis'}
library(tidyverse)
library(gt)
print( mtcars %>% gt() )
```
it works fine in Knit with RStudio
but when I try to create it from an external file this way
rmarkdown::render('report.Rmd', output_file = paste0('report.html'))
It shows all the messages and outputs in the console and in view pane, generates de html file, but it does not print the gt table.
What am I missing?
Upvotes: 2
Views: 1443