RockScience
RockScience

Reputation: 18580

invoke Rscript without a script name

I would like to call Rscript without a proper script, just by writing it in a console. is it possible? something like

c:/path/to/R/bin/Rscript.exe "here is a R code, not a R file"

I am on Windows.

Upvotes: 0

Views: 43

Answers (1)

Toolbox
Toolbox

Reputation: 2473

Run Rscript with -e argument:

Rscript -e "getwd()"

Upvotes: 1

Related Questions