runr (version 0.0.8)

proc_bash: Run a Bash process

Description

This function returns a list of functions to start/run/stop a Bash process. The communication between R and Bash is through a socket.

Usage

proc_bash(port = 2000)

Arguments

port

A TCP port number

Value

A list of functions.

Examples

Run this code
# NOT RUN {
b = proc_bash()
b$start()
b$exec("x=1")
b$exec("echo $x")
b$exec("echo $x--$x--$x")
b$exec("x=abcABC123ABCabc", "echo `expr length $x`  # length of x")
b$exec("foo bar")  # an error
b$running()
b$stop()
# }

Run the code above in your browser using DataLab