-1

This is what I have so far:

`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}

The result should look something like this:

enter image description here

My result only return one row but the totals are the same.

katcsc
  • 35
  • 1
  • 5

1 Answers1

1

I will use ktable.

kable(table, "latex")
J Chang
  • 36
  • 2