count.substring.occurrences {cultevo} R Documentation

Count occurences of all possible substrings in one more strings.

Description

Count occurences of all possible substrings in one more strings.

Usage

count.substring.occurrences(strings, sortbylength = FALSE)


Arguments

 strings a list or vector of character sequences sortbylength logical indicating whether the substring columns should be ordered according to the (decreasing) length of the substrings. Default is to leave them in the original order in which they occur in the given strings.

Value

A matrix with the original strings along rows and all substrings of those strings along columns. The cell values indicate whether (and how many times) the substring is contained in each of the strings.

Examples

count.substring.occurrences(c("asd", "asdd", "foo"))


[Package cultevo version 1.0.2 Index]