[R-SIG-Mac] shell.exe() equivalent?
Kasper Daniel Hansen
kasperdanielhansen at gmail.com
Thu Mar 25 01:26:09 CET 2010
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.wu at 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 at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
More information about the R-SIG-Mac
mailing list