如何使用RMarkdown在TeX中按名称变量分组?

问题描述

这是我到目前为止所拥有的:

`r Name`
    
\begin{tabular}{cccccc}
       \textbf{ID} & \textbf{Code} & \textbf{Amount} \\
       `r id` & `r code` & \$ `r amount` 
    \end{tabular}
    
    
    
    \begin{flushright} \textbf{SUBTOTAL: \$ `r subtotal`} \\
    \textbf{FEE: \$ `r fee`} \\
    \textbf{TOTAL: \$ `r total`} \end{flushright}

结果应如下所示:

enter image description here

我的结果仅返回一行,但总数相同。

解决方法

我将使用ktable。

kable(table,"latex")

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...