Learn R Programming

⚠️There's a newer version (1.6.3) of this package.Take me there.

Radiant - Business analytics using R and Shiny

Radiant is an open-source platform-independent browser-based interface for business analytics in R. The application is based on the Shiny package and can be run locally or on a server. Radiant was developed by Vincent Nijs. Please use the issue tracker on GitHub to suggest enhancements or report problems: https://github.com/radiant-rstats/radiant.data/issues. For other questions and comments please use radiant@rady.ucsd.edu.

Key features

  • Explore: Quickly and easily summarize, visualize, and analyze your data
  • Cross-platform: It runs in a browser on Windows, Mac, and Linux
  • Reproducible: Recreate results and share work with others as a state-file or an Rmarkdown report
  • Programming: Integrate Radiant's analysis functions with your own R-code
  • Context: Data and examples focus on business applications

Explore

Radiant is interactive. Results update immediately when inputs are changed (i.e., no separate dialog boxes) and/or when a button is pressed (e.g., Estimate in Model > Estimate > Logistic regression (GLM)). This facilitates rapid exploration and understanding of the data.

Cross-platform

Radiant works on Windows, Mac, or Linux. It can run without an Internet connection and no data will leave your computer. You can also run the app as a web application on a server.

Note: For Windows users with data that contain multibyte characters please make sure your data are in ANSI format so R(adiant) can load characters correctly.

Reproducible

To conduct high-quality analysis, simply saving output is not enough. You need the ability to reproduce results for the same data and/or when new data become available. Moreover, others may want to review your analysis and results. Save and load the state of the application to continue your work at a later time or on another computer. Share state-files with others and create reproducible reports using Rmarkdown. See also the section on Saving and loading state below

If you are using Radiant on a server you can even share the URL (include the SSUID) with others so they can see what you are working on. Thanks for this feature go to Joe Cheng.

Programming

Although Radiant's web-interface can handle quite a few data and analysis tasks, you may prefer to write your own R-code. Radiant provides a bridge to programming in R(studio) by exporting the functions used for analysis (i.e., you can conduct your analysis using the Radiant web-interface or by calling Radiant's functions directly from R-code). For more information about programming with Radiant see the programming page on the documentation site.

Context

Radiant focuses on business data and decisions. It offers tools, examples, and documentation relevant for that context, effectively reducing the business analytics learning curve.

How to install Radiant

  • Required: R version 3.3.0 or later
  • Required: A modern browser (e.g., Chrome or Safari). Internet Explorer (version 11 or higher) should work as well
  • Required: Rstudio

If you use Rstudio (version 0.99.893 or later) you can start and update Radiant through the Addins menu at the top of the screen. To install the latest version of Radiant for Windows or Mac, with complete documentation for off-line access, open R(studio) and copy-and-paste the command below:

install.packages("radiant", repos = "https://radiant-rstats.github.io/minicran/", type = "binary")

Once all packages are installed select Radiant from the Addins menu in Rstudio or use the command below to launch the app:

radiant::radiant()

To update Radiant select Update Radiant from the Addins menu in Rstudio or use the command below:

radiant::update_radiant()

Alternatively Radiant can be updated using the command:

source("https://raw.githubusercontent.com/radiant-rstats/minicran/gh-pages/build.R")

See the installing radiant page for details.

Optional: You can also create a launcher on your Desktop to start Radiant by typing radiant::launcher() in the R(studio) console and pressing return. A file called radiant.bat (windows) or radiant.command (mac) will be created that you can double-click to start Radiant in your default browser. The launcher command will also create a file called update_radiant.bat (windows) or update_radiant.command (mac) that you can double-click to update Radiant to the latest release.

When Radiant starts you will see data on diamond prices. To close the application click the icon in the navigation bar and then click Stop. The Radiant process will stop and the browser window will close (Chrome) or gray-out.

Documentation

Documentation and tutorials are available at https://radiant-rstats.github.io/docs/ and in the Radiant web interface (the icons on each page and the icon in the navigation bar).

Want some help getting started? Watch the tutorials on the documentation site.

Reporting issues

Please use the GitHub issue tracker at github.com/radiant-rstats/radiant/issues if you have any problems using Radiant.

Try Radiant online

Not ready to install Radiant on your computer? Try it online at the link below:

https://vnijs.shinyapps.io/radiant

Do not upload sensitive data to this public server. The size of data upload has been restricted to 5MB for security reasons.

Running Radiant on shinyapps.io

To run your own instance of Radiant on shinyapps.io clone the radiant repo and deploy.

Running Radiant on shiny-server

You can also host Radiant using shiny-server. First, install radiant on the server using the command below:

install.packages("radiant", repos = "https://radiant-rstats.github.io/minicran/")

Then clone the radiant repo and point shiny-server to the inst/app/ directory. As a courtesy, please let me know if you intend to use Radiant on a server.

