Learn R Programming

ggDNAvis (version 0.3.2)

create_image_data: Rasterise a vector of sequences into a numerical dataframe for ggplotting (generic ggDNAvis helper)

Description

Takes a character vector of sequences (which are allowed to be empty "" to act as a spacing line) and rasterises it into a dataframe that ggplot can read.

Usage

create_image_data(sequences)

Value

dataframe. Rasterised dataframe representation of the sequences, readable by ggplot2::ggplot().

Arguments

sequences

character vector. A vector of sequences for plotting, e.g. c("ATCG", "", "GGCGGC", ""). Each sequence will be plotted left-aligned on a new line.

Examples

Run this code
create_image_data(c("ATCG", "", "GGCGGC", ""))

Run the code above in your browser using DataLab