Menu

Display Graphic

Help
userr
2007-09-13
2013-01-15
  • userr

    userr - 2007-09-13

    Hello,

    I use R on windows and when I type theses commmands :

    > x<-c("S","ES","L")
    > y<-c(50,20,30)
    > pie(y)

    it will display a window with the pie.

    But with rkwards, when I type these commands in the script file windows , nothing appears.

    I checked the output windows but it is the same, nothing appears.

    Do I need to activate an option to see graphics automatically ?

    Thank you
    ruser

     
    • Thomas Friedrichsmeier

      Hi,

      > But with rkwards, when I type these commands in the script file windows , nothing appears.

      Do you really mean the script file window, or perhaps rather the R Console? The first is what you get when you select File->New->Script File from the Menu. The latter is what you get by clicking on the R Console button at the bottom of the main window. Commands in the Script File window are not executed at all, until you select to "Run" them (from the menu, toolbar, or shortcuts). The R Console in contrast should behave just like a regular R session.

      If you are in fact referring to the R Console window, this is supposed to work, and does, here. In this case, which version of RKWard / R / KDE are you using? What happens when you enter
      > x11()
      ? What happens when you enter
      > grDevices::x11()
      ?

      Regards
      Thomas

       
    • userr

      userr - 2007-09-16

      Hello Thomas,

      Thank you for your help

      I am aware of what you spoke about the difference betwen the console and the script file.
      I will not give you the version of Rkward / R / KDE because everything works well on my home computer.

      I precise I use a virtual machine (virtual box) to run linux under windows. The image which works well on my home computer but not (only for rkward) on my laptop.

      Theses commands make appear an empty window :

      x11()
      grDevices::x11()

      Thank you

       
      • Thomas Friedrichsmeier

        > I precise I use a virtual machine (virtual box) to run linux under windows.

        I guess this is likely what's causing trouble. We use some rather advanced X server operations to "capture" the plotting windows produced by R. Apparently those do not work correctly inside the virtual box. Perhaps you could drop the vendor of the virtual box a note about this, maybe they have a way to fix this.

        You should be able to work around this issue by running the following in the console (once per session):
        x11 <- X11 <- grDevices::X11

        This should give you the regular R X11 windows for graphics. You will miss out on a number of features we usually add to those windows, though (such as menu options to export the graphic to a file, etc.).

         
    • userr

      userr - 2007-09-17

      Hello,

      it does not work. Do you have another idea ?

      thank you

       
      • Thomas Friedrichsmeier

        Hi,

        sorry, I had not been paying attention. In fact, since both x11() and grDevices::x11() create a window all right, that could not be the source of the problem. So disregard my previous post.

        One issue we had in the past was that R sometimes thought it was in non-interactive mode when running inside rkward. Could you try

        > interactive()            # I suspect this may yield FALSE on your system
        and
        > options()$device

        If R is indeed in non-interactive mode, let me ask again, which version of rkward this is. Recent versions try to make sure R runs interactive. Some older versions would sometimes not run interactively, when invoked directly (e.g. from the menu), instead of from a console/xterm. Could you try starting rkward by typing "rkward" in an xterm? Any change?

        Regards
        Thomas

         
    • userr

      userr - 2007-09-17

      yes it works thank you

      I have to launch it from a konsole

      For information :

      interactive() returns false

      the version of rkward is : 0.4.1

      do you want I give you the results of options()

      Thank you

       
      • Thomas Friedrichsmeier

        Ok, thanks for the info.

        This means the issue has already been fixed in more recent versions of rkward. If you have that option, I recommend upgrading to the current version 0.4.7a, as a whole lot of further bugs, small and large, have been fixed, and a good deal of features has been added since 0.4.1.

        Regards
        Thomas

         
    • userr

      userr - 2007-09-17

      ok

      thank you for all.

      But I use debian (whereas I am not an expert in Linux).
      When I need to install a software I enter :

      apt-get install software

      Then I suppose that the last version of Rkward has not yet been integrated to the linux packages.

      Do you have a .deb with which the install is simple ?

      Ruser

       
      • Thomas Friedrichsmeier

        > Do you have a .deb with which the install is simple ?

        If you're on i386, then yes, there is a backport for debian stable. Just add this line to your /etc/apt/sources.list:
        deb http://rkward.sourceforge.net/debian stable/
        Then "apt-get update" and then your regular install.

        If you're on a different architecture, you still have the option to compile your own .deb (see http://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html\) with the sources from debian unstable, (or from "deb-src http://rkward.sourceforge.net/debian ./"), as we try to keep the source packages backwards compatible as much as possible.

        Regards
        Thomas

         
MongoDB Logo MongoDB