Printing the value of an R variable in Latex <p>I am writing .Rnw file in RStudio. At one point, I store (but do not print) the value of the number of rows (nR) of a data frame (df), using the following command:</p> <pre><code>&lt;&lt;results = hide, echo=FALSE&gt;&gt;= nR = nrow(sbGeneal) nC = ncol(sbGeneal) @ </code></pre> <p>Late, in the .Rnw file, I would like to use the nR variable and print it. An equivalent syntax in .Rmd (markdown) would be:</p> <pre><code>`r nrow(sbGeneal)` </code></pre> <p>Is there such a possibility in Latex? Thanks!</p>