Learn R Programming

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

Radiant - Business analytics using R and Shiny

Radiant is a platform-independent browser-based interface for business analytics in R, based on the Shiny package. Developed by Vincent Nijs. Please send questions and comments to: 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 at any time and share work with others as a state file or an Rmarkdown report
  • Programming: Integrate Radiant's analysis functions into 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). This greatly facilitates 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.

Reproducible

Simply saving output is not enough. You need the ability to recreate 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 omputer. 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, at times you may prefer to write your own code. Radiant provides a bridge to programming in R(studio) by exporting the functions used for analysis. 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.1.2 or later
  • Required: A modern browser (e.g., Chrome or Safari). Internet Explorer (version 11 or higher) should work as well
  • Recommended: Rstudio

Radiant is available on CRAN. To install the latest version with complete documentation for offline access open R(studio) and copy-and-paste the command below:

install.packages("radiant", repos = "http://vnijs.github.io/radiant_miniCRAN/")

Once all packages are installed use the commands below to launch the app:

library(radiant)
radiant("marketing")

See also the Installing Radiant video:

You can create a launcher on your Desktop to start Radiant by typing launcher() in the R-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.

When Radiant starts you will see data on diamond prices. To close the application click on Quit in the Navigation bar and then click the Quit button on the left of the screen. The Radiant process will stop and the browser window will close (or gray-out).

Documentation

Documentation and tutorials are available at http://vnijs.github.io/radiant/ and in the Radiant web interface (the ? icons and the Help menu).

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

Online

Not ready to install Radiant on your computer? Try it out online at http://vnijs.rady.ucsd.edu:3838/marketing. Note that this is a test server only!

Saving and loading state

To save your analyses save the state of the app to a file (Data > Manage). 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 RadiantState.rda in the examples folder. Go to Data > View, 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 RadiantState.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 Quit > Reset to return to a clean/new state.

Loading and saving state also works with Rstudio. If you start Radiant from Rstudio and use Quit > Quit 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: The way loading state works in Radiant is as follows: 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. sm_args$sm_comp_value is the default value specified in the single_mean function call.

numericInput("sm_comp_value", "Comparison value:", state_init('sm_comp_value',sm_args$sm_comp_value))

Source code

Three (related) apps are included in the inst/ directory. Base, offers data loading, saving, viewing, visualizing, merging, and transforming tools. The quant app sources the code from base and extends it. Finally, the marketing app sources the code from base and quant and extends it with additional tools. The quant app focuses on (basic) quantitative analysis (e.g., comparing means, regression, etc.). The marketing app focuses on marketing analytics by adding clustering, principle component analysis, conjoint analysis, etc.

License

Radiant is licensed under the AGPLv3. The documentation and videos on this site and 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 (2015)

Copy Link

Version

Install

install.packages('radiant')

Monthly Downloads

1,269

Version

0.1.95

License

AGPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Vincent Nijs

Last Published

May 21st, 2024

Functions in radiant (0.1.95)

conjoint

Conjoint analysis
conjoint_profiles

Create fractional factorial design for conjoint analysis
computer

Perceptions of computer (re)sellers
city

City distances
compare_means

Compare means for two or more variables
changedata

Change data
copy_from

Source for package functions
compare_props

Compare proportions across groups
ca_the_table

Function to calculate the PW and IW table for conjoint
copy_all

Source all package functions
getdata

Get data for analysis functions
ff_design

Function to generate a fractional factorial design
getsummary

Create data.frame summary
explore

Explore data
cv

Coefficient of variation
getclass

Get variable class
diamonds

Diamond prices
cross_tabs

Evaluate associations between categorical variables
correlation

Calculate correlations for two or more variables
full_factor

Factor analysis (PCA)
kurtosi

Exporting the kurtosi function from the psych package
is_empty

Is a character variable defined
launcher

Create a launcher for Mac (.command)
hier_clus

Hierarchical cluster analysis
kmeans_clus

