Package 'DataCraftR'

Title: Create Datasets Interactively Using 'shiny'
Description: Set of 'shiny'-based 'RStudio' add-ins for interactively creating datasets through graphical interfaces. Users can adjust graphical elements to define data generation parameters, and the resulting datasets can be saved to temporary RDS files for further analysis or visualization. Methods are described in: Chang et al. (2024) <https://CRAN.R-project.org/package=shiny>; Bostock et al. (2011) <doi:10.1109/TVCG.2011.185>.
Authors: Carlos Rivera [aut, cre] (ORCID: <https://orcid.org/0000-0002-3402-7725>), Heidi Renninger [fnd] (ORCID: <https://orcid.org/0000-0002-2485-9835>)
Maintainer: Carlos Rivera <[email protected]>
License: GPL (>= 3)
Version: 0.3.2
Built: 2026-06-25 19:56:57 UTC
Source: https://github.com/cran/DataCraftR

Help Index


Boxplot Data Generator

Description

Launches an interactive Shiny gadget to generate synthetic data using either normal or uniform distributions. Users can drag boxplots to define distribution parameters. The resulting dataset can be exported to rds file with one click.

Usage

boxplot_dcr()

Details

Boxplot Addin for Interactive Data Generation

This gadget integrates Shiny and D3.js for interactive visualization. Users can adjust the number of variables, sample size, and distribution type. Additional options allow setting initial Y-axis limits and a random seed. The resulting dataset can be exported to rds file with one click.

The D3.js code handles the boxplot drawing and interaction, while Shiny manages user inputs and server-side data generation.

Value

A Shiny gadget interface is launched.\ The generated data are saved into temporal rds file

Author(s)

Carlos Rivera

See Also

Other DataCraftR generation tools: scatter_dcr, histogram_dcr, count_dcr

Examples

if(interactive()){
  boxplot_dcr()
}

Count Bar Plot Data Generator

Description

Opens an interactive Shiny gadget that allows users to visually generate **count-based categorical data** by adjusting bar heights in a D3.js bar plot.

Users can control the number of variables, number of categories per variable, and the maximum count value for the bars. The resulting dataset can be exported to rds file with one click.

This tool is designed to support data simulation for teaching, demos, and prototyping of discrete categorical count structures.

Usage

count_dcr()

Details

Count Addin for Interactive Count Data Generation

**JavaScript integration** (via 'count.js') is used to capture user interactions, dynamically update counts, and return the generated data to R.

Data are returned as a data frame with two factors:

  • var: Variable identity (e.g. V1, V2, ...)

  • cat: Category identity (e.g. C1, C2, ...)

Value

A Shiny gadget interface is launched.\ The generated data are saved into temporal rds file

Author(s)

Carlos Rivera

See Also

Other DataCraftR generation tools: boxplot_dcr, histogram_dcr, scatter_dcr

Examples

if(interactive()){
  count_dcr()
}

Histogram Data Generator

Description

Launches an interactive Shiny gadget to generate synthetic data using histograms. Users can interactively set bin counts, Y-axis limits, and select variables for visualization. The resulting dataset can be exported to rds file with one click.

Usage

histogram_dcr()

Details

Histogram Addin for Interactive Data Generation

This gadget integrates Shiny and D3.js for dynamic histogram generation and visualization. Users can adjust:

  • The number of variables to display.

  • The variable to draw on the histogram.

  • Number of bins and Y-axis limits.

  • X-axis min and max values, and optionally a random seed.

Interactive buttons allow resetting the histogram, aligning bars to the top or bottom, and exporting the generated data.

The D3.js code handles the histogram drawing and interaction, while Shiny manages inputs and server-side data processing.

Value

A Shiny gadget interface is launched.\ The generated data are saved into temporal rds file

Author(s)

Carlos Rivera

See Also

Other DataCraftR generation tools: boxplot_dcr, scatter_dcr, count_dcr

Examples

if(interactive()){
  histogram_dcr()
}

Scatter Plot Data Generator

Description

Launches an interactive Shiny gadget to generate synthetic data by drawing points on a scatter plot. Users can control the number of groups, brush size, and axis limits. The resulting dataset can be exported to rds file with one click.

Usage

scatter_dcr()

Details

Scatter Plot Addin for Interactive Data Generation

This gadget integrates Shiny and D3.js for dynamic scatter plot visualization. Users can adjust:

  • The number of groups and the active drawing group.

  • Brush diameter for point drawing.

  • Maximum X and Y axis values.

Interactive buttons allow resetting the plot, undoing/redoing actions, and exporting the generated data.

The D3.js code handles drawing and interactivity, while Shiny manages user inputs and server-side data handling.

Value

A Shiny gadget interface is launched.\ The generated data are saved into temporal rds file

Author(s)

Carlos Rivera

See Also

Other DataCraftR generation tools: boxplot_dcr, histogram_dcr, count_dcr

Examples

if(interactive()){
  scatter_dcr()
}