powered by
This function calculates the median length of a sequence of elements, where each sequence is split by spaces.
median_seq_length(sequences)
A numeric value representing the median length of the sequences.
A character vector where each element is a sequence of elements separated by spaces.
sequences <- c('hello world', 'hello world hello', 'hello world hello world') median_seq_length(sequences)
Run the code above in your browser using DataLab