funr: funr: providing a simple command-line interface to R...

Description Usage Arguments Source Examples

View source: R/funr.R

Description

Wraps Rscript in a easy to use manner, exposing all R functions from the terminal. The github page provides more details with examples, highlights and caveats.

Usage

1
funr(args, help_text, script_name = "funr")

Arguments

args

Should always be: commandArgs(trailingOnly = TRUE), when used inside a script. Example

help_text

A simple text to be displayed describing options and usage of this interface. Supplying this, replaces the default text.

script_name

Name of the script. This is used in the the help text. [funr]

Source

https://github.com/sahilseth/funr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## show funr help
## terminal version: funr -h
funr()


## show rnorm help
## terminal version: funr -h rnorm
render_funr(funr(args=c("-h", "rnorm")))

## Generate a few random numbers
## terminal version: funr rnorm n=10
render_funr(funr(args=c("rnorm", "n=10")))

funr documentation built on May 1, 2019, 9:02 p.m.

Related to funr in funr...