Re: [R] : source R-script interactively outside R

2009-10-30 Thread Trevor Davis
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"

[R] : source R-script interactively outside R

2009-08-16 Thread Angel Spassov
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: