Learn R Programming

ecolitk (version 1.44.0)

wstringapply: Apply a function on a window sliding on a string

Description

Apply a function on a window sliding on a string.

Usage

wstringapply(x, SIZE, SLIDE, FUN, ...)

Arguments

x
The string
SIZE
The size of the window (number of characters).
SLIDE
offset to move at each slide
FUN
The function to be applied
...
optional parameter for the function FUN

Value

A list of size nchar(x) - SIZE.

Details

Apply the function FUN to substrings of x of length SIZE.