Grokbase Groups R r-help March 2002
FAQ
i want to call
"c:/Program Files/Netscape/Communicator/Program/netscape.exe"
with system
but
system("c:/Program Files/Netscape/Communicator/Program/netscape.exe")
does not work because of the blank.

system('"c:/Program
Files/Netscape/Communicator/Program/netscape.exe"',waitúLSE)
works exactly like i want.

when i set
options(browser="c:/Program
Files/Netscape/Communicator/Program/netscape.exe")

how can i manipulate the result of
getOption("browser")

so that i get a string which will work with the system command?





--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Search Discussions

  • Ggrothendieck at Mar 29, 2002 at 3:37 am
    On my Windows 2000 system running R 1.4.1
    the following R command:

    shell("start netscp6")

    launches Netscape. Also this R command:

    shell("start iexpore")

    launches Internet Explorer.

    On 29 Mar 2002 at 1:36, Erich Neuwirth wrote:

    i want to call
    "c:/Program Files/Netscape/Communicator/Program/netscape.exe"
    with system
    but
    system("c:/Program Files/Netscape/Communicator/Program/netscape.exe")
    does not work because of the blank.

    system('"c:/Program
    Files/Netscape/Communicator/Program/netscape.exe"',waitúLSE)
    works exactly like i want.

    when i set
    options(browser="c:/Program
    Files/Netscape/Communicator/Program/netscape.exe")

    how can i manipulate the result of
    getOption("browser")

    so that i get a string which will work with the system command?





    --
    Erich Neuwirth, Computer Supported Didactics Working Group
    Visit our SunSITE at http://sunsite.univie.ac.at
    Phone: +43-1-4277-38624 Fax: +43-1-4277-9386

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
  • Erich Neuwirth at Mar 29, 2002 at 2:11 pm
    the problem is that i am not sure of the start
    shell("start netscp6")
    mechanism
    works on all win32 platforms.
    the "start" feature might be a property of later versons of win32.
    the system(...) might have better chances of working on
    all win32 platforms.





    ggrothendieck at yifan.net wrote:
    On my Windows 2000 system running R 1.4.1
    the following R command:

    shell("start netscp6")

    launches Netscape. Also this R command:

    shell("start iexpore")

    launches Internet Explorer.
    On 29 Mar 2002 at 1:36, Erich Neuwirth wrote:

    i want to call
    "c:/Program Files/Netscape/Communicator/Program/netscape.exe"
    with system
    but
    system("c:/Program Files/Netscape/Communicator/Program/netscape.exe")
    does not work because of the blank.

    system('"c:/Program
    Files/Netscape/Communicator/Program/netscape.exe"',waitúLSE)
    works exactly like i want.

    when i set
    options(browser="c:/Program
    Files/Netscape/Communicator/Program/netscape.exe")

    how can i manipulate the result of
    getOption("browser")

    so that i get a string which will work with the system command?





    --
    Erich Neuwirth, Computer Supported Didactics Working Group
    Visit our SunSITE at http://sunsite.univie.ac.at
    Phone: +43-1-4277-38624 Fax: +43-1-4277-9386

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
    --
    Erich Neuwirth, Computer Supported Didactics Working Group
    Visit our SunSITE at http://sunsite.univie.ac.at
    Phone: +43-1-4277-38624 Fax: +43-1-4277-9386

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
  • Ggrothendieck at Mar 29, 2002 at 6:00 pm
    On my system Netscape is in

    C:\Program Files\Netscape\Netscape 6\netscp6.exe

    so it appears that both the directory and the name
    of the executable itself can change between versions
    of Netscape. Thus relying on a solution that makes use
    of either of these could be problematic if your aim
    is that it be widely applicable.

    I don't know how widely applicable the start method
    is but one improvement you could make over my
    prior suggestion that might increase how widely its
    applicable is to use something like this:

    start c:\abc.htm

    or this

    start http://www.google.com

    where c:\abc.htm is the local HTML file or
    http://www.google.com is the URL you want your browser
    to start up with. That will use your default browser
    and you won't have to specify either the name or
    the path of your browser.

    Maybe someone on the list with access to multiple
    versions and configurations of Windows could comment?

    On 29 Mar 2002 at 15:11, Erich Neuwirth wrote:

    the problem is that i am not sure of the start
    shell("start netscp6")
    mechanism
    works on all win32 platforms.
    the "start" feature might be a property of later versons of win32.
    the system(...) might have better chances of working on
    all win32 platforms.





    ggrothendieck at yifan.net wrote:
    On my Windows 2000 system running R 1.4.1
    the following R command:

    shell("start netscp6")

    launches Netscape. Also this R command:

    shell("start iexpore")

    launches Internet Explorer.
    On 29 Mar 2002 at 1:36, Erich Neuwirth wrote:

    i want to call
    "c:/Program Files/Netscape/Communicator/Program/netscape.exe"
    with system
    but
    system("c:/Program
    Files/Netscape/Communicator/Program/netscape.exe") does not work
    because of the blank.

    system('"c:/Program
    Files/Netscape/Communicator/Program/netscape.exe"',waitúLSE)
    works exactly like i want.

    when i set
    options(browser="c:/Program
    Files/Netscape/Communicator/Program/netscape.exe")

    how can i manipulate the result of
    getOption("browser")

    so that i get a string which will work with the system command?





    --
    Erich Neuwirth, Computer Supported Didactics Working Group
    Visit our SunSITE at http://sunsite.univie.ac.at
    Phone: +43-1-4277-38624 Fax: +43-1-4277-9386

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
    -.-.-.-.-.- r-help mailing list -- Read
    http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help",
    or "[un]subscribe" (in the "body", not the subject !) To:
    r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
    _._._._._._
    --
    Erich Neuwirth, Computer Supported Didactics Working Group
    Visit our SunSITE at http://sunsite.univie.ac.at
    Phone: +43-1-4277-38624 Fax: +43-1-4277-9386


    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
  • Ripley at Mar 29, 2002 at 6:45 pm

    On Fri, 29 Mar 2002 ggrothendieck at yifan.net wrote:

    On my system Netscape is in

    C:\Program Files\Netscape\Netscape 6\netscp6.exe

    so it appears that both the directory and the name
    of the executable itself can change between versions
    of Netscape. Thus relying on a solution that makes use
    of either of these could be problematic if your aim
    is that it be widely applicable.

    I don't know how widely applicable the start method
    is but one improvement you could make over my
    prior suggestion that might increase how widely its
    applicable is to use something like this:

    start c:\abc.htm

    or this

    start http://www.google.com

    where c:\abc.htm is the local HTML file or
    http://www.google.com is the URL you want your browser
    to start up with. That will use your default browser
    and you won't have to specify either the name or
    the path of your browser.
    That is already built in as shell.exec(): please read what we have
    provided for you.

    All versions of Windows have start *if* shell is using the Windows shell:
    but it does not need to.

    --
    Brian D. Ripley, ripley at stats.ox.ac.uk
    Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
    University of Oxford, Tel: +44 1865 272861 (self)
    1 South Parks Road, +44 1865 272860 (secr)
    Oxford OX1 3TG, UK Fax: +44 1865 272595

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
  • Uwe Ligges at Mar 29, 2002 at 5:43 pm

    On Fri, 29 Mar 2002, Erich Neuwirth wrote:

    i want to call
    "c:/Program Files/Netscape/Communicator/Program/netscape.exe"
    with system
    but
    system("c:/Program Files/Netscape/Communicator/Program/netscape.exe")
    does not work because of the blank.

    system('"c:/Program
    Files/Netscape/Communicator/Program/netscape.exe"',waitúLSE)
    works exactly like i want.

    when i set
    options(browser="c:/Program
    Files/Netscape/Communicator/Program/netscape.exe")

    how can i manipulate the result of
    getOption("browser")

    so that i get a string which will work with the system command?
    I think
    options(browser="\"c:/Program Files/Netscape/Communicator/Program/netscape.exe\"")
    should do the trick (not tested!).

    Uwe Ligges

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
  • Duncan Murdoch at Mar 30, 2002 at 1:02 pm

    On Fri, 29 Mar 2002 ripley at stats.ox.ac.uk wrote:
    That is already built in as shell.exec(): please read what we have
    provided for you.
    All versions of Windows have start *if* shell is using the Windows shell:
    but it does not need to.
    I misread this the first time, so maybe others did too. Here's more
    detail:

    1. shell.exec() should work in all Win32 versions. For example,
    shell.exec('http://www.r-project.org')
    will open the web page in the default browser (assuming only that the
    browser is installed properly).

    2. shell('start http://www.r-project.org') could work in any Win32
    version, but the user might have changed the path, or the shell, so it
    won't necessarily.

    Duncan Murdoch
    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
    Send "info", "help", or "[un]subscribe"
    (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
    _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedMar 29, '02 at 12:36a
activeMar 30, '02 at 1:02p
posts7
users5
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase