newGeoTable: Functions to create a new object of class 'geoTable'

Description Usage Arguments Author(s) See Also Examples

Description

User-function to create objects of the class 'geoTable'.

Usage

1
  newGeoTable(dataObj, tableContent, varType, geographicVar, geographicInfo=NULL)

Arguments

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.

  • first column: row-indices

  • second column: column-indices

  • third column: regional codes

Author(s)

Bernhard Meindl, Alexander Kowarik, Statistics Austria

See Also

export

Examples

 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)

sparkTable documentation built on May 2, 2019, 9:34 a.m.