An RKWard plugin package to create a wide range of
publication-quality visualizations from complex survey data, using the
powerful {ggsurvey} and {ggplot2}
packages.
This package provides a user-friendly graphical interface for several
ggsurvey functions, allowing for easy generation of
weighted plots from survey.design objects and
post-stratification tables from svyby objects.
This package provides five powerful and highly customizable plotting plugins:
svyby results.ggbarweight_svy).ggbarcrosstabs_svy) with fill or
dodge positions.ggbarcrosstabs3d_svy).ggboxweight_svy (1D),
ggboxweight2d_svy (2D), and ggboxweight3d_svy
(3D with facets) based on input.gghexweight_svy,
gghexweight2d_svy, and gghexweight3d_svy.viridis color
palettes.gghistweight_svy,
gghistweight2d_svy, and
gghistweight3d_svy.All plotting plugins share a consistent, tabbed interface with
extensive options for: - Labels: Full control over
title, subtitle, axes, legend, and caption text. - Style &
Layout: Options for color palettes (ColorBrewer or
viridis), faceting layout, and other plot-specific tweaks.
- Output Device: Fine-grained control over the output
graph, including device type (PNG, JPG, SVG), dimensions, resolution,
and background color. - Live Preview: All plotting
dialogs include a preview pane that updates as you change options.
This plugin is not yet on CRAN. To install it, you will need the
{remotes} package.
Install {remotes}: If you don’t
have it, open the R console in RKWard and run:
install.packages("remotes")Install the Plugin: Run the following command in the R console:
remotes::install_github("AlfCano/rk.ggsurvey")Activate the Plugin: Restart RKWard. The new menu items will be available automatically.
Once installed, the plugins will be available in the RKWard menu under:
Survey -> Graphs ->
ggGraphs
You will see the five new plotting options: - Line Graph - Bar Diagram - Box Plot - Hexbin Plot - Histogram
Select the desired plot type, choose your data objects and variables in the dialog, customize the appearance using the tabs, and click “Submit” to generate the final high-quality graph.
This plugin requires the following R packages to be installed: -
ggsurvey - survey - ggplot2 -
dplyr - tidyr - forcats -
stringr - RColorBrewer
Alfonso Cano [email protected]
Plugin structure and JavaScript logic developed with assistance from Gemini, a large language model from Google.
GPL (>= 3)