results='asis' Rmarkdown

Hello everybody,

I've been looking for a while but I don't find the solution to my problem. I work with rmarkdown and for some package I should use results='asis' in the chunk to generate a pretty table when I knit. However, it does never work because each time it is written attempt to use zero-length variable name. I did update et restart everything a few times.

for exemple

```{r Age, echo=FALSE, results='asis'}
Testing<-descr(Age)
Testing %>%
  kbl(caption = "Recreating booktabs style table", format = 'html') %>%
  kable_classic(full_width = F, html_font = "Cambria")
```

attemt to use zero-length variable name

I don't think this is related to result asis. It seems there is something that is missing your table code.

Do this code render on the R console ? or interactively in the Notebook ?

The error message says that a variable name is incorrect it seems.

Hello,

Thank you for your answer. This code render in the Notebook. However, I only have this error message if I add result asis. But if I don't add it I can only see the graph on Rstudio but not when I knit

That is odd. I may have missed something

I would need a reproducible example to look deeper. Currently your example contains data I don't have. So I can't test

This topic was automatically closed 21 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.