OS: Windows 7 - 64 bit
Follow the steps in the link below, except for creating one batch file to launch a brilliant application, since the offer to launch a web browser in this web link does not work (the web browser opens without the contents of the application), at least for me.
This batch of script finds UNUSED UNPRIVILEGED PORT and uses it to open the local web application ( Portable R Shiny App ) using the Chrome Chrome portable browser from a USB drive. In the above web link, the authorβs proposal to create separate runShinyApp.R and run.bat is reduced to one batch file, as described below.
@echo off title 'My Shiny APP' setlocal ENABLEDELAYEDEXPANSION for /l %%X in (1025,1,65535) do ( netstat -o -n -a | findstr :%%X if !ERRORLEVEL! neq 0 ( set avail_port=%%X goto eof ) ) :eof SET ROPTS=--no-save --no-environ --no-init-file --no-restore --no-Rconsole start "" ".\GoogleChromePortable\App/Chrome-bin/chrome.exe" "http://localhost:!avail_port!/" R-Portable\App\R-Portable\bin\Rscript.exe %ROPTS% -e "require(methods); shiny::runApp('./shiny', launch.browser = FALSE, port = !avail_port!)" 1> ShinyAppOut.log 2> ShinyAppMsg.log
Sathish
source share