I am trying to create a summary of my table using summaryBy, that looks like the following
year qtr FX_mean FX_median
2000 1 1000000 1000000
2000 2 2000 1000
2000 3 3000 2000
The FX_mean and FX_median are currency. I am sending it to xtable, and then printing it to a LaTeX file. Now when I format, I was able to get the FX_mean and FX_median with 2 decimal points. But since it is currency, I want a "," after every thousand i.e. 1,000,000. I tried to use something like
format.args = list(big.mark = ",", decimal.mark = "."))
print(result, type="latex", file="output.tex", include.rownames=FALSE, booktabs = TRUE, floating = FALSE, format.args = list(big.mark = ",", decimal.mark = "."))
But it applies to the entire dataframe and so even for the years -- so I see 2,000 ... 2,007, etc. Is there a way to have the big.mark apply to FX_mean and FX_median alone?
year qtr FX_mean FX_median
2000 1 1,000,000.00 1,000,000.00
2000 2 2,000.00 1,000.00
2000 3 3,000.00 2,000.00