inShell: Convert R code to the character vector of shell commands...

View source: R/inShell.R

inShellR Documentation

Convert R code to the character vector of shell commands evaluating the given R code.

Description

The function takes R commands, deparses them, substitutes existing variables, and converts everything to character strings, from which a shell command is created that sends the given R code to the R interpreter. Function is used internally to print the commands of R rules into Makefile.

Usage

inShell(...)

Arguments

...

R commands to be converted

Value

A character vector of shell commands, which send the given R code by pipe to the R interpreter

Author(s)

Michal Burda

See Also

rRule(), markdownRule()

Examples

inShell({
  x <- 1
  y <- 2
  print(x+y)
})

beerda/rmake documentation built on July 2, 2022, 6:24 p.m.