Added shiny-matrix.sh, and now chertex.sh updates the Shiny matrix.
parent
59e38ea466
commit
a6daa3aced
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
## Start R Shiny app "sample-matrix"
|
||||
## Written Dec 22, 2013
|
||||
## Taha Ahmed
|
||||
|
||||
|
||||
## bash /home/taha/chepec/chetex/common/bash/shiny-matrix.sh
|
||||
|
||||
|
||||
# Random port number between 2000 and 10000
|
||||
PORT=$(shuf -i 2000-10000 -n 1)
|
||||
|
||||
# Write the current Shiny matrix port number to file in
|
||||
# ~/chepec/chetex/sample-matrix/shinyapp/shiny.port
|
||||
echo $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)"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue