count.substring.occurrences: Count occurences of all possible substrings in one more...

Description Usage Arguments Value Examples

View source: R/compositionality.R

Description

Count occurences of all possible substrings in one more strings.

Usage

1
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

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

kevinstadler/cultevo documentation built on June 29, 2017, 8 p.m.