Saving and loading state

To save your analyses save the state of the app to a file by clicking on the icon in the navbar and then on Save state (see also the Data > Manage tab). You can open this state-file at a later time or on another computer to continue where you left off. You can also share the file with others that may want to replicate your analyses. As an example, load the state-file radiant-state.rda through the Data > Manage tab. Go to Data > View and Data > Visualize to see some of the settings. There is also a report in R > Report that was created using the Radiant interface. The html file radiant-state.html contains the output.

A related feature in Radiant is that state is maintained if you accidentally navigate to another page, close (and reopen) the browser, and/or hit refresh. Use Refresh in the menu in the navigation bar to return to a clean/new state.

Loading and saving state also works with Rstudio. If you start Radiant from Rstudio and use > Stop to stop the app, lists called r_data and r_state will be put into Rstudio's global workspace. If you start radiant again using radiant() it will use these lists to restore state. This can be convenient if you want to make changes to a data file in Rstudio and load it back into Radiant. Also, if you load a state-file directly into Rstudio it will be used when you start Radiant to recreate a previous state.

Technical note: Loading state works as follows in Radiant: When an input is initialized in a Shiny app you set a default value in the call to, for example, numericInput. In Radiant, when a state-file has been loaded and an input is initialized it looks to see if there is a value for an input of that name in a list called r_state. If there is, this value is used. The r_state list is created when saving state using reactiveValuesToList(input). An example of a call to numericInput is given below where the state_init function from radiant.R is used to check if a value from r_state can be used.

numericInput("sm_comp_value", "Comparison value:", state_init("sm_comp_value", 0))

Source code

The source code is available on GitHub at https://github.com/radiant-rstats. radiant.data, offers data loading, saving, viewing, visualizing, combining, and transforming tools. radiant.design builds on radiant.data and adds tools for experimental design, sampling, and sample size calculation. radiant.basics covers the basics of statistical analysis (e.g., comparing means and proportions, cross-tabs, correlation, etc.) and includes a probability calculator. radiant.model covers model estimation (e.g., logistic regression and neural networks), model evaluation (e.g., gains chart, profit curve, confusion matrix, etc.), and decision tools (e.g., decision analysis and simulation). Finally, radiant.multivariate includes tools to generate brand maps and conduct cluster, factor, and conjoint analysis.

These tools are used in the Business Analytics, Quantitative Analysis, Research for Marketing Decisions, Consumer behavior, Experiments in firms, Pricing, and Customer Analytics classes at the Rady School of Management (UCSD).

Credits

Radiant would not be possible without R and Shiny. I would like to thank Joe Cheng, Winston Chang, and Yihui Xie for answering questions, providing suggestions, and creating amazing tools for the R community. Other key components used in Radiant are ggplot2, dplyr, tidyr, magrittr, broom, shinyAce, rmarkdown, and DT. For an overview of other packages that Radiant relies on please see the about page.

License

Radiant is licensed under the AGPLv3. The documentation and videos on this site as well as the Radiant help files are licensed under the creative commons attribution, non-commercial, share-alike license CC-NC-SA.

As a summary, the AGPLv3 license requires, attribution, including copyright and license information in copies of the software, stating changes if the code is modified, and disclosure of all source code. Details are in the COPYING file.

If you are interested in using Radiant please email me at radiant@rady.ucsd.edu

© Vincent Nijs (2017)

Copy Link

Version

Install

install.packages('radiant.data')

Monthly Downloads

2,539

Version

0.8.1

License

AGPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

April 25th, 2017

Functions in radiant.data (0.8.1)

Search

Search for a string in all columns of a data.frame
add_class

Convenience function to add a class
as_character

Wrapper for as.character
as_data_frame

Exporting as_data_frame
as_dmy_hm

Convert input in day-month-year-hour-minute format to date-time
as_dmy_hms

Convert input in day-month-year-hour-minute-second format to date-time
as_duration

Wrapper for lubridate's as.duration function. Result converted to numeric
as_factor

Wrapper for factor with ordered = FALSE
as_distance

as_dmy

Convert input in day-month-year format to date
as_hm

Convert input in hour-minute format to time
as_hms

Convert input in hour-minute-second format to time
as_integer

Convert variable to integer avoiding potential issues with factors
as_mdy

Convert input in month-day-year format to date
copy_attr

Copy attributes from on object to another
as_numeric

Convert variable to numeric avoiding potential issues with factors
as_tibble

Exporting as_tibble
center

Center
as_ymd

Convert input in year-month-day format to date
as_ymd_hm

Convert input in year-month-day-hour-minute format to date-time
ci_label

Labels for confidence intervals
ci_perc

Values at confidence levels
as_mdy_hm

Convert input in month-day-year-hour-minute format to date-time
as_mdy_hms

Convert input in month-day-year-hour-minute-second format to date-time
as_ymd_hms

