rnb.color.legends {RnBeads} | R Documentation

## rnb.color.legends

### Description

Creates a figure in the given report that contains one or more color legends.

### Usage

    rnb.color.legends(report, legends,
      fprefix = ifelse(is.character(legends), "legend", "legend_"),
      description = "Color legend.", setting.names = NULL,
      size.factor = 3)

### Arguments

`report` | Report to contain the legend figure. This must be an object of type `Report`.
`legends` | Color legend in the form of a non-empty `character` vector. Element names denote legend labels, and the elements themselves specify colors. This parameter can also be a `list` of color legends. Special restrictions apply to the names of the list elements, see Details.
`fprefix` | File name or prefix for the plot files.
`description` | Text of the figure description. See the correponding parameter in `rnb.add.figure` for more details.
`setting.names` | One-element list containing a plot file descriptor, when `legends` is a list. See the corresponding parameter in `rnb.add.figure` for more details. If this is set to `NULL` (default), the list is automatically created using `names(legends)` (when `legends` is a list), or as an empty list (when `legends` is a vector).
`size.factor` | Relative size, in inches of the plots. Legends are displayed in columns of up to 10 items; each column is effectively a square with the specified size.

### Details

In case `legends` specifies multiple legends in the form of a list, `names(legends)` are appended to `fprefix` to generate file names. In order to ensure independence of the operating system, there are strong restrictions on these names. They can consist of the following symbols only: Latin letters, digits, dot (`.`), dash (`-`) and underline (`_`).

### Value

The modified report.

### Author(s)

Yassen Assenov

[Package RnBeads version 2.4.0 Index]