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

txt_sample

Boilerplate function to sample one element from a vector.


Description

Boilerplate function to sample one element from a vector.

Usage

txt_sample(x, na.exclude = TRUE, n = 1)

Arguments

x

a vector

na.exclude

logical indicating to remove NA values before taking a sample

n

integer indicating the number of items to sample from x

Value

one element sampled from the vector x

See Also

Examples

txt_sample(c(NA, "hello", "world", NA))

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.