[R-pkg-devel] Rmarkdown fails if (quote) r (space) is used

J C Nash pro|jcn@@h @end|ng |rom gm@||@com
Fri Nov 3 17:18:24 CET 2023


Yes. An initial space does the trick. Thanks. J

On 2023-11-03 11:48, Serguei Sokol wrote:
> Le 03/11/2023 à 15:54, J C Nash a écrit :
>> 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` ...
> To avoid a confusion between inline code and fixed font typesetting, could it be
> 
>     Thus we have ` r = 1` ...
> 
> (with a space after an opening quote)?
> 
> Best,
> Serguei.
> 
>>
>> 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 using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list