[Rd] Revision of shell.exec?

Brian Oney zenlines at gmail.com
Wed Sep 14 12:27:32 CEST 2011

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 
Hope the idea isn't received as "too stupid".


More information about the R-devel mailing list