An RKWard plugin that provides a user-friendly graphical interface
for the powerful stringr package. This plugin brings
modern, consistent, and intuitive string manipulation directly into your
RKWard workflow. It is designed for common data cleaning and preparation
tasks, allowing you to perform a wide range of text transformations
without writing code.
A key design feature is that all operations are vectorized and preserve the length of the input data. Each function returns a vector (or list) of the same length as your input, making it safe and predictable to use when transforming columns in a data frame.
The plugin is organized into several modules accessible from the RKWard menu, each targeting a specific category of string operations:
Use regular expressions to find patterns within your text. - Check if
strings contain a pattern (str_detect). - Verify if strings
start or end with specific text (str_starts,
str_ends). - Count the number of times a pattern occurs
(str_count). - Find the exact start and end positions of
matches (str_locate, str_locate_all).
Easily change the case of your text for standardization. - Convert to
lower, UPPER, Title, or
Sentence case.
Pull out specific pieces of your strings. - Extract substrings by
character position (str_sub). - Extract text that matches a
pattern, including specific capture groups (str_extract,
str_match).
Break strings into multiple pieces based on a delimiter. - Split
strings into a list of substrings (str_split). - Split
strings into a fixed number of columns in a matrix
(str_split_fixed).
Standardize the length and padding of your strings. - Get the number
of characters in each string (str_length). - Remove
leading/trailing and excess internal whitespace (str_trim,
str_squish). - Pad strings with characters to a uniform
length (str_pad). - Truncate strings that are too long
(str_trunc).
plugin package, you need the source code (e.g., by downloading it from GitHub).
local({
## Preparar
require(devtools)
## Computar
install_github(
repo="AlfCano/rk.stringr"
)
## Imprimir el resultado
rk.header ("Resultados de Instalar desde git")
})Once installed, the plugin components can be found in the RKWard menu under:
Data > String Manipulation (stringr)
From there, you can select the desired operation (e.g., “Mutate Strings”, “Split Strings”, etc.) to open its dialog window.
0.7.0 or newer.3.5.0 or newer.stringr (version 1.4.0 or
newer). The plugin will prompt you to install it if it is not
found.