From c6b6de2a28ca71d01302290ac0391123d0a0a7ec Mon Sep 17 00:00:00 2001 From: Vincent Nijs Date: Sun, 22 Feb 2015 01:46:11 -0800 Subject: [PATCH 01/22] Stash --- build/build_mac_win.sh | 0 man/getdata_exp.Rd | 6 +++--- man/mac_launcher.Rd | 8 ++++---- man/plot.compare_props.Rd | 2 +- man/radiant.Rd | 4 ++-- man/sig_stars.Rd | 4 ++-- man/sshh.Rd | 4 ++-- man/win_launcher.Rd | 8 ++++---- 8 files changed, 18 insertions(+), 18 deletions(-) mode change 100755 => 100644 build/build_mac_win.sh diff --git a/build/build_mac_win.sh b/build/build_mac_win.sh old mode 100755 new mode 100644 diff --git a/man/getdata_exp.Rd b/man/getdata_exp.Rd index 704d06bb5..7c077fc76 100644 --- a/man/getdata_exp.Rd +++ b/man/getdata_exp.Rd @@ -7,13 +7,13 @@ getdata_exp(dataset, vars = "", na.rm = TRUE, filt = "") } \arguments{ -\item{dataset}{Name of the data.frame} +\item{dataset}{Name of the dataframe} -\item{vars}{Variables to extract from the data.frame} +\item{vars}{Variables to extract from the dataframe} \item{na.rm}{Remove rows with missing values (default is TRUE)} -\item{filt}{Filter to apply to the data (default is NULL)} +\item{filt}{Filter to apply to the specified dataset. For example "price > 10000" if dataset is "diamonds" (default is "")} } \value{ Data.frame with the specified columns selected diff --git a/man/mac_launcher.Rd b/man/mac_launcher.Rd index 8ee97b93e..5bee3611a 100644 --- a/man/mac_launcher.Rd +++ b/man/mac_launcher.Rd @@ -2,17 +2,17 @@ % Please edit documentation in R/radiant.R \name{mac_launcher} \alias{mac_launcher} -\title{Make a .command launcher for Mac on the desktop} +\title{Create a .command launcher for Windows} \usage{ mac_launcher(app = c("marketing", "quant", "base")) } \arguments{ -\item{app}{App to install ('marketing', 'quant', or 'base'). Default is 'marketing'} +\item{app}{App to run when the desktop icon is double-clicked ("marketing", "quant", or "base"). Default is "marketing"} } \value{ -On a mac a file named 'radiant.command' will be put on the desktop. Double-click the file to launch the Radiant app selected +On Mac a file `radiant.command` will be put on the desktop. Double-click the file to launch the specified Radiant app } \description{ -Make a .command launcher for Mac on the desktop +Create a .command launcher for Windows } diff --git a/man/plot.compare_props.Rd b/man/plot.compare_props.Rd index 7457fb378..73a51a381 100644 --- a/man/plot.compare_props.Rd +++ b/man/plot.compare_props.Rd @@ -13,7 +13,7 @@ Plot results from the compare_props function. This is a method of class compare_ See \url{http://mostly-harmless.github.io/radiant/quant/compare_props.html} for an example in Radiant } \examples{ -result <- compare_props("titanic", "pclass", "survived", cp_plots = "props") +result <- compare_props("titanic", "pclass", "survived", cp_plots = c("props","counts")) plot(result) } \seealso{ diff --git a/man/radiant.Rd b/man/radiant.Rd index 32c9fe45d..9798eaaca 100644 --- a/man/radiant.Rd +++ b/man/radiant.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/radiant.R \name{radiant} \alias{radiant} -\title{Launch the Radiant app in a browser} +\title{Launch Radiant in the default browser} \usage{ radiant(app = c("marketing", "quant", "base")) } @@ -10,7 +10,7 @@ radiant(app = c("marketing", "quant", "base")) \item{app}{Choose the app to run. Either "base", "quant", or "marketing". "marketing" is the default} } \description{ -Launch the Radiant app in a browser +Launch Radiant in the default browser } \details{ See \url{http://mostly-harmless.github.io/radiant} for documentation and tutorials diff --git a/man/sig_stars.Rd b/man/sig_stars.Rd index 4ccd38c67..9a9ac37d9 100644 --- a/man/sig_stars.Rd +++ b/man/sig_stars.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/radiant.R \name{sig_stars} \alias{sig_stars} -\title{Add '***' to a data.frame based on the p.values} +\title{Add stars '***' to a data.frame (from broom's `tidy` function) based on p.values} \usage{ sig_stars(pval) } @@ -13,7 +13,7 @@ sig_stars(pval) A list with all variables defined in the function } \description{ -Add '***' to a data.frame based on the p.values +Add stars '***' to a data.frame (from broom's `tidy` function) based on p.values } \examples{ sig_stars(c(.0009, .049, .009, .4, .09)) diff --git a/man/sshh.Rd b/man/sshh.Rd index 7b27be72e..dcdffcf7c 100644 --- a/man/sshh.Rd +++ b/man/sshh.Rd @@ -2,12 +2,12 @@ % Please edit documentation in R/radiant.R \name{sshh} \alias{sshh} -\title{Avoid warnings and messages. Adapted from http://www.onthelambda.com/2014/09/17/fun-with-rprofile-and-customizing-r-startup/} +\title{Do not show warnings and messages to user (e.g., for ggplot2). Adapted from http://www.onthelambda.com/2014/09/17/fun-with-rprofile-and-customizing-r-startup/} \usage{ sshh(...) } \description{ -Avoid warnings and messages. Adapted from http://www.onthelambda.com/2014/09/17/fun-with-rprofile-and-customizing-r-startup/ +Do not show warnings and messages to user (e.g., for ggplot2). Adapted from http://www.onthelambda.com/2014/09/17/fun-with-rprofile-and-customizing-r-startup/ } \examples{ sshh( library(dplyr) ) diff --git a/man/win_launcher.Rd b/man/win_launcher.Rd index 1ae52836e..9091c7f0a 100644 --- a/man/win_launcher.Rd +++ b/man/win_launcher.Rd @@ -2,17 +2,17 @@ % Please edit documentation in R/radiant.R \name{win_launcher} \alias{win_launcher} -\title{Make a .bat launcher for Windows on the desktop} +\title{Create a .bat launcher for Windows} \usage{ win_launcher(app = c("marketing", "quant", "base")) } \arguments{ -\item{app}{App to install ('marketing', 'quant', or 'base'). Default is 'marketing'} +\item{app}{App to run when the desktop icon is double-clicked ("marketing", "quant", or "base"). Default is "marketing"} } \value{ -On a windows machine a file named 'radiant.bat' will be put on the desktop. Double-click the file to launch the Radiant app selected +On Windows a file `radiant.bat` will be put on the desktop. Double-click the file to launch the specified Radiant app } \description{ -Make a .bat launcher for Windows on the desktop +Create a .bat launcher for Windows } From a4576854136a3261f8d06fe2aa4f24ad383c4394 Mon Sep 17 00:00:00 2001 From: Vincent Nijs Date: Thu, 5 Mar 2015 19:21:16 -0800 Subject: [PATCH 02/22] Don't pull shinyAce and rpivotable --- build/git_win.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/git_win.sh b/build/git_win.sh index fe5536ceb..d43d09e0c 100644 --- a/build/git_win.sh +++ b/build/git_win.sh @@ -5,7 +5,7 @@ cd ~/Desktop/GitHub #git clone git@github.com:trestletech/shinyAce.git cd radiant_dev git pull -cd ../shinyAce -git pull -cd ../rpivotTable -git pull +#cd ../shinyAce +#git pull +#cd ../rpivotTable +#git pull From c24c44cb21191dde569e81ef5caf2726a3e87ba9 Mon Sep 17 00:00:00 2001 From: Vincent Nijs Date: Thu, 5 Mar 2015 19:22:22 -0800 Subject: [PATCH 03/22] Rd --- man/sampling.Rd | 33 +++++++++++++++++++++++++++++++++ man/summary.sampling.Rd | 25 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 man/sampling.Rd create mode 100644 man/summary.sampling.Rd diff --git a/man/sampling.Rd b/man/sampling.Rd new file mode 100644 index 000000000..d5b33707d --- /dev/null +++ b/man/sampling.Rd @@ -0,0 +1,33 @@ +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/sampling.R +\name{sampling} +\alias{sampling} +\title{Simple random sampling} +\usage{ +sampling(dataset, smp_var, smp_sample_size, data_filter = "") +} +\arguments{ +\item{dataset}{Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant} + +\item{smp_var}{The variable to sample from} + +\item{smp_sample_size}{Number of units to select} + +\item{data_filter}{Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")} +} +\value{ +A list of variables defined in sampling as an object of class sampling +} +\description{ +Simple random sampling +} +\details{ +See \url{http://mostly-harmless.github.io/radiant/quant/sampling.html} for an example in Radiant +} +\examples{ +result <- sampling("rndnames","Names",10) +} +\seealso{ +\code{\link{summary.sampling}} to summarize results +} + diff --git a/man/summary.sampling.Rd b/man/summary.sampling.Rd new file mode 100644 index 000000000..677deb664 --- /dev/null +++ b/man/summary.sampling.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2 (4.1.0): do not edit by hand +% Please edit documentation in R/sampling.R +\name{summary.sampling} +\alias{summary.sampling} +\title{Summary method for sampling} +\usage{ +\method{summary}{sampling}(result) +} +\arguments{ +\item{result}{Return value from \code{\link{sampling}}} +} +\description{ +Summary method for sampling +} +\details{ +See \url{http://mostly-harmless.github.io/radiant/quant/sampling} for an example in Radiant +} +\examples{ +result <- sampling("rndnames","Names",10) +summary(result) +} +\seealso{ +\code{\link{sampling}} to generate the results +} + From a393fe22bf1ae7c6ff2d35b8d64d89462ceeda09 Mon Sep 17 00:00:00 2001 From: Vincent Nijs Date: Mon, 16 Mar 2015 21:05:06 -0700 Subject: [PATCH 04/22] Typo --- man/save_factors.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/save_factors.Rd b/man/save_factors.Rd index dbe02ce2c..d30e62d54 100644 --- a/man/save_factors.Rd +++ b/man/save_factors.Rd @@ -13,7 +13,7 @@ save_factors(object) Save factor scores to active dataset } \details{ -See \url{http://mostly-harmless.github.io/radiant/matrix/full_factor.html} for an example in Radiant +See \url{http://mostly-harmless.github.io/radiant/marketing/full_factor.html} for an example in Radiant } \examples{ \dontrun{ From 9fb827cf805b684f8bc9abf90aeb9e9bdbf62c71 Mon Sep 17 00:00:00 2001 From: Vincent Nijs Date: Tue, 17 Mar 2015 16:03:34 -0700 Subject: [PATCH 05/22] Update --- build/build_win.R | 2 +- build/git_win.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/build_win.R b/build/build_win.R index 17616c0d8..20c7f287b 100644 --- a/build/build_win.R +++ b/build/build_win.R @@ -6,9 +6,9 @@ library(devtools) document(roclets=c('rd', 'collate', 'namespace')) -build('../radiant_dev', binary = TRUE) build('../shinyAce', binary = TRUE) build('../rpivotTable', binary = TRUE) +build('../radiant_dev', binary = TRUE) setwd('../') rfile <- Sys.glob("*zip") diff --git a/build/git_win.sh b/build/git_win.sh index d43d09e0c..fe5536ceb 100644 --- a/build/git_win.sh +++ b/build/git_win.sh @@ -5,7 +5,7 @@ cd ~/Desktop/GitHub #git clone git@github.com:trestletech/shinyAce.git cd radiant_dev git pull -#cd ../shinyAce -#git pull -#cd ../rpivotTable -#git pull +cd ../shinyAce +git pull +cd ../rpivotTable +git pull From 0e779ef2068a48a3c0a340654f6422457b32d688 Mon Sep 17 00:00:00 2001 From: mostly-harmless Date: Tue, 17 Mar 2015 19:24:08 -0700 Subject: [PATCH 06/22] Cleanup --- DESCRIPTION | 4 ++-- README.md | 2 +- build/build_mac_win.sh | 18 +++++++++--------- build/remove_screenshots.R | 27 +++++++++++++++++++++++++++ cran-comments.md | 8 ++++++-- inst/base/tools/app/about.md | 2 +- inst/base/tools/app/quit.R | 2 +- inst/marketing/server.R | 3 --- 8 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 build/remove_screenshots.R diff --git a/DESCRIPTION b/DESCRIPTION index a0b4fa812..08608770c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: radiant Title: Business Analytics using R and Shiny -Version: 0.1.74 -Date: 2015-3-17 +Version: 0.1.76 +Date: 2015-3-18 Authors@R: person("Vincent", "Nijs", , "radiant@rady.ucsd.edu", c("aut", "cre")) Description: A platform-independent browser-based interface for business analytics in R, based on the Shiny package. diff --git a/README.md b/README.md index 87e183bc1..cdf16e8ae 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A platform-independent browser-based interface for business analytics in [R](http://www.r-project.org/), based on the [Shiny](http[://www.rstudio.com/shiny/) package. Radiant is designed to facilitate decision making in business using data and models. It is currently used in the Research for Marketing Decisions and Quantitative Analysis classes at the Rady School of Management by Vincent Nijs and Terrence August. Developed by Vincent Nijs. For questions and comments please contact me at radiant@rady.ucsd.edu. [![Travis-CI Build Status](https://travis-ci.org/mostly-harmless/radiant.png?branch=master)](https://travis-ci.org/mostly-harmless/radiant) -Version: 0.1.73, Date: 2015-3-17 +Version: 0.1.76, Date: 2015-3-18 ## Key features diff --git a/build/build_mac_win.sh b/build/build_mac_win.sh index 4d4e1cf8f..bb6426ecc 100755 --- a/build/build_mac_win.sh +++ b/build/build_mac_win.sh @@ -19,15 +19,15 @@ rm $dirmac/radiant* rm $dirmac_mav/radiant* rm $dirwin/radiant* -# rm $dirsource/shinyAce* -# rm $dirmac/shinyAce* -# rm $dirmac_mav/shinyAce* -# rm $dirwin/shinyAce* - -# rm $dirsource/rpivotTable* -# rm $dirmac/rpivotTable* -# rm $dirmac_mav/rpivotTable* -# rm $dirwin/rpivotTable* +rm $dirsource/shinyAce* +rm $dirmac/shinyAce* +rm $dirmac_mav/shinyAce* +rm $dirwin/shinyAce* + +rm $dirsource/rpivotTable* +rm $dirmac/rpivotTable* +rm $dirmac_mav/rpivotTable* +rm $dirwin/rpivotTable* # build source and mac version R --save < build/build_mac_source.R 2>&1 diff --git a/build/remove_screenshots.R b/build/remove_screenshots.R new file mode 100644 index 000000000..8daaee36c --- /dev/null +++ b/build/remove_screenshots.R @@ -0,0 +1,27 @@ +# based on https://gist.github.com/mages/1544009 +setwd("~/gh/radiant_dev/inst/quant/tools/help") +list.files("figures") +unlink("figures/*.png") +list.files("figures") +cat("--", file="figures/place_holder.txt") + +filenames <- list.files(pattern="\\.(md|Rmd)$") +for( f in filenames ){ + org <- readLines(f) + changed <- gsub( "figures_quant/", "http://mostly-harmless.github.io/radiant/quant/figures_quant/", org ) +# changed <- gsub( "http://mostly-harmless.github.io/radiant/marketing/figures_quant/", "http://mostly-harmless.github.io/radiant/quant/figures_quant/", org ) + cat(changed, file=f, sep="\n") +} + +setwd("~/gh/radiant_dev/inst/marketing/tools/help") +list.files("figures") +unlink("figures/*.png") +list.files("figures") +cat("--", file="figures/place_holder.txt") + +filenames <- list.files(pattern="\\.(md|Rmd)$") +for( f in filenames ){ + org <- readLines(f) + changed <- gsub( "figures_marketing/", "http://mostly-harmless.github.io/radiant/marketing/figures_marketing/", org ) + cat(changed, file=f, sep="\n") +} diff --git a/cran-comments.md b/cran-comments.md index c2c56230d..7094650b9 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,8 +1,10 @@ ## Critical bug-fix -The package version submitted to CRAN has a fatal bug that crashes the Shiny app -on start-up. The bug is fixed in this submission. +The package version now on CRAN has a fatal bug that crashes the app on +start-up. The bug is fixed in this submission. My sincere apologies for the +inconvenience. +There were no ERRORs or WARNINGs. There was 1 NOTE about a possible misspelling. ### Test environments * local OS X install, R 3.1.2 @@ -10,6 +12,8 @@ on start-up. The bug is fixed in this submission. * ubuntu 12.04 (on travis-ci), R 3.1.2 * win-builder (devel and release) +## earlier communications + ## Resubmission This is a resubmission. In this version I have: diff --git a/inst/base/tools/app/about.md b/inst/base/tools/app/about.md index 87e183bc1..cdf16e8ae 100644 --- a/inst/base/tools/app/about.md +++ b/inst/base/tools/app/about.md @@ -4,7 +4,7 @@ A platform-independent browser-based interface for business analytics in [R](http://www.r-project.org/), based on the [Shiny](http[://www.rstudio.com/shiny/) package. Radiant is designed to facilitate decision making in business using data and models. It is currently used in the Research for Marketing Decisions and Quantitative Analysis classes at the Rady School of Management by Vincent Nijs and Terrence August. Developed by Vincent Nijs. For questions and comments please contact me at radiant@rady.ucsd.edu. [![Travis-CI Build Status](https://travis-ci.org/mostly-harmless/radiant.png?branch=master)](https://travis-ci.org/mostly-harmless/radiant) -Version: 0.1.73, Date: 2015-3-17 +Version: 0.1.76, Date: 2015-3-18 ## Key features diff --git a/inst/base/tools/app/quit.R b/inst/base/tools/app/quit.R index 761c46277..bb5763cd7 100644 --- a/inst/base/tools/app/quit.R +++ b/inst/base/tools/app/quit.R @@ -78,7 +78,7 @@ observe({ # cat(input$rmd_report, file = pipe("pbcopy")) } } - rm(r_env, envir = .GlobalEnv) # removing the reference to the shiny environment + try(rm(r_env, envir = .GlobalEnv), silent = TRUE) # removing the reference to the shiny environment stopApp(cat(stop_message)) }) } else { diff --git a/inst/marketing/server.R b/inst/marketing/server.R index ca106915a..dba10c8ca 100644 --- a/inst/marketing/server.R +++ b/inst/marketing/server.R @@ -30,9 +30,6 @@ shinyServer(function(input, output, session) { pattern="\\.(r|R)$", full.names = TRUE)) source(file, local = TRUE) - # shinyFileChoose(input, 'file', roots=c('R Installation'=R.home()), session=session, restrictions=system.file(package='base')) - # shinyFileChoose(input, 'file', roots=c('R Installation'=R.home()), session=session) - # save state on refresh or browser close saveStateOnRefresh(session) From 5c0cececaa9aee5e8997310b16c71a054f634e03 Mon Sep 17 00:00:00 2001 From: mostly-harmless Date: Wed, 18 Mar 2015 15:20:30 -0700 Subject: [PATCH 07/22] State fix for viz and compare + updated urls for videos --- README.md | 8 +- inst/base/tools/app/about.md | 8 +- inst/base/tools/app/tutorials.md | 17 ++-- inst/base/tools/data/visualize_ui.R | 6 +- inst/examples/RadiantState.html | 81 +++++++++++-------- inst/examples/RadiantState.rda | Bin 119120 -> 55658 bytes inst/quant/tools/analysis/compare_means_ui.R | 4 +- inst/quant/tools/analysis/compare_prop_ui.R | 8 +- 8 files changed, 74 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index cdf16e8ae..61fa1ca37 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ To help you get started you can also take a look at this [playlist](https://www. ## How-to install Radiant -- Required: [R](http://cran.cnr.berkeley.edu/), version 3.1.2 or later +- Required: R, version 3.1.2 or later - Required: A modern browser (e.g., Chrome, Safari, or Firefox). The latest version of internet explorer may work as well. -- Recommended: [Rstudio](http://www.rstudio.com/products/rstudio/download/) +- Recommended: Rstudio Radiant is now available on [CRAN](http://cran.r-project.org/web/packages/radiant/index.html). To install the latest version of the package with complete documentation for off-line access use the [radiant_miniCRAN](https://github.com/mostly-harmless/radiant_miniCRAN) repository (created using [miniCRAN](https://github.com/andrie/miniCRAN)). Open R(studio) and copy-and-paste the commands below. @@ -69,9 +69,9 @@ library(radiant) radiant('quant') ``` -See also the [installing Radiant](https://www.youtube.com/watch?v=AtB2SsmzBsk) video. +See also the [installing Radiant](https://www.youtube.com/embed/NEPSFiHH_dw) video. - + ## Creating a desktop launcher diff --git a/inst/base/tools/app/about.md b/inst/base/tools/app/about.md index cdf16e8ae..61fa1ca37 100644 --- a/inst/base/tools/app/about.md +++ b/inst/base/tools/app/about.md @@ -44,9 +44,9 @@ To help you get started you can also take a look at this [playlist](https://www. ## How-to install Radiant -- Required: [R](http://cran.cnr.berkeley.edu/), version 3.1.2 or later +- Required: R, version 3.1.2 or later - Required: A modern browser (e.g., Chrome, Safari, or Firefox). The latest version of internet explorer may work as well. -- Recommended: [Rstudio](http://www.rstudio.com/products/rstudio/download/) +- Recommended: Rstudio Radiant is now available on [CRAN](http://cran.r-project.org/web/packages/radiant/index.html). To install the latest version of the package with complete documentation for off-line access use the [radiant_miniCRAN](https://github.com/mostly-harmless/radiant_miniCRAN) repository (created using [miniCRAN](https://github.com/andrie/miniCRAN)). Open R(studio) and copy-and-paste the commands below. @@ -69,9 +69,9 @@ library(radiant) radiant('quant') ``` -See also the [installing Radiant](https://www.youtube.com/watch?v=AtB2SsmzBsk) video. +See also the [installing Radiant](https://www.youtube.com/embed/NEPSFiHH_dw) video. - + ## Creating a desktop launcher diff --git a/inst/base/tools/app/tutorials.md b/inst/base/tools/app/tutorials.md index 72baf7bd0..62156e63b 100644 --- a/inst/base/tools/app/tutorials.md +++ b/inst/base/tools/app/tutorials.md @@ -3,20 +3,25 @@ ## Installing Radiant - + ## Starting and stopping - + ## Getting help - + ## Getting data in and out - + +## Selecting variables for fast and efficient analysis + + + +