Learn R Programming

AnimalSequences (version 0.2.0)

plot_seq_length_distribution: Plot the Distribution of Sequence Lengths

Description

This function plots the distribution of the lengths of sequences of elements, where each sequence is split by spaces. The plot includes a histogram and a vertical line indicating the mean length.

Usage

plot_seq_length_distribution(sequences)

Value

A `ggplot` object showing the distribution of sequence lengths.

Arguments

sequences

A character vector where each element is a sequence of elements separated by spaces.

Examples

Run this code
sequences <- c('hello world', 'hello world hello', 'hello world hello world')
plot_seq_length_distribution(sequences)

Run the code above in your browser using DataLab