Skip to Content

sparkEPS {sparkTable}

Create a sparkline as EPS graphic
Package: 
sparkTable
Version: 
0.1.3

Description

The function creates an EPS file of the selected type and with given parameters.

Usage

sparkEPS(filename, para, type)

Arguments

filename
the name of the file where the data will be saved.
para
list of parameters produces by the spark_init function
type
either "line", "bar", or "box"

See Also

print.sparkTable, setPara, sparkTable_Config, spark,         spark_init, sparkHTML,, sparkEPS

Examples

# GDP per capita in Purchasing Power Standards (PPS) (EU-27 = 100)
 
data(gdp)
 
meta <- sparkTable_Config(gdp, groups=c("EU27","AT","DE","TR"), 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;groupVar="region", 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vars=c("gdp"), 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeNumeric=list(c("min","max","last"))&nbsp;&nbsp;&nbsp;&nbsp;, 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typePlot=c("line","bar"),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output="eps")
 
# creating a tex-document in the directory examples
obj <- print(meta,outdir="examples",outfile="gdp.tex")
 
# --------------------------------
 
# production index 
data(dat)
 
pi_konsum <- dat$Konsumgueter[6:67]
 
# creating a line, box plot and bar plot
para <- spark_init(pi_konsum, type="line")
sparkEPS("examples/pi_konsum_line.eps",para,type="line")
 
para <- spark_init(pi_konsum, type="box")
sparkEPS("examples/pi_konsum_box.eps",para,type="box")
 
para <- spark_init(pi_konsum, type="bar")
sparkEPS("examples/pi_konsum_bar.eps",para, type="bar")

Author(s)

Bernhard Meindl, Alexander Kowarik, Statistics Austria

Documentation reproduced from package sparkTable, version 0.1.3. License: GPL