Learn R Programming

AnimalSequences (version 0.2.0)

min_max_seq_length: Calculate the Minimum and Maximum Length of Sequences

Description

This function calculates the minimum and maximum length of sequences of elements, where each sequence is split by spaces.

Usage

min_max_seq_length(sequences)

Value

A numeric vector of length 2, with the minimum and maximum lengths of the sequences.

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')
min_max_seq_length(sequences)

Run the code above in your browser using DataLab