## Not run:
# data(pop)
# x <- pop[pop[,2]=="Insgesamt",3]
# a <- newSparkLine(values=x, pointWidth=8)
# export(a, outputType=c('pdf','png'), filename='myFirstSparkLine')
#
# # simple graphical table
# 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)
# export(x1, outputType="html", graphNames="o2",filename="t1")
# export(x1, outputType="tex", graphNames="o3",filename="t2")
#
# ##Geo-Table: EU population and debt
# data(popEU,package="sparkTable")
# data(debtEU,package="sparkTable")
# data(coordsEU,package="sparkTable")
# popEU <- popEU[popEU$country%in%coordsEU$country,]
# debtEU <- debtEU[debtEU$country%in%coordsEU$country,]
# EU <- cbind(popEU,debtEU[,-1])
# EUlong <- reshapeExt(EU,
# idvar="country",v.names=c("pop","debt"),
# varying=list(2:13,14:25),geographicVar="country",timeValues=1999:2010
# )
# l <- newSparkLine()
# l <- setParameter(l, 'lineWidth', 2.5)
# content <- list(
# function(x){"Population:"},
# l,function(x){"Debt:"},l)
# varType <- c(rep("pop",2),rep("debt",2))
# xGeoEU <- newGeoTable(EUlong, content, varType,geographicVar="country",
# geographicInfo=coordsEU)
# export(xGeoEU, outputType="html", graphNames="outEU",
# filename="testEUT",transpose=TRUE)
# export(xGeoEU, outputType="html", graphNames="outEU1",
# filename="testEU", transpose=FALSE)
# export(xGeoEU, outputType="tex", graphNames="out1",
# filename="testEU",transpose=FALSE)
# #export(xGeoEU, outputType="tex", graphNames="out1",
# filename="testEUT",transpose=TRUE)
# ## End(Not run)
Run the code above in your browser using DataLab