Learn R Programming

sparkTable (version 0.1.3)

print.sparkTable: Generates a EPS or HTML plot of a meta-object

Description

This function creates a EPS or HTML output in R, depending on the meta object created with sparkTable_Config.

Usage

print.sparkTable(x, outdir=NULL, outfile=NULL, rowVec=NULL, colVec=NULL, digits=2,...)

Arguments

x
an object created with sparkTable_Config
outdir
optional argument to which EPS-images should be saved. If this parameter is NULL, the current work-directory is used.
outfile
if set an html/tex file will be created with the output
rowVec
row names for the table
colVec
column names for the table
digits
number of digits of the numerical parts in the table
...
are ignored at the moment

See Also

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

Examples

Run this code
data(gini)
meta <- sparkTable_Config(gini, groups=c("AT","DE","IT"), 
		groupVar="country", 
		vars=c("gini"), 
		typeNumeric=c("mean", "median"), 
		typePlot="line",
		output="eps")

# this meta object can now be used to generate an EPS-output in R
rowVec <- c("Austria", "Germany", "Italy")
colVec <- c("Mean", "Median","Line-Plot")
eps.text <- print.sparkTable(meta, outdir="examples", rowVec=rowVec, colVec=colVec)

Run the code above in your browser using DataLab