It is a promising solution. Yet, there is room for improvement. I
revise the if condition so it won't throw an error during ordinary
startup.
.First <- function() {
if (length(commandArgs(T))>0 && commandArgs(T)[1] == "ld"){
load(commandArgs(T)[-1], .GlobalEnv)
}
}
For the Rload script, i
Well, that isn't ideal for my purposes. (A little context - basically
I have a script that I'm running for a lot of simulations, which is
kinda buggy, and what I'm doing is I'm having the script periodically
save whatever it has done so far to an automatically named file. Then
if something odd happ
Another possibility is to have a separate directory
for each project and place an .RData file in each.
Now just cd to whatever directory corresponds to the
project you wish to work on and start R normally.
No code is needed.
On Mon, Jan 12, 2009 at 10:04 AM, Zhou Fang wrote:
> Ok, looks like I ca
Ok, looks like I can do what I want with --args, commandArgs() and an
appropiate .First.
Thanks,
Zhou
On Mon, Jan 12, 2009 at 2:27 PM, David Winsemius wrote:
> See if this material is helpful:
>
> http://cran.r-project.org/doc/manuals/R-intro.html#Invoking-R-from-the-command-line
>
> -- David W
See if this material is helpful:
http://cran.r-project.org/doc/manuals/R-intro.html#Invoking-R-from-the-command-line
--
David Winsemius
On Jan 12, 2009, at 7:24 AM, Zhou Fang wrote:
That's not really what I meant by 'command line'. I meant, well,
loading from e.g. a bash shell, not from wi
That's not really what I meant by 'command line'. I meant, well,
loading from e.g. a bash shell, not from within an interactive R
session itself.
Thanks anyways,
Zhou
(Possibly this email was sent twice. Apologies)
On Mon, Jan 12, 2009 at 12:15 PM, Henrique Dallazuanna wrote:
> See ?load
>
> O
See ?load
On Mon, Jan 12, 2009 at 10:12 AM, Zhou Fang wrote:
> Hi,
>
> Is there any way to load workspaces (e.g. stuff from save.image) from
> the command line? I'm on Linux, and would find this very helpful.
>
> I'm guessing this functionality can be duplicated with a skillful bash
> script to
7 matches
Mail list logo