buildGroupSettings: Create a data frame with appearance settings for plotting

Description Usage Arguments Value Examples

View source: R/LineChart-functions.R

Description

This function is the primary way to provide settings for the groups used in plotting. You need to provide the indentifiers for each group and the various settings to be used for that group. All settings are optional and will be set with reasonable defaults if not specified.

Usage

1
2
3
4
buildGroupSettings(group, groupLabel = NULL, color = NULL,
  fillColor = NULL, symbol = NULL, cex.symbol = NULL,
  width.errBar = NULL, lty = NULL, lwd = NULL, include = NULL,
  suppressWarnings = FALSE)

Arguments

group

The indentifiers for the groups.

groupLabel

An alternative name to use in legends, instead of 'group'. If provided and some values are NA, those values will be replaced with the group name.

color

The color to be used for the symbols and lines.

fillColor

The fill color to be used in case the symbols are of a fillable type (e.g. 21:25).

symbol

The plotting character to use.

cex.symbol

The character expansion for the plotting symbols.

width.errBar

The width of the heads of the error bars (if present).

lty

The line type.

lwd

The line width.

include

Boolean. Should this group be included in plots?

suppressWarnings

Boolean. By default you are warned about which settings are left at default values. Set to TRUE to suppress these warnings.

Value

A data frame containing appearance setting data that can be used with lineChart for the settings argument.

Examples

1
2
3
4
5
library(LineChart)

data(ChickWeight)
settings = buildGroupSettings(group=1:4, symbol=21:24, color=c("red", "green", "orange", "blue"))
lineChart( weight ~ Time * Diet, ChickWeight, legendPosition="topleft" )

hardmanko/LineChart-package documentation built on Oct. 8, 2017, 2:57 p.m.