Description Usage Arguments Author(s) See Also Examples
User-function to create objects of the class 'geoTable'.
1 | newGeoTable(dataObj, tableContent, varType, geographicVar, geographicInfo=NULL)
|
dataObj |
a data frame containing information to be plotted. |
tableContent |
a list with elements of class 'sparkline','sparkbox','sparkbar' or 'function' |
varType |
a character vector containing variable names existing in dataObj. |
geographicVar |
a character variable of length 1 with a variable name of dataObj that holds regional information. |
geographicInfo |
if specified, a data.frame containing 3 columns.
|
Bernhard Meindl, Alexander Kowarik, Statistics Austria
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
###Example 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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.