newSparkBar: Functions to create new Spark object

Description Usage Arguments Author(s) See Also Examples

Description

Basic functions to create objects of the class 'spark'. The functions are the base for creating a graphical table.

Usage

1
2
3
4
5
6
7
8
9
newSparkLine(width=NULL, height=NULL, values=NULL, padding=NULL, allColors=NULL,
  pointWidth=NULL, lineWidth=NULL, showIQR=NULL, vMin=NULL, vMax=NULL,outputType="html")
newSparkBar(width=NULL, height=NULL, values=NULL, padding=NULL, barCol=NULL,
  barWidth=NULL, barSpacingPerc=NULL, vMin=NULL, vMax=NULL,bgCol=NULL,outputType="html")
newSparkBox(width=NULL, height=NULL, values=NULL, padding=NULL, boxOutCol=NULL,
    boxMedCol=NULL, boxShowOut=NULL, boxCol=NULL, boxLineWidth=NULL,
    vMin=NULL, vMax=NULL,bgCol=NULL,outputType="html")
newSparkHist(width=NULL, height=NULL, values=NULL, padding=NULL, barCol=NULL,
  barWidth=NULL, barSpacingPerc=NULL, vMin=NULL, vMax=NULL,bgCol=NULL,outputType="html")

Arguments

width

described in setParameter

height

described in setParameter

values

described in setParameter

padding

described in setParameter

allColors

described in setParameter

pointWidth

described in setParameter

lineWidth

described in setParameter

showIQR

described in setParameter

vMin

numeric vector of length 1 definining minimum value required for data scaling

vMax

numeric vector of length 1 definining maximum value required for data scaling

barCol

described in setParameter

barWidth

described in setParameter

barSpacingPerc

described in setParameter

boxOutCol

character vector of length 1 defining the color of outliers in spark boxplots

boxMedCol

character vector of length 1 defining the color of median line in spark boxplots

boxShowOut

logical vector specifying if outliers should be displayed in spark boxplots

boxCol

described in setParameter

boxLineWidth

described in setParameter

bgCol

described in setParameter

outputType

described in plot

Author(s)

Bernhard Meindl, Alexander Kowarik, Statistics Austria

See Also

plot, export, setParameter, getParameter

Examples

 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  ## Not run: 
  data(pop)
  x <- pop[pop[,2]=="Insgesamt",3]

  ### SparkLine
  a <- newSparkLine(values=x, pointWidth=8)
  export(a, outputType='png', filename='testLine1')

  a <- setParameter(a, sample(1:10, 15, replace=TRUE), type='values')
  getParameter(a, type='values')

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

  a <- setParameter(a, 3, type='pointWidth')
  a <- setParameter(a, 1, type='lineWidth')

  export(a, outputType="pdf", filename='testLine2')

  a <- setParameter(a, 6, type='width')
  a <- setParameter(a, .6, type='height')
  export(a, outputType='eps', filename='testLine2')

  ### SparkBar
  b <- newSparkBar(values=x-min(x))
  getParameter(b, type='values')

  b <- setParameter(b, c("darkred", "darkgreen","black"), type='barCol')
  export(b, outputType='pdf', filename='testBar1')

  b <- setParameter(b, 0:10, type='values')
  export(b, outputType='pdf', filename='testBar2')

  b <- setParameter(b, 0:-10, type='values')
  export(b, outputType='pdf', filename='testBar3')

  ### SparkBox
  cc <- newSparkBox(values=x)
  cc <- setParameter(cc, "darkgreen", type='outCol')
  getParameter(cc, type='outCol')
  cc <- setParameter(cc, c("black","red"), type='boxCol')

  export(cc, outputType='pdf', filename='testBox1')

  cc <- setParameter(cc, c("black","darkgreen"), type='boxCol')
  cc <- setParameter(cc, "darkred", type='outCol')
  export(cc, outputType='pdf', filename='testBox2')

  ###SparkHist
  hh <- newSparkHist(values=rnorm(100))
  export(hh, outputType='pdf', filename='testHist1')
  
## End(Not run)

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