Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

txt_next

Get the n-th next element of a vector


Description

Get the n-th next element of a vector

Usage

txt_next(x, n = 1)

Arguments

x

a character vector where each element is just 1 term or word

n

an integer indicating how far to look next. Defaults to 1.

Value

a character vector of the same length of x with the next element

See Also

Examples

x <- sprintf("%s%s", LETTERS, 1:26)
txt_next(x, n = 1)

data.frame(word = x,
           word_next1 = txt_next(x, n = 1),
           word_next2 = txt_next(x, n = 2),
           stringsAsFactors = FALSE)

udpipe

Tokenization, Parts of Speech Tagging, Lemmatization and Dependency Parsing with the 'UDPipe' 'NLP' Toolkit

v0.8.5
MPL-2.0
Authors
Jan Wijffels [aut, cre, cph], BNOSAC [cph], Institute of Formal and Applied Linguistics, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic [cph], Milan Straka [ctb, cph], Jana Straková [ctb, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.