在R-markdown中创建乳胶基质

在R-markdown中创建乳胶基质,r,matrix,latex,R,Matrix,Latex,我应该如何修改此短程序(使用随机表): 可能重复的 ```{r, results='tex'} library(xtable) A <- matrix(c(2,-5,4,1,-2.5,1,1,-4,6),byrow=T,nrow=3,ncol=3) print(xtable(A), type="latex") ``` $$\begin{equation*} \mathbf{}\left[\begin{matrix} 2 & -5 & 4\\ 1 & -2.5 &a

我应该如何修改此短程序(使用随机表):

可能重复的
```{r, results='tex'}
library(xtable)
A <- matrix(c(2,-5,4,1,-2.5,1,1,-4,6),byrow=T,nrow=3,ncol=3)
print(xtable(A), type="latex")
```
$$\begin{equation*}
\mathbf{}\left[\begin{matrix}
2 & -5 & 4\\ 1 & -2.5 & 1\\ 1 & -4 & 6
\end{matrix}\right] 
\end{equation*}
$$