install_MODIStsp_launcher: Install a launcher for MODIStsp

View source: R/MODIStsp_install_launcher.R

install_MODIStsp_launcherR Documentation

Install a launcher for MODIStsp


Function which allows to use MODIStsp in batch mode by creating links


  bin_dir = NA,
  rscript_dir = NA,
  desktop_dir = NA,
  desktop_shortcut = TRUE,
  sudo = FALSE


  • on Linux, directory in which the link to the bash script should be placed, Default: "/usr/bin" - use of a path included in the PATH environment variable is suggested;

  • on Windows, directory where to place the menu entry in the Start Menu, Default: Start Menu -> Programs -> MODIStsp.


character in Windows only, the path of the directory in which Rscript is installed (usually is \"C:/Progra~1/R/R-version/bin/x64"). Edit this parameter if R is installed in a custom directory.



  • on Linux, directory in which the desktop entry should be placed, Default: /usr/share/applications;

  • on Windows, directory where to place the desktop entry, Default: "Desktop" (Ignored if desktop_shortcut = FALSE).


logical indicates if the desktop entry or the desktop shortcut should be created, Default: TRUE.


(Linux only) logical indicates if administrator rights have to be used to write within bin_dir and desktop_dir, If FALSE the root password is requested when launching the function. Note that using default values of bin_dir and desktop_dir requires to set this option to TRUE (or to launch the script in a root session of R), Default: FALSE


MODIStsp can be used also as a stand-alone tool (i.e., without opening RStudio or R-GUI) by launching a bash/batch script, which is stored in the installation folder (/ExtData/Launcher) To allow to easily find it, this function creates a desktop entry and a symbolic link to the bash script (on Linux) or a link in the Start Menu to the batch script and a shortcut on the desktop (on Windows). Note that, if the packages MODIStsp is installed in a version-dependent directory (as the default one is), this function should be re-executed after an R upgrade, otherwise the links would continue to point to the old package version!


The function is called for its side effects.


License: GPL 3.0


Luigi Ranghetti, phD (2015)


# Linux: common installation (script in /usr/bin,
# desktop entry in /usr/share/applications)
# (requires administrator permissions)
## Not run: 
# the administrator password is asked interactively
install_MODIStsp_launcher(sudo = TRUE)

## End(Not run)

# Linux: installation in a directory which does not require administrator
# permissions
## Not run: 
install_MODIStsp_launcher(bin_dir = "~/bin", desktop_dir = "~/Desktop")

## End(Not run)

# Windows: common installation
# (script in the Start Menu and shortcut on the desktop)
## Not run: 

## End(Not run)

MODIStsp documentation built on Aug. 27, 2022, 1:05 a.m.