Learn R Programming

sparkTable (version 0.1.3)

spark: Create sparkline as EPS graphics or HTML code

Description

spark verifies the input parameters and stops the program if false parameters have been submitted.

Usage

spark(filename, para, type, output, outdir)

Arguments

filename
the name of the file where the data will be saved.
para
the list produced by the spark_init function
type
the plot type of the data, either "line", "box" or "bar
output
the output format, either "eps" or "html
outdir
optional argument to which output should be saved. If this parameter is NULL, the current work-directory is used.

See Also

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

Examples

Run this code
# some basic examples can be found in the spark_init help

# generation of a bar-plot in EPS format

fn1 <-"examples/testBar1.eps"
para1 <- spark_init(rnorm(50,1.5,2), cw=200, ch=50, type="bar")
para1$top_padding <-  15
para1$bottom_padding <-  15	
para1$left_padding <- 10
para1$right_padding <- 10
para1$barSpacing <- 1
para1$barWidth <- 3
spark(fn1, para1, type="bar", output="eps")

Run the code above in your browser using DataLab