From a6daa3acedd2bf56414eee3902432c8b7ce593c5 Mon Sep 17 00:00:00 2001 From: Taha Ahmed Date: Sun, 12 Jan 2014 09:16:32 +0100 Subject: [PATCH] Added shiny-matrix.sh, and now chertex.sh updates the Shiny matrix. --- chertex.sh | 8 +++++++- chrome-with-tabs.sh | 6 +++++- shiny-matrix.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100755 shiny-matrix.sh diff --git a/chertex.sh b/chertex.sh index 34d6a13..272a2bc 100755 --- a/chertex.sh +++ b/chertex.sh @@ -123,8 +123,14 @@ if [ $# -eq 1 ]; then # If $jobname is sample-matrix, run knitr and markdown if [[ $jobname == "sample-matrix" ]]; then echo " -----------------------------------------------------------" - echo " sample-matrix detected: running knit() and markdownToHTML()" + echo " sample-matrix: update SHINY, run knit() + markdownToHTML()" echo " -----------------------------------------------------------" + + # Old attempts, never worked + #PORT=$( /home/taha/chepec/chetex/sample-matrix/shinyapp/shiny.port + + +# Save PID of this bash job +#echo $$ > /home/taha/chepec/chetex/sample-matrix/shinyapp/shiny.pid +# do iy inside Shiny itself with "reactive values" instead + +# Run R Shiny app at localhost port +# Note: this process does not return control to bash... +R -e "shiny::runApp('~/chepec/chetex/sample-matrix/shinyapp', port = $PORT)" + + +