Last active
December 21, 2015 17:28
-
-
Save mages/6340383 to your computer and use it in GitHub Desktop.
A formatted table with googleVis. Requires googleVis 0.4.4 or higher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dat <- data.frame(Product=c("Milk", "Butter", "Yoghurt", "<b>Sum</b>"), | |
Revenue=c(2230, 43908, 231, 46369)) | |
dat <- within(dat, {'% of Revenue' <- c(Revenue / Revenue[4])}) | |
library(googleVis) | |
tbl <- gvisTable(dat, options=list(width=300, height=150), | |
formats=list(Revenue="#,###", '% of Revenue'='#.#%'), | |
chartid="formattedtable") | |
plot(tbl) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment