R: formatting the digits in xtable

半世苍凉 提交于 2019-12-06 03:41:37

If you just want to reformat the amount column and present in an xtable, then you need to supply xtable with a dataframe, just supplying one column makes it looks like a character vector.

evolution$tab.for <- formatC(evolution$amount,digits=1,format="f")

evolutionxtable<-xtable(subset(evolution, select=c(date, type, tab.for)))

print(evolutionxtable)
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!