This repository contains a single R script, make_rk_shiny.R, designed to programmatically generate a complete RKWard plugin package using the rkwarddev R package.
The resulting R package, rk.shiny.plugins, bundles several interactive data visualization and analysis tools (Shiny apps and HTML widgets) into a single, easy-to-install RKWard extension. The entire development process is encapsulated within the R script, making it reproducible, easy to maintain, and simple to extend with new plugins.
.xml, .js, and help files, is generated from a single R script. There is no need to manually edit XML or other plugin files.rpivotTable), replacing them with modern, stable alternatives.This package currently generates the following plugins, accessible from the Shiny menu in RKWard:
shinypivottabler and shiny).pivottabler).GWalkR).ggplot2 graphics. (Depends on ggplotgui).esquisse).DataExplorer).ggquickeda).Factoshiny).shinystan).ShinyItemAnalysis).Follow these steps to generate, compile, and install the complete plugin package.
Ensure you have R, RKWard, and the necessary R packages installed. You can install all required R packages by running this command in your R console:
install.packages(c(
"devtools", "rkwarddev", "shiny",
"shinypivottabler", "pivottabler", "GWalkR",
"ggplotgui", "esquisse", "ggquickeda", "DataExplorer",
"Factoshiny", "shinystan", "ShinyItemAnalysis"
))
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 usually 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.
If you have installed RKWard >= 0.7.4, you can use the install functionality directly from git. As shown here: Shiny apps on RKWard
You just need to add:
Or, just run the next command in your R console:
local({
## Prepare
require(devtools)
## Install
install_github(
repo="AlfCano/rk.shiny.plugins"
)
## Print Result
rk.header("Results of installing from git")
})
To run the generator script yourself (if modifying the plugins), the rkwarddev package is needed.
install.packages("rkwarddev")