Simple Interactive Framework for Exploring Data in R



Simple Interactive Framework for Exploring Data in R

This article describes how create easily an interactive web framework for exploring data in R using the datadigest package.

This tool provides a concise summary of every variable in a data frame and includes interactive features such as real-time filters, grouping, and highlighting.

This might be very helpful in exploring clinical trial data.

Required R packages and key functions

Load the datadigest package:

library(datadigest)

Key R functions

#Summarize a single file
codebook(data = airquality)

# Explore multiple files
explorer(data = list(Cars = mtcars, Iris = iris), addEnv = FALSE)

# Run a shiny application
# Makes it possible to upload files
explorerApp()

Explore interactively a data table

The main view available in the framework, include:

  1. CODEBOOK VIEW
  • Shows a concise summary for each variable in the loaded data set.
  • Users can click any variable to see additional details.
  • Appropriate summary statistics, frequency tables and charts are provided.
  • Histograms with box plots are drawn for continuous variables and bar charts for categorical variables. Variable level metadata is also shown beneath the chart if provided by the user.
  1. DATA LISTING VIEW
  • Provides a simple tabular output so that the user can interact with the raw data.
  • The listing is exportable, sortable and searchable.
  1. SETTINGS VIEW
  • Lets users customize labels, hide variables and specify which columns should be used as interactive groups and filters.
  1. CHARTS VIEW
  • Create simple bivariate data visualizations.
  • The system automatically uses an appropriate visualization based on the types of the x and y variables selected.

Examples:







Comments ( 2 )

  • Tester

    Thanks for this!
    Datadigest is a Great R pkg!.

    The only thing that doesn’t work (for me),
    is when you specify a “Group by” variable
    in the top menu of Codebook.

    It shows the message:
    “…Stack exceeded…”.

    It always works ok
    if the “Group by” menu option
    is set to: “None” (the default option).

    So,
    the menu option: “None” always works,
    but choosing any other variable gives the error message.

    Kassambara,
    – can you please include a simple example
    (say, with mtcars),
    using the “Group by” option?.

    *** THANKS!!! ***

    • Kassambara

      It works for me! In the example, above, you can choose Group By Month, and it works.

      Make sure you have the latest datadigest version.

Give a comment

Want to post an issue with R? If yes, please make sure you have read this: How to Include Reproducible R Script Examples in Datanovia Comments