count_distinct_elements_per_list_item: Count Distinct Elements per List Item

View source: R/sequence_length_summary.R

count_distinct_elements_per_list_itemR Documentation

Count Distinct Elements per List Item

Description

This function calculates the average number of distinct elements per item in a list of sequences, where each sequence is split by spaces.

Usage

count_distinct_elements_per_list_item(sequences)

Arguments

sequences

A list of character vectors, where each vector contains sequences of elements separated by spaces.

Value

A numeric value representing the average number of distinct elements per list item.

Examples

sequences <- c('hello world', 'hello world hello', 'hello world hello world')
count_distinct_elements_per_list_item(sequences)

AnimalSequences documentation built on Sept. 30, 2024, 9:18 a.m.