title: Use a vector from an R markdown code chunk in a LaTeX environment (pmatrix)?
body: <p>I want to create a column vector in R markdown from a variable in a code chunk.  Namely, I want to use the <code>\begin{pmatrix}</code> environment.  But in LaTeX, each element of the vector is separated by a newline <code>\\</code>.  The code in LaTeX would be as follows:</p>
  
  <p><code>\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}</code>.</p>
  
  <p>I want it to produce the following:
  <a href="https://i.stack.imgur.com/mnqS9.jpg" rel="nofollow noreferrer">column vector with parentheses</a>
  where x_1, x_2, and x_3 are the elements of a numeric vector in an R code chunk.</p>
  
  <p>Is this possible?</p>