There might be a better way, but on the mac "open" opens a file as if you doubleclick on it in Finder, and the "system" command in R executes a shell command, so you should be able to do
R> system(paste("open", filename)) Kasper On Wed, Mar 24, 2010 at 7:37 PM, Gi-Mick Wu <mick...@mail.mcgill.ca> wrote: > Greetings R Mac users, > > I switched from windows to mac relatively recently (better late than never), > and am still adjusting. > > Does anyone know whether there is the equivalent of shell.exe(filename)? > > Basically, I used the command to view a graph that was just saved in a > pdf/png or other formats without having to manually open the file. > > ### Example: > pdf(filename, ... ) > plot( ... ) > dev.off() > shell.exec(filename) > > ### > > Thanks! > Mick > PS I searched the list, R help, & google, but did not find it > > _______________________________________________ > R-SIG-Mac mailing list > R-SIG-Mac@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac