From ligges at statistik.tu-dortmund.de  Wed Sep 14 13:47:19 2011
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Wed, 14 Sep 2011 13:47:19 +0200
Subject: [Rd] Revision of shell.exec?
In-Reply-To: <4E708194.8060406@gmail.com>
References: <4E708194.8060406@gmail.com>
Message-ID: <4E709447.10305@statistik.tu-dortmund.de>



On 14.09.2011 12:27, Brian Oney wrote:
> Hi List,
> I hope this is correct list to propose function extensions, sorry if not.
> I am preparing for a (hopefully painless) migration to linux. As far as
> I am aware of, the function "shell.exec" only comes with the windows
> version. I think this is a handy little function and would like to see
> my scripts work when I migrate.
>
> May I propose something (like the following)?
>
> open.file <- function(file) {
> if(.Platform$OS.type=="windows") {shell.exec(file)} else
> {system(paste("open ",file))}
> }
>
> Or just a small addition to the shell.exec function and no new named
> function.
> Hope the idea isn't received as "too stupid".

What is "open" supposed to do on a non-Windows machine? I do not have it 
on the only Linux installation I looked at now, hence we obviously 
cannot assume it exists on an arbitrary installation.

Best,
Uwe Ligges


>
> Cheers,
> Brian
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Revision of shell.exec?
Uwe Ligges