Convert input in year-month-day-hour-minute-second format to date-time
avengers

Avengers
copy_from

Source for package functions
dtab.explore

Make a tabel of summary statistics in DT
dtab.pivotr

Make a pivot tabel in DT
factorizer

Convert character to factors as needed
cv

Coefficient of variation
data_frame

Exporting data_frame
getsummary

Create data.frame summary
glance

Exporting glance from broom
level_list

Generate list of levels and unique values
combinedata

Combine datasets using dplyr's bind and join functions
copy_all

Source all package functions
empty_level

Convert categorical variables to factors and deal with empty/missing values (used in pivotr and explore)
explore

Explore data
filterdata

Filter data with user-specified expression
is_not

Convenience function for is.null or is.na
is_string

Is input a string?
p05

5th percentile
formatdf

Format a data.frame with a specified number of decimal places
formatnr

Format a number with a specified number of decimal places, thousand sep, and a symbol
indexr

Find index corrected for missing values and filters
install_webshot

Install webshot and phantomjs
ln

Natural log
median_rm

Median with na.rm = TRUE
min_rm

Min with na.rm = TRUE
mutate_ext

Add tranformed variables to a data frame (NSE)
mutate_if_tmp

Temporary fix for mutate_if when the predicate is false for all columns
changedata

Change data
does_vary

Does a vector have non-zero variability?
dtab

Method to create datatables
loadr

Load an rda or rds file and add it to the radiant data list (r_data) if available
p10

10th percentile
p90

90th percentile
p95

95th percentile
plot.pivotr

Plot method for the pivotr function
print.gtable

Print/draw method for grobs produced by gridExtra
sd_rm

Standard deviation with na.rm = TRUE
sdpop

Standard deviation for the population
skew

Exporting the skew function from the psych package
square

Calculate square of a variable
standardize

Standardize
store

Method to store variables in a dataset in Radiant
table2data

Create data.frame from a table
loadrda_url

Load an rda file from a url
mode_rm

Mode with na.rm = TRUE
month

Add ordered argument to lubridate::month
refactor

Remove/reorder levels
make_funs

Make a list of functions-as-formulas to pass to dplyr
make_train

Generate a variable used to selected a training sample
p25

25th percentile
p75

75th percentile
describe

Show dataset desription, if available, in html form in Rstudio viewer or default browser
diamonds

Diamond prices
getclass

Get variable class
getdata

Get data for analysis functions
iterms

Create a vector of interaction terms
tibble

Exporting tibble
weighted.sd

Weighted standard deviation
which.pmax

Returns the index of the (parallel) maxima of the input values
register

Register a data.frame in the datasetlist in Radiant
store.data.frame

Store method for the Data > View tab
var_rm

Variance with na.rm = TRUE
find_dropbox

Find a user's dropbox folder
flip

Flip the DT table to put Function, Variable, or Group by on top
inverse

Calculate inverse of a variable
is_empty

Is a character variable defined
store.character

Method for error messages that a user tries to store
loadcsv

Load a csv file with read.csv and read_csv
loadcsv_url

Load a csv file with from a url
n_missing

Number of missing values
normalize

Normalize a variable x by a variable y
radiant.data-deprecated

Deprecated function(s) in the radiant.data package
radiant.data

radiant.data
render

Method to render objects (i.e., htmlwidgets and rmarkdown files)
render.character

Method to render rmarkdown documents
varpop

Variance for the population
prop

Calculate proportion
publishers

Comic publishers
render.datatables

Method to render DT tabels
rounddf

Round double in a data.frame to a specified number of decimal places
sdprop

Standard deviation for proportion
se

Standard error
sum_rm

Sum with na.rm = TRUE
show_duplicated

Show all rows with duplicated values (not just the first or last)
sig_stars

Add stars '***' to a data.frame (from broom's `tidy` function) based on p.values
summary.pivotr

Summary method for pivotr
sshh

Hide warnings and messages and return invisible
sshhr

Hide warnings and messages and return result
store.explore

Store method for the explore function
store.pivotr

Store method for the pivort function
superheroes

Super heroes
tidy

Exporting tidy from broom
titanic

Survival data for the Titanic
summary.explore

Summary method for the explore function
visualize

wday

Add ordered argument to lubridate::wday
which.pmin

Returns the index of the (parallel) minima of the input values
xtile

Create a quintile (or decile) index
kurtosi

Exporting the kurtosi function from the psych package
max_rm

Max with na.rm = TRUE
mean_rm

Mean with na.rm = TRUE
pivotr

Create a pivot table using dplyr
plot.character

Don't try to plot strings
rownames_to_column

Exporting rownames_to_column from tibble
saver

Save data.frame as an rda or rds file from Radiant
seprop

Standard error for proportion
set_attr

Alias used to add an attribute
varprop

Variance for proportion
viewdata

View data