cols: Function cols

colsR Documentation

Function cols

Description

Returns a vector of colors of a certain length.

Usage

cols(num = 1, col2 = NULL, col1 = NULL)

Arguments

num

Number of colors to return or a numeric vector containing indices of colors. Defaults to 1.

col2

Character vector specifying the darker color of the specturm to be returned.

col1

Character vector specifying the lighter color of the specturm to be returned.

Details

Returns a vector of colors of a certain length. If col1 and col2 are NULL (default) a rainbow palette is returned. If col2 is specified, col1 is set to "white". If col1 is specified, col2 is set to "black". In addition to regular color labels, the cols-function accepts some pre-defined color-labels (such as "jddm" or "jddmLight" for the Logo-colors of the Journal of Dynamic Decision Making). If num is a numeric vector, the color palette will have max(num) colors, the number of colors returned equals length(num), and num itself is applied as a vector of indices for the color palette returned.

Examples

bp(1:10,col=cols(10,"jddm"))

AndreasFischer1985/quantqual documentation built on June 20, 2022, 4:55 p.m.