exportInEnv: exportInEnv

Description Usage Arguments Details Value Examples

Description

Takes R variables and exprort them as environment variables

Usage

1

Arguments

...

Names of variables.

Details

This function was developed for analysis pipelines running R and shell chunks with knitR. Changing the environment in one shell chunk has no effect on the next ones, but changing it in a R chunk has a global effect.

This function uses .Internal(Sys.setenv() because its syntax was more friendly for automation.

Value

Returns shell commands that, would have the same effect. This is useful when cut-pasting from knitR workflows that use R to change the environment and then run some shell chunks.

Examples

1
2
3
foo <- "bar"
toto <- "tata"
exportInEnv("foo", "toto")

charles-plessy/smallCAGEqc documentation built on May 13, 2019, 3:31 p.m.