Quarto errors out when calling DT inline

In my quarto document, the following code works when I render the chuck.

```{r da-table, echo=FALSE, message=FALSE}

atsi.need <- datatable(iris)

atsi.need


but , outside of the chunk this gives me the following error:


Under ESSA student groups are identified for Additional Targeted Support and Improvement. 

`r atsi.need`


and the error message is

Error in rep_len(label, length(meta)) : 
  cannot replicate NULL to a non-zero length
Calls: .main ... in_dir -> inline_exec -> sew -> <Anonymous> -> knit_meta_add
Execution halted

Your object is a datatable from DT - it can be used inline in knitr - it needs to be added in a chunk.
Inline chunk are only for string output (or one that could be coerced to string)

Do this

Under ESSA student groups are identified for Additional Targeted Support and Improvement. 
```r
atsi.need
```
1 Like

But as this works with R Mardown and knitr quarto I have open an issue

Thanks for the report

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.