RGtk2 | An Interface between R and GTK | Theme library

 by   lawremi R Version: Current License: No License

kandi X-RAY | RGtk2 Summary

kandi X-RAY | RGtk2 Summary

RGtk2 is a R library typically used in User Interface, Theme applications. RGtk2 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

An Interface between R and GTK+
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              RGtk2 has a low active ecosystem.
              It has 10 star(s) with 4 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 2 have been closed. On average issues are closed in 5 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of RGtk2 is current.

            kandi-Quality Quality

              RGtk2 has no bugs reported.

            kandi-Security Security

              RGtk2 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              RGtk2 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              RGtk2 releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RGtk2
            Get all kandi verified functions for this library.

            RGtk2 Key Features

            No Key Features are available at this moment for RGtk2.

            RGtk2 Examples and Code Snippets

            No Code Snippets are available at this moment for RGtk2.

            Community Discussions

            QUESTION

            Error message installing Rattle for R on macOS 10.14.1
            Asked 2020-Apr-14 at 18:07

            My R console is 3.5.1. I want to install the rattle package on my Mac Mojave 10.14.1. I realize that you have to install RGtk2 first but still got error messaging even when loaded "from source"

            ...

            ANSWER

            Answered 2018-Dec-09 at 19:39

            This answer is a distillation of content I originally posted on my Johns Hopkins Data Science Specialization Community Mentor Github site in August 2017, in response to student questions about how to install Rattle on OS X in order to produce fancy rpart plots with rattle::fancyRpartPlot().

            The install requires the gtk toolkit, and on the Mac one way to accomplish this is, per R 3.0 and GTK+ / RGTK2 Error:

            1. Install macports — tool for installing mac packages

            2. run SUDO to install gtk2 on mac
              sudo port install gtk2 ## (X11 -- not aqua)

            3. export new path
              export PATH=/opt/local/bin:/opt/local/sbin:$PATH

            4. From command line R, enter install rgtk2 with
              install.packages("RGtk2",type="source") to compile from source

            5. Install the rattle package
              install.packages("rattle",type="source")

            NOTE: For the RGtk2 install to work correctly from RStudio, one must first confirm that the PATH change listed above is applied to the shell that is used to start RStudio.

            The most complete set of instructions is located at Sebastian Kopf's Gist page and verified by my own install on June 17, 2017. Once installed, loading the rattle library will generate the following output in the R console.

            In order to use fancyRpartPlot(), one will also need to install the rpart.plot package.

            Source https://stackoverflow.com/questions/53685606

            QUESTION

            Toggle a gbutton in gWidgets2
            Asked 2019-Sep-02 at 09:30

            I am creating a gbutton in gWidgets2 which will toggle between "go" and "stop" when it will be clicked.

            I am following this example: toggling a group of icons in gWidgets

            My Code:

            ...

            ANSWER

            Answered 2019-Sep-02 at 09:30
            You can use blockHandlers() and unblockHandlers() functions to avoid this issue.
            
            w= gwindow()
            g1 <- ggroup(horizontal=FALSE, cont=w)
            icon <- gbutton("go", container = g1)
            #icon <- gimage(reject,cont=g1)
            state <- FALSE # a global
            addHandlerClicked(icon, function(h,...) {
              #
              if(!state) {
                blockHandlers(icon)
                svalue(icon) <- "stop"
                unblockHandlers(icon)
              } else {
                blockHandlers(icon)
                svalue(icon) <- "go"
                unblockHandlers(icon)
              }
              state <<- !state
            })
            
            I tried this and it works for me.
            

            Source https://stackoverflow.com/questions/57723009

            QUESTION

            Error in installing packages 'RGtk2' and 'rattle' in R
            Asked 2019-Aug-27 at 20:23

            I tried to install R packages 'rattle' but when I typed

            ...

            ANSWER

            Answered 2017-Jun-29 at 13:01

            Below are the known compatible version which will definitely work. 1. Try to downgrade your R version to 3.3.2. 2. Download RGtk2 version with 2.20.33 and manually install it. 3. Install rattle version as 4.1

            Source https://stackoverflow.com/questions/44046055

            QUESTION

            Problem installing RGtk2 in Arch Linux (Manjaro)
            Asked 2019-Aug-21 at 09:39

            I need to install RGtk2 on mu Manjaro i3 laptop. When I install this package, I get the following error:

            ...

            ANSWER

            Answered 2019-Aug-21 at 09:39

            I've stumbled upon the same issue on Fedora. The RGtk2 package is apparently using some Pango structures that shouldn't be using in the first place. Since v1.44, these structures are explicitly private, and thus the compilation error.

            I've notified both the Pango and RGtk2 maintainers. For now, the only workaround is to downgrade Pango to v1.43.

            Source https://stackoverflow.com/questions/57553548

            QUESTION

            Saving selected values in gcheckboxgroup in R?
            Asked 2019-Mar-08 at 21:55

            The following R script is a simple GUI using gWidgets.

            I was wondering why this code does not save the selected values by user in gcheckboxgroup.

            ...

            ANSWER

            Answered 2019-Mar-07 at 17:14

            Thanks for jverzani's comment. However, that was not the solution.

            Actually, by clicking the Run button in GUI, we have the selected_code is the R memory. But it can not be saved as it is inside the function/handler. So, we need to save (write) it in a file (.txt for example) using this code:

            Source https://stackoverflow.com/questions/55012176

            QUESTION

            How to retrieve checkbox state in gWidgets2tcltk (works in gWidgets2RGtk2)
            Asked 2019-Jan-29 at 08:24

            The basic problem seem to be that I can't retrieve the state of a widget from an internal function.

            I am trying to make my package developed using gWidgets2RGtk2 compatible with gWidgets2tcltk. The package includes a graphical user interface implementing the possibility to save the state of the gui. The code works as intended using the RGtk2 but there are problems using tcltk. I have tried various variants of the if constructs used. I find it strange that I can read the state from within .loadState, but not from within .saveState. They are called from different places, so can the problem be related to environments? I have been stuck for a while so maybe I am blind to an obvious solution, or perhaps there is a much better way to accomplish the behaviour I am after. The below code exemplifies the problem.

            I am using R version 3.5.1 on a Windows 10 system, gWidgets2tcltk_1.0-6, and gWidgets2_1.0-7.

            ...

            ANSWER

            Answered 2019-Jan-29 at 08:24

            The cause of the problem was that addHandlerDestroy is not suitable for saving widget state. It may work, as it did for RGtk2, but there is no guarantee that widgets will be reachable at this point. The solution is to use addHandlerUnrealize instead, as pointed out by @jverzani in a comment:

            You should try addHandlerUnrealize here (though I don't know if this works for RGtk2 and can't test). That will call destroy as long as your handler does not return FALSE but will execute before the destroy event so your widgets will still be available to read from. – jverzani Jan 24 at 16:38

            Interestingly, the example code revealed different implementations of signalling the destruction of a window (see the original post for a workaround). Note that @jverzani consider pushing a fix, that will change this.

            Source https://stackoverflow.com/questions/54285836

            QUESTION

            Change RGtk2 hbox height
            Asked 2018-Nov-18 at 23:17

            I'm trying to add "next" and "previous" buttons to my RGtk2 layout.

            I've put the "next" and "prev" buttons into their own Hbox and added them to the end of the GUI.

            Unfortunately the Hbox containing these buttons expands to take up a 1/3 of the overall area of the screen, as can be seen below:

            I'd like the new hbox to take up as little space as possible, to allow maximum room for the second graph. How can I shrink the height of the Hbox?

            I've tried inserting the hbox using packEnd, rather than packStart and it looks exactly the same.

            Here's the code:

            ...

            ANSWER

            Answered 2018-Nov-18 at 23:17

            The bottom box with the two buttons was set by default to expand. To set it to take minimal space use:

            Source https://stackoverflow.com/questions/53322919

            QUESTION

            Make a R script executable by sourcing it in a batch file
            Asked 2018-Jul-02 at 07:52

            I made a GUI using RGtk2 named Main.R that works perfectly when run from RStudio but only works in CMD when I open R in it and then source the script. My goal is to make it fully portable and thus to write a .bat file able to run it.

            Classical commands R CMD BATCH Main.R and Rscript Main.R don't work. In these cases, instead of waiting for me to interact, the window is closed immediately after its creation. After some research I only found out that the OP from run R script from .bat (batch file) (sadly unanswered) encountered a similar issue, but my question differs from his so I still believe my post is justified.

            These commands don't even work for a very simplistic program I made with the same library, which indicates that the issue may be caused by GTk itself.

            ...

            ANSWER

            Answered 2018-Jul-02 at 07:52

            Found the answer : I tried to use R interactively via batch mode, which obviously couldn't work as batch is non-interactive.

            I nevertheless found a workaround thanks to this answer : https://stackoverflow.com/a/11567220/9765404, consisting in downloading R-Portable with all libraries used by my project installed locally and adding this function to the Rprofile.site file (in App/R-Portable/etc) :

            Source https://stackoverflow.com/questions/50990746

            QUESTION

            Ubuntu 16.04: fatal error: X11/Xlib.h: No such file or directory
            Asked 2018-Apr-23 at 05:53

            I am trying to install Rgtk2 (dependency for rattle). I am using R thru Anaconda. I am getting the following error.

            ...

            ANSWER

            Answered 2018-Apr-23 at 05:53

            anaconda has its own environment, which by default usually lacks X11 headers(e.g libx11-dev, or whatever you call it). Try "conda install -c conda-forge xorg-libx11" . It worked for me when a certain R-package threw an error "X11/Xlib.h : No such file or directory".

            Source https://stackoverflow.com/questions/47827207

            QUESTION

            Why does the font size change after I click the save button?
            Asked 2018-Mar-12 at 18:09

            first post and I hope I'm doing everything correctly. I'm using RStudio: Version 1.1.423; R-Version: 3.4.2, OS: Windows 10

            Short problem summary: I start a gwidgets based GUI and the text shows in the desired font size, but when I click the save button, it suddenly changes to a smaller font.

            Context: I'm currently doing a systematic literature review and I use the Metagear package by mjlajeunesse (https://github.com/cran/metagear) to screen the abstracts and decide if I shuold include them. Here's a picture of the original GUI: Original Abstract Screener GUI

            Short description of functionality: I just click on one of the buttons (Yes, No, Maybe) and the abstract screener moves on to the next abstract in the file. I then click save to save my progress.

            Changes I made to the code: However, I added some additional fields so I had to change that behaviour, so that it doesn't immediately jump to the next entry as soon as I click one of the buttons. So I merged that part of the function with the save function. Now I get the following behaviour: When I first open the abstract screener the fontsize is as desired as seen in this picture: Adapted Abstract Screener before clicking Save & Next

            As soon as I click Save & Next it shows me the next abstract (as desired), but suddenly the font changes to a much smaller one, making it rather unpleasant to read, because it's so small, as seen here Adapted Abstract Screener after clicking Save & Next

            Here's the code that I use/adapted to override the original functions of the metagear package. I iteratively adapted the code so I only included the functions of the metagear package that I needed to make things work. Here's the code I'm using(I included the code I use to execute the different functions at the bottom, including some sample data frame, instead of my CSV file):

            ...

            ANSWER

            Answered 2018-Mar-12 at 18:09

            Sorry, my guess is that the font.attribute you specify for text_TITLE isn't being preserved after you call svalue(text_TITLE) <-. The easy solution would be to call font(text_TITLE)<- ... after setting the text. The proper solution would be to fix this method: https://github.com/jverzani/gWidgets2RGtk2/blob/master/R/gtext.R#L84 (this should use the method insert_text https://github.com/jverzani/gWidgets2RGtk2/blob/master/R/gtext.R#L160 which does adjust for the font attribute.

            With that in mind, you might try this 1-2 punch to set text:

            svalue(text_TITLE) <- "" text_TITLE$insert_text(new_text, "beginning")

            Source https://stackoverflow.com/questions/49130167

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install RGtk2

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/lawremi/RGtk2.git

          • CLI

            gh repo clone lawremi/RGtk2

          • sshUrl

            git@github.com:lawremi/RGtk2.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Theme Libraries

            bootstrap

            by twbs

            tailwindcss

            by tailwindlabs

            Semantic-UI

            by Semantic-Org

            bulma

            by jgthms

            materialize

            by Dogfalo

            Try Top Libraries by lawremi

            ggbio

            by lawremiR

            CustomOreGen

            by lawremiJava

            PerFabricaAdAstra

            by lawremiJava

            rtracklayer

            by lawremiC

            rsolr

            by lawremiR