Search code examples
r-markdownreticulate

Rmarkdown - python inline code in Rmarkdown


I am using Rmarkdown with python. What is the equivalent of the R inline code for python? Example, in https://rmarkdown.rstudio.com/lesson-4.html I can do

``r x`

to display the value of x in the text. but If I do

``python x`

I just get the text python x


Solution

  • Not sure whether this is possible. All examples I have found use R inline code like so `r py$x` to achieve that. See e.g. the rmarkdown cookbook.