count_distinct_elements {AnimalSequences} | R Documentation |
Count Distinct Elements in Sequences
Description
This function counts the number of distinct elements across all sequences, where each sequence is split by spaces.
Usage
count_distinct_elements(sequences)
Arguments
sequences |
A character vector where each element is a sequence of elements separated by spaces. |
Value
An integer representing the number of distinct elements across all sequences.
Examples
sequences <- c('hello world', 'hello world hello', 'hello world hello world')
count_distinct_elements(sequences)
[Package AnimalSequences version 0.2.0 Index]