At least in the Unix version of the ``Rscript`` front-end to R (but
oddly enough not ``R CMD BATCH``) you could put something like this in
test.R:
cat("Save workspace image? [y/n]: ")
answer <- tolower( scan("stdin", "", n=1) )
if (substr(answer, 1, 1) == "y") {
q("yes")
} else {
q("no"
DeaR list,
let us assume we have stored a couple of functions in 'test.R'. Is it
possible to run
R CMD BATCH "test.R"
or
R --file="test.R"
interactively and if yes how?
A better formulated question sounds like this: how can I source "test.R"
interactively OUTSIDE R?
Another clarification try:
2 matches
Mail list logo