Learn R Programming

tableplot (version 0.3-5)

make.specs: Construct cell specifications for a tableplot

Description

Construct one or more sets of of cell specifications for a tableplot, using the arguments to cellgram, to be used as the assign.sets argument in a tableplot.

Usage

make.specs(n = NULL, as.data.frame = FALSE, subset, ...)

Arguments

n
If specified, determines the number of cell specifications generated. Otherwise, the maximum length of any of the dots argument.
as.data.frame
If TRUE, returns the result as a data.frame. Mainly for viewing the results in an easier way.
subset
A list of names of the arguments to cellgram to be included in the result. Mainly used for showing simplified examples.
...
Arguments to cellgram, each given as a single element or a vector. Each argument is replicated to the length of the longest one.

Value

Unless as.data.frame is TRUE, returns a list of lists of arguments to cellgram that can be used as the assign.sets argument of tableplot.

Details

The function uses formals(cellgram)[-1] to retrieve the names of arguments and default values that can be included in assign.sets.

See Also

cellgram

Examples

Run this code
# generate 4 sets of cell specifications
specs <- make.specs(
	shape=c(0, 0, 0, 2),           #  circles and squares
    cell.fill=c("red","blue","green", "grey40"),
	back.fill="white",
	scale.max=100
	)

Run the code above in your browser using DataLab