add_annotation {YAPSA} | R Documentation

## Add information to an annotation data structure

### Description

Function to iteratively add information to an annotation data structure as needed for `HeatmapAnnotation` and especially for `annotation_exposures_barplot`

### Usage

    add_annotation(
      in_annotation_col,
      in_annotation_df,
      in_attribution_vector,
      in_colour_vector,
      in_name
    )

### Arguments

`in_annotation_col` | List, every element of which refers to one layer of annotation List elements are structures corresponding to named colour vectors
`in_annotation_df` | Data frame, every column of which corresponds to a layer of annotation. It has as many rows as there are samples, every entry in a row corresponding to the attribute the samples has for the corresponding layer of annotation.The factor levels of a column of `in_annotation_df` correspond to the names of the corresponding element in `in_annotation_col`
`in_attribution_vector` | A vector which is going to be cbinded to `in_annotatiin_df`, carrying the annotation information of the new layer to be added
`in_colour_vector` | Named vector of colours to be attributed to the new annotation
`in_name` | Name of the new layer of annotation

### Value

A list with entries

- `annotation_col`: A list as in `in_annotation_col` but with one additional layer of annotation

- `annotation_df`: A data frame as in `in_annotation_df` but with one additional layer of annotation

### Examples

     NULL

[Package YAPSA version 1.20.1 Index]