rk.fastdummies extends RKWard's data wrangling capabilities by providing a graphical interface for the {fastDummies} package. It allows users to quickly create dummy variables (one-hot encoding) from character or factor variables. Uniquely, this plugin supports both standard data.frame objects and complex survey designs (svydesign), ensuring that your weighted data structure remains intact during transformation.
This update transforms the plugin from a simple dummy-creator into an intelligent data-preparation tool, perfectly bridging the gap between statistical modeling and visual storytelling:
janitor::clean_names(). This ensures your dataframe is completely snake_case and ready for strict modeling formulas.janitor cleaning algorithm runs, the plugin now dynamically detects the newly created dummy columns and saves their raw, human-readable factor levels (e.g., Income_More than 10,000) as native RKWard metadata labels (.rk.meta). Your columns get clean names for coding, but retain perfect descriptive labels for ggplot2 and gtsummary!" when passing complex object targets (like survey.design[["variables"]]), preventing the R console from crashing during execution.droplevels() on your data before processing, preventing the creation of empty dummy columns for unused factor levels.This is the initial release of the plugin, focusing on robust dummy variable creation and integration with survey objects.
survey.design object. It creates dummy variables within the design's data slot without breaking weights or stratification details.The interface is fully localized in:
es)fr)de)pt_BR)Convert categorical variables into multiple binary (0/1) columns.
variable_level (e.g., gender_male, gender_female).Prepare your data for statistical modeling immediately.
NA values or ignore them (preserving NA rows).This plugin is not yet on CRAN. To install it, use the remotes or devtools package in RKWard.
Open RKWard.
Run the following command in the R Console:
# If you don't have devtools installed:
# install.packages("devtools")
local({
require(remotes)
install_github("AlfCano/rk.fastdummies", force = TRUE)
})
Restart RKWard to load the new menu entries.
Once installed, the tool is organized under the Data menu:
Data -> Data Wrangling -> Create Dummy Variables
dummy_results).This plugin relies on the following R packages:
fastDummies (Core algorithm)survey (Object handling)rkwarddev (Plugin generation)devtools or missing binary dependencies (Windows)If you encounter errors mentioning "non-zero exit status", "namespace is already loaded", or requirements for compilation (compiling from source) when installing packages, it is likely because the R version bundled with RKWard is older than the current CRAN standard.
Workaround: Until a new, more recent version of R (current bundled version is 4.3.3) is packaged into the RKWard executable, these issues will persist. To fix this:
This "two-step" setup (similar to how RStudio operates) ensures you have access to the latest pre-compiled binaries, avoiding the need for RTools and manual compilation.