Learn R Programming

stringb (version 0.1.17)

text_snippet: retrieving text snippet

Description

function will give back snippets of text via using length, length and from, length and to, or from and to to specify the snippet

Usage

text_snippet(x, length = max(nchar(x)), from = NULL, to = NULL, coll = FALSE)

Arguments

x

character vector to be snipped

length

length of snippet

from

starting character

to

last character

coll

should a possible vector x with length > 1 collapsed with newline character as separator?

Functions

  • text_snippet: retrieving text snippet