A code chunk does always begin with a triple backtick at the beginning of a line. The term for what you encountered is "inline code" used to embed computed results into the markdown text as though you had typed them directly.
Check out https://www.r-bloggers.com/2017/12/how-to-show-r-inline-code-blocks-in-r-markdown for relevant discussion. On November 3, 2023 7:54:22 AM PDT, J C Nash <profjcn...@gmail.com> wrote: >I've spent a couple of hours with an Rmarkdown document where I >was describing some spherical coordinates made up of a radius r and >some angles. I wanted to fix the radius at 1. > >In my Rmarkdown text I wrote > > Thus we have `r = 1` ... > >This caused failure to render with "unexpected =". I was using Rstudio >at first and didn't see the error msg. > >If I use "radius R" and `R = 1`, things are fine, or `r=1` with no space, >but the particular "(quote) r (space)" seems to trigger code block processing. > >Perhaps this note can save others some wasted time. > >I had thought (obviously incorrectly) that one needed ```{r something} >to start the code chunk. > >JN > >______________________________________________ >R-package-devel@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Sent from my phone. Please excuse my brevity. ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel