Learn R Programming

AnimalSequences (version 0.2.0)

count_distinct_elements_per_list_item_shuffled: Count Distinct Elements per List Item in Shuffled Sequences

Description

This function calculates the number of distinct elements per list item in a list of sequences shuffled using the 'shuffle_sequences_across' function. The shuffling is performed a specified number of times.

Usage

count_distinct_elements_per_list_item_shuffled(sequences, iterations = 100)

Value

A numeric vector of length `iterations`, each element representing the number of distinct elements per list item in a shuffled sequence.

Arguments

sequences

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

iterations

An integer specifying the number of shuffling iterations.

Examples

Run this code
sequences <- c('hello world', 'hello world hello', 'hello world hello world')
count_distinct_elements_per_list_item_shuffled(sequences, iterations = 100)

Run the code above in your browser using DataLab