count_distinct_elements_per_list_item {AnimalSequences}R 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)

[Package AnimalSequences version 0.2.0 Index]