Skip to content

A framework for deploying self-contained R-based applications to the desktop

License

Notifications You must be signed in to change notification settings

addnox/DesktopDeployR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DesktopDeployR

A framework for deploying self-contained R-based applications to the desktop

Meets the need to share R based applications without:

  • training end users to use R
  • setting up a centralized web-application server

Preferred requirements:

  • minimal or no additional dependencies to install by user

General Application Structure

/<appname>          # - application deployment root
./app/              # - application working directory

	./library/        # - application specific package library

	./shiny/          # - application framework folder (in this case, shiny)
		./global.R      # - global constants and functions for shiny-app
		./server.R      # - server processing function for shiny-app
		./ui.R          # - user interface definition function for shiny-app

	./app.R           # - application launch entry script
	./config.cfg      # - application configuration file
	./packages.txt    # - list of primary package dependencies
	./...             # - other application files

./dist/             # - application launch framework
	./R-Portable/     # - "vanilla" R interpreter
	./script/
		./R
			./run.R       # - R environment initialization and application launch
		./wsf
			./js
				./JSON.minify.js  # - JS to JSON minifier, allows comments in JSON files
				./json2.js  # - JSON parsing library
				./run.js    # - OS application launch script
			./run.wsf     # - merges javascript dependencies and launch script
	./USAGE.md        # - notes on how the dist folder is structured

/<appname>.bat      # - batch file to start application
/README.md          # - this file or brief description of application

Compatible Application Frameworks

This deployment strategy has been tested to work with both Shiny, RGTK, and Tcl/Tk based applications. The only requirements are

  • that the application entry point app.R have the appropriate launching function calls

  • the requisite GUI toolkit package dependencies are installed in app/library

Using a different (newer) version of R

Either replace ./dist/R-Portable/ with the version of R-Portable that is required or modify ./app/config.cfg to point to the desired R installation (e.g. a system install).

Untracked

Due to their potentially large sizes, it is not recommended that the following folders be tracked by version control (i.e. Git)

  • /app/library/
  • /dist/R-Portable

To handle the initial creation of the above:

  • /app/library/ is generated by installing packages listed in packages.txt targeting /app/library/ as the library location when the application is first launched. Any custom packages (i.e. those not on a CRAN mirror) need to be installed manually.

  • the /dist/R-Portable directory is "installed" using the Portable Apps installer.

Deployment

The entire folder structure is copied to the deployed location. Optionally, an installer can be created using NSIS installer.

About

A framework for deploying self-contained R-based applications to the desktop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.5%
  • R 9.4%
  • Batchfile 0.1%