Description Usage Arguments Details Value Examples
View source: R/utilities_math.R
Internal soundgen function.
1 | clumper(s, minLength)
|
s |
a vector (soundgen supplies integers, but |
minLength |
an integer or vector of integers indicating the desired length of a segment at each position (can vary with time, e.g., if we are processing pitch_per_gc values) |
clumper
makes sure each homogeneous segment in a sequence is at least
minLength long. Called by getIntegerRandomWalk() and getVocalFry(). Algorithm:
go through the sequence once. If a short segment is encountered, it is pooled
with the previous one (i.e., the currently evaluated segment grows until it
is long enough, which may shorten the following segment). Finally, the last
segment is checked separately. This is CRUDE - a smart implementation is
pending!
Returns the original sequence s transformed to homogeneous segments of required length.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.