Yihui Xie 10/11/2023

Three Useful Functions in Base R: `regexec()`, `strrep()`, and `append()`

Read Original

This technical article introduces three useful but often overlooked functions in base R: regexec() for extracting substring positions using regex, strrep() for repeating strings, and append() for inserting elements into vectors. It provides practical examples and comparisons to common alternative coding patterns, aimed at improving R users' efficiency in string processing and data structure manipulation.

Three Useful Functions in Base R: `regexec()`, `strrep()`, and `append()`

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes