powered by
This function calculates the average number of distinct elements per item in a list of sequences, where each sequence is split by spaces.
count_distinct_elements_per_list_item(sequences)
A numeric value representing the average number of distinct elements per list item.
A list of character vectors, where each vector contains sequences of elements separated by spaces.
sequences <- c('hello world', 'hello world hello', 'hello world hello world') count_distinct_elements_per_list_item(sequences)
Run the code above in your browser using DataLab