getParameter: Functions to interact with a Sparkline object

Description Usage Arguments Author(s) See Also Examples

Description

Basic functions to query parameters for objects of class 'sparkline', 'sparkbar', 'sparkbox', 'sparkTable' or 'geoTable'.

Usage

1
	getParameter(object, type)

Arguments

object

objects of class 'sparkline', 'sparkbar', 'sparkbox', 'sparkTable' or 'geoTable'

type

one of the following:

  • 'width': query slot 'width' for objects of class 'spark' and classes that directly extend this class.

  • 'height': query slot 'height' for objects of class 'spark' and classes that directly extend this class.

  • 'values': query slot 'values' for objects of class 'spark' and classes that directly extend this class.

  • 'padding': query slot 'padding' for objects of class 'spark' and classes that directly extend this class.

  • 'allColors': query slot 'allColors' for objects of class 'sparkline'.

  • 'lineWidth': query slot 'lineWidth' for objects of class 'sparkline'.

  • 'pointWidth': query slot 'pointWidth' for objects of class 'sparkline'.

  • 'showIQR': query slot 'showIQR' for objects of class 'sparkline'.

  • 'boxCol': query slot 'boxCol' for objects of class 'sparkbox'.

  • 'outCol': query slot 'outCol' for objects of class 'sparkbox'.

  • 'boxLineWidth': query slot 'boxLineWidth' for objects of class 'sparkbox'.

  • 'barCol': query slot 'barCol' for objects of class 'sparkbar'.

  • 'barSpacingPerc': query slot 'barSpacingPerc' for objects of class 'sparkbar'.

  • 'dataObj': query slot 'dataObj' for objects of class 'sparkTable'.

  • 'tableContent': query slot 'tableContent' for objects of class 'sparkTable'.

  • 'varType': query slot 'varType' for objects of class 'sparkTable'.

  • 'geographicVar': query slot 'geographicVar' for objects of class 'geoTable'.

  • 'geographicInfo': query slot 'geographicInfo' for objects of class 'geoTable'.

  • 'geographicOrder': query slot 'geographicOrder' for objects of class 'geoTable'.

Author(s)

Bernhard Meindl, Alexander Kowarik, Statistics Austria

See Also

setParameter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  data(pop)
  x <- pop[pop[,2]=="Insgesamt",3]
  a <- newSparkLine(values=x, pointWidth=8)
  
  a <- setParameter(a, type='values', value=sample(1:10, 15, replace=TRUE))
  getParameter(a, 'values')

  a <- setParameter(a, type='allColors',
    value=c("darkred", "darkgreen","darkblue", "white", "black", "red"))
  getParameter(a, 'allColors')

  getParameter(a, 'pointWidth')
  a <- setParameter(a, type='pointWidth', value=3)
  getParameter(a, 'pointWidth')
 
  a <- setParameter(a, type='lineWidth', value=1)
  a <- setParameter(a, type='width', value=6)
  a <- setParameter(a, type='height', value=.6)

Example output

Loading required package: Cairo
Loading required package: gridExtra
Loading required package: ggplot2
Loading required package: shiny
Loading required package: Rglpk
Loading required package: slam
Using the GLPK callable library version 4.52
package sparkTable (version 1.3.0) has been loaded!

 [1]  2  9  6  4  2 10  9  3 10  3  8  9  3  5  1
[1] "darkred"   "darkgreen" "darkblue"  "white"     "black"     "red"      
[1] 8
[1] 3

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