K-means cluster analysis
mac_launcher

Create a launcher for Mac (.command)
mean_rm

Mean with na.rm = TRUE
glm_reg

Generalized linear models (GLM)
max_rm

Max with na.rm = TRUE
mds

(Dis)similarity based brand maps (MDS)
p25

25th percentile
p75

75th percentile
mp3

Conjoint data for MP3 players
mergedata

Merge datasets using dplyr's join functions
nmissing

Number of missing values
min_rm

Min with na.rm = TRUE
newspaper

Newspaper readership
median_rm

Median with na.rm = TRUE
plot.compare_props

Plot method for the compare_props function
plot.compare_means

Plot method for the compare_means function
plot.cross_tabs

Plot method for the cross_tabs function
plot.conjoint

Plot method for the conjoint function
plot.correlation

Plot method for the correlation function
plot.glm_predict

Plot method for the predict.glm_reg function
plot.hier_clus

Plot method for the hier_clus function
plot.full_factor

Plot method for the full_factor function
plot.glm_reg

Plot method for the glm_reg function
plot.kmeans_clus

Plot method for kmeans_clus
plot.explore

Plot method for the explore function
plot.mds

Plot method for the mds function
predict.glm_reg

Predict method for the glm_reg function
predict.regression

Predict method for the regression function
plot.pmap

Plot method for the pmap function
save_membership

Add a cluster membership variable to the active dataset
plot.pre_factor

Plot method for the pre_factor function
save_reg_resid

Save regression residuals
sig_stars

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

Summary method for the conjoint_profiles function
summary.compare_props

Summary method for the compare_props function
single_mean

Compare a sample mean to a population mean
pmap

Attribute based brand maps
pre_factor

Evaluate if data are appropriate for PCA / Factor analysis
save_factors

Save factor scores to active dataset
save_glm_resid

Save residuals generated in the glm_reg function
summary.cross_tabs

Summary method for the cross_tabs function
sshh

Hide warnings and messages and return invisible
sshhr

Hide warnings and messages and return result
summary.pmap

Summary method for the pmap function
summary.explore

Summary method for the explore function
summary.mds

Summary method for the mds function
titanic

Survival data for the Titanic
toothpaste

Toothpaste attitudes
plot.single_mean

Plot method for the single_mean function
plot.single_prop

Plot method for the single_prop function
state_single

Set initial value for shiny input from a list of values
summary.sample_size

Summary method for the sample_size function
summary.compare_means

Summary method for the compare_means function
summary.sampling

Summary method for the sampling function
summary.single_mean

Summary method for the single_mean function
win_launcher

Create a launcher for Windows (.bat)
summary.single_prop

Summary method for the single_prop function
plot.reg_predict

Plot method for the predict.regression function
plot.regression

Plot method for the regression function
set_class

Alias used to set the class for analysis function return
regression

Linear regression using OLS
rndnames

100 random names
state_init

Set initial value for shiny input
shopping

Shopping attitudes
summary.hier_clus

Summary method for the hier_clus function
state_multiple

Set initial values for shiny input from a list of values
sample_size

Sample size calculation
skew

Exporting the skew function from the psych package
sampling

Simple random sampling
single_prop

Compare a sample proportion to a population proportion
summary.conjoint

Summary method for the conjoint function
summary.regression

Summary method for the regression function
summary.correlation

Summary method for the correlation function
summary.pre_factor

Summary method for the pre_factor function
summary.kmeans_clus

Summary method for kmeans_clus
test_check

Add interaction terms to list of test variables if needed
titanic_pred

Predict survival
print.arrange

Exporting the print.arrange method from the gridExtra package
radiant

radiant
serr

Standard error
sd_rm

Standard deviation with na.rm = TRUE
summary.full_factor

Summary method for the full_factor function
var_check

Check if main effects for all interaction effects are included in the model If ':' is used to select a range _indep_var_ is updated
summary.glm_reg

Summary method for the glm_reg function
visualize