R code inside math notation R Markdown -
in r markdown, can inline r code chunk run inside single $
math notation (only *
before), not double $$
math notation:
* $h_o = `r 1 + 1`$
works, but:
$h_o = `r 1 + 1`$
doesn't work, , neither does:
$$h_o = `r 1 + 1`$$
the double $$
more flexible being able put math notation on multiple lines, how can add inline code chunks inside?
i ran example , worked fine me! here link pdf , github .md documents generated. , here link rmarkdown document.
i'm using r 3.4.1, knitr 1.16, , rmarkdown 1.6.
perhaps should check version of rmarkdown , knitr. have noticed on years version updates, , using recent dev version, can fix litany of small issues arise.
Comments
Post a Comment