Description Usage Arguments Author(s) See Also Examples
Basic functions to create objects of the class 'spark'. The functions are the base for creating a graphical table.
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")
|
width |
described in |
height |
described in |
values |
described in |
padding |
described in |
allColors |
described in |
pointWidth |
described in |
lineWidth |
described in |
showIQR |
described in |
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 |
barWidth |
described in |
barSpacingPerc |
described in |
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 |
boxLineWidth |
described in |
bgCol |
described in |
outputType |
described in |
Bernhard Meindl, Alexander Kowarik, Statistics Austria
plot
, export
, setParameter
, getParameter
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.