Learn R Programming

datamods

Shiny modules to import and manipulate data into an application or addin.

Overview

This package provides custom shiny modules to import data from various sources, select, rename and convert variables in a dataset and validate content with validate package.
The modules can be used in any standard shiny application or RStudio add-in.

Internationalization

Currently you can use {datamods} in the following language: english (default), french, macedonian, brazilian portuguese, albanian, chinese, spanish, german, turkish, korean, polish, japanese.

If you want another language to be supported, you can submit a Pull Request to add a CSV file like the one used for french (file is located in inst/i18n folder in the package, you can see it here on GitHub).

See the online vignette for more on this topic.

Installation

Install from CRAN with:

install.packages("datamods")

You can install the development version of datamods from GitHub with:

remotes::install_github("dreamRs/datamods")

Import

Import data from:

  • environment: such as Global environment or from a package
  • file: text files, Excel, SAS or SPSS format… anything that package rio can handle
  • copy/paste: paste data from an other source like Excel or text file
  • Google Sheet: use the URL to import the Googlesheet
  • URL: use a URL to import from a flat table

Each module is available in the form import_file_ui() / import_file_server() and can be use independently.

Or all modules can be launched together in a modal window via import_modal() / import_server():

This module also allow to view imported data and to update variables.

Update

Module update_variables_ui() / update_variables_server() allow to:

  • select variables of interest in a dataset
  • rename variables to be used in application after that
  • convert variables to change their class, from character to numeric for example

Validate

Define some validation rules with package validate and check whether data lives up to those expectations.

Filter

Interactively filter a data.frame, this module also generates the code to reproduce the filters.

Sample

This module extracts a sample from a data.frame, based either on a fixed number of rows or on a percentage of total rows.

Edit

This module makes a data.frame editable, allowing the user to add, modify or delete rows.

Create column

This module allow to enter an expression to create a new column in a data.frame.

Cut numeric variable

This module contain an interface to cut a numeric into several intervals.

Update factor

This module contain an interface to reorder the levels of a factor variable.

Copy Link

Version

Install

install.packages('datamods')

Monthly Downloads

7,230

Version

1.5.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Victor Perrier

Last Published

October 2nd, 2024

Functions in datamods (1.5.3)

module-sample

Shiny module to interactively sample a data.frame
select-group

Select Group Input Module
update-variables

Select, rename and convert variables
update-factor

Module to Reorder the Levels of a Factor Variable
validation_ui

Validation module
import-googlesheets

Import data from Googlesheet
list_pkg_data

List dataset contained in a package
show_data

Display a table in a window
import-url

Import data from a URL
import-modal

Import from all sources
import-file

Import data from a file
filter-data

Shiny module to interactively filter a data.frame
i18n

Internationalization
get_data_packages

Get packages containing datasets
edit-data

Shiny module to interactively edit a data.frame
import-copypaste

Import data with copy & paste
create-column

Create new column
demo_edit

Customer Credit Card Information
cut-variable

Module to Convert Numeric to Factor
import-globalenv

Import data from an Environment