Description Usage Arguments See Also Examples
Interactive modification of an sparkTable-class
1 | customizeSparkTable(object, outputDir=getwd())
|
object |
an object of class |
outputDir |
a path to a directory for the output (Default=current working directory) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
data(pop,package="sparkTable")
b <- newSparkBox()
l <- newSparkLine()
bb <- newSparkBar()
content <- list(
function(x) { round(mean(x),2) },
b,
l,
bb,
function(x) { round(tail(x,1),2) }
)
names(content) <- paste("column",1:length(content),sep="")
varType <- rep("value",length(content))
pop <- pop[,c("variable","value","time")]
pop$time <- as.numeric(as.character(pop$time))
xx <- reshapeExt(pop, varying=list(2))
x1 <- newSparkTable(xx, content, varType)
x1@dataObj$v1 <- rpois(nrow(xx),1)
x1@dataObj$v2 <- rpois(nrow(xx),2)
x1@dataObj$v3 <- rpois(nrow(xx),3)
customizeSparkTable(x1, outputDir=getwd())
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.