README.md

locatexec

R build
status Lifecycle:
maturing

The package aims to allow the localization of external programs such as python, node.js, free office in order to be able to call them from R. The package is very experimental.

library(locatexec)

if(is_available("node"))
  message(node_exec())
#> /usr/local/bin/node

if(is_available("chrome"))
  message(chrome_exec())
#> /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

if(is_available("python"))
  message(python_exec())
#> /Users/davidgohel/miniconda3/bin/python

if(is_available("libreoffice"))
  message(libreoffice_exec())
#> /Applications/LibreOffice.app/Contents/MacOS/soffice

Motivations

This was motivated by the need for tools similar to rmarkdown::pandoc_available() and rmarkdown::pandoc_exec() but allowing to locate external programs other than pandoc.

I need to use these programs from R without having heavy dependencies. These functions will mainly be used to automate some visual tests or to improve the documentation of my other packages.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("davidgohel/locatexec")

Related work



davidgohel/locatexec documentation built on Feb. 17, 2021, 9:46 a.m.