SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
sexy.rgtk: a package for programming RGtk2
GUI in a user-friendly manner
Damien Leroux1
, Nathalie Villa-Vialaneix1,2
Rencontres R 2013, June 28th
1 2
Damien Leroux sexy.rgtk
Typical GUI (demo)
Damien Leroux sexy.rgtk
Typical GUI (demo)
Damien Leroux sexy.rgtk
Typical GUI (demo)
Damien Leroux sexy.rgtk
Conceptual GUI structure
@|
@|
@|
Label text:"A word of advice"
Separator
@|
Label text:"My two cents"
Text input
Horizontal container
Button label:"Send!" click:sendData()
Vertical container
Frame
Window title:"All your input are belong to us"
Damien Leroux sexy.rgtk
RGtk2 Actual code (simple version)
library(RGtk2)
vc <- gtkVBoxNew()
vc$packStart(gtkLabelNew("A word of advice"))
vc$packStart(gtkHSeparatorNew())
hc <- gtkHBoxNew()
hc$packStart(gtkLabelNew("My two cents"))
entry <- gtkEntryNew()
hc$packStart(entry)
vc$packStart(hc)
but <- gtkButtonNew()
gtkButtonSetLabel(but, "Send!")
vc$packStart(but)
w <- gtkWindowNew()
gtkWindowSetTitle(w,
"All your input are belong to us")
w$add(vc)
sendData <- function(...) {
print(gtkEntryGetText(entry))
}
gSignalConnect(but, "clicked", sendData)
Damien Leroux sexy.rgtk
RGtk2 Actual code (simple version)
library(RGtk2)
vc <- gtkVBoxNew()
vc$packStart( gtkLabelNew("A word of advice") )
vc$packStart( gtkHSeparatorNew() )
hc <- gtkHBoxNew()
hc$packStart( gtkLabelNew("My two cents") )
entry <- gtkEntryNew()
hc$packStart(entry)
vc$packStart(hc)
but <- gtkButtonNew()
gtkButtonSetLabel(but, "Send!")
vc$packStart(but)
w <- gtkWindowNew()
gtkWindowSetTitle(w,
"All your input are belong to us")
w$add(vc)
sendData <- function(...) {
print(gtkEntryGetText(entry))
}
gSignalConnect(but, "clicked", sendData)
Widget construction
Damien Leroux sexy.rgtk
RGtk2 Actual code (simple version)
library(RGtk2)
vc <- gtkVBoxNew()
vc$packStart(gtkLabelNew("A word of advice"))
vc$packStart(gtkHSeparatorNew())
hc <- gtkHBoxNew()
hc$packStart(gtkLabelNew("My two cents"))
entry <- gtkEntryNew()
hc$packStart(entry)
vc$packStart(hc)
but <- gtkButtonNew()
gtkButtonSetLabel(but, "Send!")
vc$packStart(but)
w <- gtkWindowNew()
gtkWindowSetTitle(w, "All your input are belong to us")
w$add(vc)
sendData <- function(...) {
print(gtkEntryGetText(entry))
}
gSignalConnect(but, "clicked", sendData)
Widget configuration
Damien Leroux sexy.rgtk
RGtk2 Actual code (simple version)
library(RGtk2)
vc <- gtkVBoxNew()
vc$packStart(gtkLabelNew("A word of advice"))
vc$packStart(gtkHSeparatorNew())
hc <- gtkHBoxNew()
hc$packStart(gtkLabelNew("My two cents"))
entry <- gtkEntryNew()
hc$packStart(entry)
vc$packStart(hc)
but <- gtkButtonNew()
gtkButtonSetLabel(but, "Send!")
vc$packStart(but)
w <- gtkWindowNew()
gtkWindowSetTitle(w,
"All your input are belong to us")
w$add(vc)
sendData <- function(...) {
print(gtkEntryGetText(entry))
}
gSignalConnect(but, "clicked", sendData)
Widget tree creation
Damien Leroux sexy.rgtk
RGtk2 Actual code (simple version)
library(RGtk2)
vc <- gtkVBoxNew()
vc$packStart(gtkLabelNew("A word of advice"))
vc$packStart(gtkHSeparatorNew())
hc <- gtkHBoxNew()
hc$packStart(gtkLabelNew("My two cents"))
entry <- gtkEntryNew()
hc$packStart(entry)
vc$packStart(hc)
but <- gtkButtonNew()
gtkButtonSetLabel(but, "Send!")
vc$packStart(but)
w <- gtkWindowNew()
gtkWindowSetTitle(w,
"All your input are belong to us")
w$add(vc)
sendData <- function(...) {
print(gtkEntryGetText(entry))
}
gSignalConnect(but, "clicked", sendData)
Assign behaviour to events
Damien Leroux sexy.rgtk
sexy.rgtk manifesto
sexy.rgtk aims at
Make the widget tree creation more natural
Make the code more readable
Make the basic and common operations easier and more
concise
While retaining the full power of RGtk2
sexy.rgtk is a layer on top of RGtk2
plain RGtk2 code can be mixed with sexy.rgtk code
Damien Leroux sexy.rgtk
sexy.rgtk equivalent code
library(sexy.rgtk)
sendData <- function(...) {
print(ws$entry$text)
}
ws <- Window(
title="All your input are belong to us",
contents=
VBox(contents=list(
Label("A word of advice"),
HSeparator(),
HBox(contents=list(
Label("My two cents"),
Entry(use.name="entry"))),
Button(label="Send!",
on("clicked", sendData)))))
Damien Leroux sexy.rgtk
sexy.rgtk equivalent code (comparison)
library(sexy.rgtk)
sendData <- function(...) {
print(ws$entry$text)
}
ws <- Window(
title="All your input are belong to us",
contents=
VBox(contents=list(
Label("A word of advice"),
HSeparator(),
HBox(contents=list(
Label("My two cents"),
Entry(use.name="entry"))),
Button(label="Send!",
on("clicked", sendData)))))
library(RGtk2)
sendData <- function(...) {
print(gtkEntryGetText(entry))
}
vc <- gtkVBoxNew()
vc$packStart(gtkLabelNew("A word of advice"))
vc$packStart(gtkHSeparatorNew())
hc <- gtkHBoxNew()
hc$packStart(gtkLabelNew("My two cents"))
entry <- gtkEntryNew()
hc$packStart(entry)
vc$packStart(hc)
but <- gtkButtonNew()
gtkButtonSetLabel(but, "Send!")
vc$packStart(but)
w <- gtkWindowNew()
gtkWindowSetTitle(w,
"All your input are belong to us")
w$add(vc)
gSignalConnect(but, "clicked", sendData)
Damien Leroux sexy.rgtk
How does it work ?
Using RGtk2 (almost consistent) semantics
Constructors
gtkLabelNew
section class action (simple constructor)
gtkLabelNewWithMnemonic
section class action (fancy constructor)
Modificators
gtkLabelSetText
section class ! property
Accessors
gtkLabelGetText
section class ! property
Damien Leroux sexy.rgtk
How does it work ?
sexy.rgtk covers all classes, getters, and setters in the gtk section
library(RGtk2)
l <- gtkLabelNew()
gtkLabelSetText(l, "pouet")
print(gtkLabelGetText(l))
library(sexy.rgtk)
l <- Label()
l$text <- "pouet"
print(l$text)
sexy.rgtk combines the construction and configuration steps
library(RGtk2)
l <- gtkLabelNew()
gtkLabelSetText(l, "pouet")
gtkLabelSetAngle(l, 23)
library(sexy.rgtk)
l <- Label(text="pouet", angle=23)
Damien Leroux sexy.rgtk
How does it work ?
sexy.rgtk makes the widget hierarchy more explicit
library(RGtk2)
l <- gtkLabelNew()
w <- gtkWindowNew()
gtkLabelSetText(l, "Foobar")
gtkWindowSetTitle(w, "Wibble")
w$add(l)
library(sexy.rgtk)
w <- Window(
title="Wibble",
contents=Label(text="Foobar"))
Signal connections are also more better (sic) with sexy.rgtk
library(RGtk2)
callback <- function(widget, data) {
cat("Pouet.n")
}
b <- gtkButtonNew()
gtkButtonSetLabel(b, "Fire")
gSignalConnect(b, "clicked", callback)
# or
connectSignal(b, "clicked", callback)
# Oh wait, this breaks the naming rules
library(sexy.rgtk)
callback <- function(widget , data) {
cat("Pouet.n")
}
b <- Button(label="Fire",
on("clicked",
run=cat("Pouet.n")))
# or
b <- Button(label="Fire",
on("clicked", callback))
Damien Leroux sexy.rgtk
Feature summary
All the gtk* functions are wrapped in an easier interface.
library(RGtk2) library(sexy.rgtk)
Unified constructors
bu <- gtkButtonNew()
bu <- gtkButtonNewFromStock(...)
bu <- Button()
bu <- Button(from.stock=list(...))
Natural getters and setters
gtkButtonSetFocusOnClick(bu, T)
gtkButtonGetLabel(bu, "...")
bu$focus.on.click <- T
bu$label
Coherent use of names() to include getters and setters
Damien Leroux sexy.rgtk
Feature summary
All the gtk* functions are wrapped in an easier interface.
library(RGtk2) library(sexy.rgtk)
Everything can be actually done via the constructors
w <- gtkWindowNew()
l <- gtkLabelNew()
gtkLabelSetText(l, "1234567890")
gtkLabelSelectRegion(l, 2, 5)
w$add(l)
w <- Window(contents=
Label(use.name="lab",
text="1234567890",
apply=list(
SelectRegion=
list(2, 5)
))
Widget access through the hierarchy with use.name=
gtkLabelSetText(l, "toto pouet") w$lab$text <- "toto pouet"
Damien Leroux sexy.rgtk
There’s more!
sexy.rgtk also tries to address some common patterns
Associate a label to an input widget
library(RGtk2)
l <- gtkLabelNew()
gtkLabelSetText(l, "Input")
i <- gtkEntryNew()
hbox <- gtkHBoxNew()
hbox$packStart(l)
hbox$packStart(i)
# to use a mnemonic:
l <- gtkLabelNewWithMnemonic()
gtkLabelSetText(l, "_Input")
gtkLabelSetMnemonicWidget(l, i)
library(sexy.rgtk)
# also supports vertical alignment
# and label on either side of the
# widget
x <- LabeledWidget("Input",
Entry())
# to use a mnemonic:
x <- LabeledWidget("_Input",
Entry(),
mnemonic=T)
Rows or columns of widgets (VBoxes inside HBox or vice versa)
library(RGtk2)
vb <- gtkVBoxNew()
hb <- gtkHBoxNew()
hb$packStart(gtkLabelNew())
hb$packStart(gtkLabelNew())
vb$packStart(hb)
hb <- gtkHBoxNew()
hb$packStart(gtkEntryNew())
vb$packStart(hb)
library(sexy.rgtk)
# of course it can also become
# very verbose when you actually
# configure the widgets
vb <- Rows(Label(), Label(), br,
Entry())
Damien Leroux sexy.rgtk
There’s more!
Last but not least: displaying a data.frame
library(RGtk2)
# I’m sorry this is way too gory.
# In short:
# - create an rGtkDataFrame(
# my.data.frame)
# (this is the datastore)
# - create renderer function(s)
# function(col, colrenderer ,
# model, iter, data)
# - create a GtkTreeView
# - associate the datastore with the
# tree view
# - declare each column to display
# and assign a renderer to each
# of them
library(sexy.rgtk)
# Supports specific renderers only if
# required , with a default to
# plaintext as seen in the demo.
# By default , all columns are to be
# displayed.
# The interface to the renderers is
# simplified.
# Also supports row names.
df.widget <- DataFrame(my.data.frame)
# et voila!
Damien Leroux sexy.rgtk
References
Build a simple GUI with RGtk2
http://tuxette.nathalievilla.org/?p=866&lang=en
RGtk2: R bindings for Gtk 2.8.0 and above
http://cran.r-project.org/web/packages/RGtk2/
index.html
Mulcyber: sexy.rgtk: Project home https:
//mulcyber.toulouse.inra.fr/projects/sexy-rgtk/
Damien Leroux sexy.rgtk

Contenu connexe

Tendances

Reactive Access to MongoDB from Java 8
Reactive Access to MongoDB from Java 8Reactive Access to MongoDB from Java 8
Reactive Access to MongoDB from Java 8Hermann Hueck
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Jonas Bonér
 
G3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy AnnotationsG3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy AnnotationsIván López Martín
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepSylvain Hallé
 
Anatomy of a Gradle plugin
Anatomy of a Gradle pluginAnatomy of a Gradle plugin
Anatomy of a Gradle pluginDmytro Zaitsev
 
Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.Kuldeep Jain
 
DRYing to Monad in Java8
DRYing to Monad in Java8DRYing to Monad in Java8
DRYing to Monad in Java8Dhaval Dalal
 
AJUG April 2011 Cascading example
AJUG April 2011 Cascading exampleAJUG April 2011 Cascading example
AJUG April 2011 Cascading exampleChristopher Curtin
 
可抽換元件設計模式
可抽換元件設計模式可抽換元件設計模式
可抽換元件設計模式Pete Chen
 
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascriptBoris Burdiliak
 
T3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTR
T3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTRT3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTR
T3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTRDavid Gómez García
 
The (unknown) collections module
The (unknown) collections moduleThe (unknown) collections module
The (unknown) collections modulePablo Enfedaque
 
Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)Dhaval Dalal
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife SpringMario Fusco
 
Chat Room System using Java Swing
Chat Room System using Java SwingChat Room System using Java Swing
Chat Room System using Java SwingTejas Garodia
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access RunbookTaha Shakeel
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingSchalk Cronjé
 

Tendances (20)

Reactive Access to MongoDB from Java 8
Reactive Access to MongoDB from Java 8Reactive Access to MongoDB from Java 8
Reactive Access to MongoDB from Java 8
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 
G3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy AnnotationsG3 Summit 2016 - Taking Advantage of Groovy Annotations
G3 Summit 2016 - Taking Advantage of Groovy Annotations
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeep
 
Anatomy of a Gradle plugin
Anatomy of a Gradle pluginAnatomy of a Gradle plugin
Anatomy of a Gradle plugin
 
Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.Chat application in java using swing and socket programming.
Chat application in java using swing and socket programming.
 
DRYing to Monad in Java8
DRYing to Monad in Java8DRYing to Monad in Java8
DRYing to Monad in Java8
 
Final_Project
Final_ProjectFinal_Project
Final_Project
 
AJUG April 2011 Cascading example
AJUG April 2011 Cascading exampleAJUG April 2011 Cascading example
AJUG April 2011 Cascading example
 
可抽換元件設計模式
可抽換元件設計模式可抽換元件設計模式
可抽換元件設計模式
 
Functional programming in javascript
Functional programming in javascriptFunctional programming in javascript
Functional programming in javascript
 
groovy & grails - lecture 12
groovy & grails - lecture 12groovy & grails - lecture 12
groovy & grails - lecture 12
 
T3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTR
T3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTRT3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTR
T3chFest2016 - Uso del API JavaScript de Photoshop para obtener fotos HDTR
 
groovy & grails - lecture 2
groovy & grails - lecture 2groovy & grails - lecture 2
groovy & grails - lecture 2
 
The (unknown) collections module
The (unknown) collections moduleThe (unknown) collections module
The (unknown) collections module
 
Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife Spring
 
Chat Room System using Java Swing
Chat Room System using Java SwingChat Room System using Java Swing
Chat Room System using Java Swing
 
VPN Access Runbook
VPN Access RunbookVPN Access Runbook
VPN Access Runbook
 
Idiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin WritingIdiomatic Gradle Plugin Writing
Idiomatic Gradle Plugin Writing
 

Similaire à Presentation of sexy.rgtk

Latex with git
Latex with gitLatex with git
Latex with gitsppmg
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & EngineeringEelco Visser
 
Modern wx perl
Modern wx perlModern wx perl
Modern wx perllichtkind
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Yuren Ju
 
A Tour of Building Web Applications with R Shiny
A Tour of Building Web Applications with R Shiny A Tour of Building Web Applications with R Shiny
A Tour of Building Web Applications with R Shiny Wendy Chen Dubois
 
The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181Mahmoud Samir Fayed
 
Python-GTK
Python-GTKPython-GTK
Python-GTKYuren Ju
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 SpringKiyotaka Oku
 
Functional patterns and techniques in C#
Functional patterns and techniques in C#Functional patterns and techniques in C#
Functional patterns and techniques in C#Péter Takács
 
The Ring programming language version 1.7 book - Part 44 of 196
The Ring programming language version 1.7 book - Part 44 of 196The Ring programming language version 1.7 book - Part 44 of 196
The Ring programming language version 1.7 book - Part 44 of 196Mahmoud Samir Fayed
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Guillaume Laforge
 
Why react is different
Why react is differentWhy react is different
Why react is differentJakeGinnivan
 
«Продакшн в Kotlin DSL» Сергей Рыбалкин
«Продакшн в Kotlin DSL» Сергей Рыбалкин«Продакшн в Kotlin DSL» Сергей Рыбалкин
«Продакшн в Kotlin DSL» Сергей РыбалкинMail.ru Group
 

Similaire à Presentation of sexy.rgtk (20)

Latex with git
Latex with gitLatex with git
Latex with git
 
gtk2-perl
gtk2-perlgtk2-perl
gtk2-perl
 
Software Language Design & Engineering
Software Language Design & EngineeringSoftware Language Design & Engineering
Software Language Design & Engineering
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
 
Devtools cheatsheet
Devtools cheatsheetDevtools cheatsheet
Devtools cheatsheet
 
Modern wx perl
Modern wx perlModern wx perl
Modern wx perl
 
Python GTK (Hacking Camp)
Python GTK (Hacking Camp)Python GTK (Hacking Camp)
Python GTK (Hacking Camp)
 
กลุ่ม6
กลุ่ม6กลุ่ม6
กลุ่ม6
 
A Tour of Building Web Applications with R Shiny
A Tour of Building Web Applications with R Shiny A Tour of Building Web Applications with R Shiny
A Tour of Building Web Applications with R Shiny
 
The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181The Ring programming language version 1.5.2 book - Part 11 of 181
The Ring programming language version 1.5.2 book - Part 11 of 181
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 Spring
 
Functional patterns and techniques in C#
Functional patterns and techniques in C#Functional patterns and techniques in C#
Functional patterns and techniques in C#
 
The Ring programming language version 1.7 book - Part 44 of 196
The Ring programming language version 1.7 book - Part 44 of 196The Ring programming language version 1.7 book - Part 44 of 196
The Ring programming language version 1.7 book - Part 44 of 196
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Why react is different
Why react is differentWhy react is different
Why react is different
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
«Продакшн в Kotlin DSL» Сергей Рыбалкин
«Продакшн в Kotlin DSL» Сергей Рыбалкин«Продакшн в Kotlin DSL» Сергей Рыбалкин
«Продакшн в Kotlin DSL» Сергей Рыбалкин
 

Plus de tuxette

Racines en haut et feuilles en bas : les arbres en maths
Racines en haut et feuilles en bas : les arbres en mathsRacines en haut et feuilles en bas : les arbres en maths
Racines en haut et feuilles en bas : les arbres en mathstuxette
 
Méthodes à noyaux pour l’intégration de données hétérogènes
Méthodes à noyaux pour l’intégration de données hétérogènesMéthodes à noyaux pour l’intégration de données hétérogènes
Méthodes à noyaux pour l’intégration de données hétérogènestuxette
 
Méthodologies d'intégration de données omiques
Méthodologies d'intégration de données omiquesMéthodologies d'intégration de données omiques
Méthodologies d'intégration de données omiquestuxette
 
Projets autour de l'Hi-C
Projets autour de l'Hi-CProjets autour de l'Hi-C
Projets autour de l'Hi-Ctuxette
 
Can deep learning learn chromatin structure from sequence?
Can deep learning learn chromatin structure from sequence?Can deep learning learn chromatin structure from sequence?
Can deep learning learn chromatin structure from sequence?tuxette
 
Multi-omics data integration methods: kernel and other machine learning appro...
Multi-omics data integration methods: kernel and other machine learning appro...Multi-omics data integration methods: kernel and other machine learning appro...
Multi-omics data integration methods: kernel and other machine learning appro...tuxette
 
ASTERICS : une application pour intégrer des données omiques
ASTERICS : une application pour intégrer des données omiquesASTERICS : une application pour intégrer des données omiques
ASTERICS : une application pour intégrer des données omiquestuxette
 
Autour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWeanAutour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWeantuxette
 
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...tuxette
 
Apprentissage pour la biologie moléculaire et l’analyse de données omiques
Apprentissage pour la biologie moléculaire et l’analyse de données omiquesApprentissage pour la biologie moléculaire et l’analyse de données omiques
Apprentissage pour la biologie moléculaire et l’analyse de données omiquestuxette
 
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...tuxette
 
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...tuxette
 
Journal club: Validation of cluster analysis results on validation data
Journal club: Validation of cluster analysis results on validation dataJournal club: Validation of cluster analysis results on validation data
Journal club: Validation of cluster analysis results on validation datatuxette
 
Overfitting or overparametrization?
Overfitting or overparametrization?Overfitting or overparametrization?
Overfitting or overparametrization?tuxette
 
Selective inference and single-cell differential analysis
Selective inference and single-cell differential analysisSelective inference and single-cell differential analysis
Selective inference and single-cell differential analysistuxette
 
SOMbrero : un package R pour les cartes auto-organisatrices
SOMbrero : un package R pour les cartes auto-organisatricesSOMbrero : un package R pour les cartes auto-organisatrices
SOMbrero : un package R pour les cartes auto-organisatricestuxette
 
Graph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype PredictionGraph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype Predictiontuxette
 
A short and naive introduction to using network in prediction models
A short and naive introduction to using network in prediction modelsA short and naive introduction to using network in prediction models
A short and naive introduction to using network in prediction modelstuxette
 
Explanable models for time series with random forest
Explanable models for time series with random forestExplanable models for time series with random forest
Explanable models for time series with random foresttuxette
 
Présentation du projet ASTERICS
Présentation du projet ASTERICSPrésentation du projet ASTERICS
Présentation du projet ASTERICStuxette
 

Plus de tuxette (20)

Racines en haut et feuilles en bas : les arbres en maths
Racines en haut et feuilles en bas : les arbres en mathsRacines en haut et feuilles en bas : les arbres en maths
Racines en haut et feuilles en bas : les arbres en maths
 
Méthodes à noyaux pour l’intégration de données hétérogènes
Méthodes à noyaux pour l’intégration de données hétérogènesMéthodes à noyaux pour l’intégration de données hétérogènes
Méthodes à noyaux pour l’intégration de données hétérogènes
 
Méthodologies d'intégration de données omiques
Méthodologies d'intégration de données omiquesMéthodologies d'intégration de données omiques
Méthodologies d'intégration de données omiques
 
Projets autour de l'Hi-C
Projets autour de l'Hi-CProjets autour de l'Hi-C
Projets autour de l'Hi-C
 
Can deep learning learn chromatin structure from sequence?
Can deep learning learn chromatin structure from sequence?Can deep learning learn chromatin structure from sequence?
Can deep learning learn chromatin structure from sequence?
 
Multi-omics data integration methods: kernel and other machine learning appro...
Multi-omics data integration methods: kernel and other machine learning appro...Multi-omics data integration methods: kernel and other machine learning appro...
Multi-omics data integration methods: kernel and other machine learning appro...
 
ASTERICS : une application pour intégrer des données omiques
ASTERICS : une application pour intégrer des données omiquesASTERICS : une application pour intégrer des données omiques
ASTERICS : une application pour intégrer des données omiques
 
Autour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWeanAutour des projets Idefics et MetaboWean
Autour des projets Idefics et MetaboWean
 
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
Rserve, renv, flask, Vue.js dans un docker pour intégrer des données omiques ...
 
Apprentissage pour la biologie moléculaire et l’analyse de données omiques
Apprentissage pour la biologie moléculaire et l’analyse de données omiquesApprentissage pour la biologie moléculaire et l’analyse de données omiques
Apprentissage pour la biologie moléculaire et l’analyse de données omiques
 
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
Quelques résultats préliminaires de l'évaluation de méthodes d'inférence de r...
 
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
Intégration de données omiques multi-échelles : méthodes à noyau et autres ap...
 
Journal club: Validation of cluster analysis results on validation data
Journal club: Validation of cluster analysis results on validation dataJournal club: Validation of cluster analysis results on validation data
Journal club: Validation of cluster analysis results on validation data
 
Overfitting or overparametrization?
Overfitting or overparametrization?Overfitting or overparametrization?
Overfitting or overparametrization?
 
Selective inference and single-cell differential analysis
Selective inference and single-cell differential analysisSelective inference and single-cell differential analysis
Selective inference and single-cell differential analysis
 
SOMbrero : un package R pour les cartes auto-organisatrices
SOMbrero : un package R pour les cartes auto-organisatricesSOMbrero : un package R pour les cartes auto-organisatrices
SOMbrero : un package R pour les cartes auto-organisatrices
 
Graph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype PredictionGraph Neural Network for Phenotype Prediction
Graph Neural Network for Phenotype Prediction
 
A short and naive introduction to using network in prediction models
A short and naive introduction to using network in prediction modelsA short and naive introduction to using network in prediction models
A short and naive introduction to using network in prediction models
 
Explanable models for time series with random forest
Explanable models for time series with random forestExplanable models for time series with random forest
Explanable models for time series with random forest
 
Présentation du projet ASTERICS
Présentation du projet ASTERICSPrésentation du projet ASTERICS
Présentation du projet ASTERICS
 

Dernier

Virat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdfVirat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdfkigaya33
 
'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trends'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trendsTangledThoughtsCO
 
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756dollysharma2066
 
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》rnrncn29
 
Uttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdfUttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdfNoel Sergeant
 
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...dollysharma2066
 
labradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdflabradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdfAkrati jewels inc
 
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncrdollysharma2066
 
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426jennyeacort
 
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar HealthywayAmit Kakkar Healthyway
 

Dernier (11)

Virat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdfVirat Kohli Centuries In Career Age Awards and Facts.pdf
Virat Kohli Centuries In Career Age Awards and Facts.pdf
 
'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trends'the Spring 2024- popular Fashion trends
'the Spring 2024- popular Fashion trends
 
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
BOOK NIGHT-Call Girls In Noida City Centre Delhi ☎️ 8377877756
 
Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...
Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...
Call Girls 9953525677 Call Girls In Delhi Call Girls 9953525677 Call Girls In...
 
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
《QUT毕业文凭网-认证昆士兰科技大学毕业证成绩单》
 
Uttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdfUttoxeter & Cheadle Voice, Issue 122.pdf
Uttoxeter & Cheadle Voice, Issue 122.pdf
 
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
83778-876O7, Cash On Delivery Call Girls In South- EX-(Delhi) Escorts Service...
 
labradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdflabradorite energetic gems for well beings.pdf
labradorite energetic gems for well beings.pdf
 
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
8377877756 Full Enjoy @24/7 Call Girls In Mayur Vihar Delhi Ncr
 
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝  97111⇛⇛47426
Call In girls Delhi Safdarjung Enclave/WhatsApp 🔝 97111⇛⇛47426
 
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
8 Easy Ways to Keep Your Heart Healthy this Summer | Amit Kakkar Healthyway
 

Presentation of sexy.rgtk

  • 1. sexy.rgtk: a package for programming RGtk2 GUI in a user-friendly manner Damien Leroux1 , Nathalie Villa-Vialaneix1,2 Rencontres R 2013, June 28th 1 2 Damien Leroux sexy.rgtk
  • 2. Typical GUI (demo) Damien Leroux sexy.rgtk
  • 3. Typical GUI (demo) Damien Leroux sexy.rgtk
  • 4. Typical GUI (demo) Damien Leroux sexy.rgtk
  • 5. Conceptual GUI structure @| @| @| Label text:"A word of advice" Separator @| Label text:"My two cents" Text input Horizontal container Button label:"Send!" click:sendData() Vertical container Frame Window title:"All your input are belong to us" Damien Leroux sexy.rgtk
  • 6. RGtk2 Actual code (simple version) library(RGtk2) vc <- gtkVBoxNew() vc$packStart(gtkLabelNew("A word of advice")) vc$packStart(gtkHSeparatorNew()) hc <- gtkHBoxNew() hc$packStart(gtkLabelNew("My two cents")) entry <- gtkEntryNew() hc$packStart(entry) vc$packStart(hc) but <- gtkButtonNew() gtkButtonSetLabel(but, "Send!") vc$packStart(but) w <- gtkWindowNew() gtkWindowSetTitle(w, "All your input are belong to us") w$add(vc) sendData <- function(...) { print(gtkEntryGetText(entry)) } gSignalConnect(but, "clicked", sendData) Damien Leroux sexy.rgtk
  • 7. RGtk2 Actual code (simple version) library(RGtk2) vc <- gtkVBoxNew() vc$packStart( gtkLabelNew("A word of advice") ) vc$packStart( gtkHSeparatorNew() ) hc <- gtkHBoxNew() hc$packStart( gtkLabelNew("My two cents") ) entry <- gtkEntryNew() hc$packStart(entry) vc$packStart(hc) but <- gtkButtonNew() gtkButtonSetLabel(but, "Send!") vc$packStart(but) w <- gtkWindowNew() gtkWindowSetTitle(w, "All your input are belong to us") w$add(vc) sendData <- function(...) { print(gtkEntryGetText(entry)) } gSignalConnect(but, "clicked", sendData) Widget construction Damien Leroux sexy.rgtk
  • 8. RGtk2 Actual code (simple version) library(RGtk2) vc <- gtkVBoxNew() vc$packStart(gtkLabelNew("A word of advice")) vc$packStart(gtkHSeparatorNew()) hc <- gtkHBoxNew() hc$packStart(gtkLabelNew("My two cents")) entry <- gtkEntryNew() hc$packStart(entry) vc$packStart(hc) but <- gtkButtonNew() gtkButtonSetLabel(but, "Send!") vc$packStart(but) w <- gtkWindowNew() gtkWindowSetTitle(w, "All your input are belong to us") w$add(vc) sendData <- function(...) { print(gtkEntryGetText(entry)) } gSignalConnect(but, "clicked", sendData) Widget configuration Damien Leroux sexy.rgtk
  • 9. RGtk2 Actual code (simple version) library(RGtk2) vc <- gtkVBoxNew() vc$packStart(gtkLabelNew("A word of advice")) vc$packStart(gtkHSeparatorNew()) hc <- gtkHBoxNew() hc$packStart(gtkLabelNew("My two cents")) entry <- gtkEntryNew() hc$packStart(entry) vc$packStart(hc) but <- gtkButtonNew() gtkButtonSetLabel(but, "Send!") vc$packStart(but) w <- gtkWindowNew() gtkWindowSetTitle(w, "All your input are belong to us") w$add(vc) sendData <- function(...) { print(gtkEntryGetText(entry)) } gSignalConnect(but, "clicked", sendData) Widget tree creation Damien Leroux sexy.rgtk
  • 10. RGtk2 Actual code (simple version) library(RGtk2) vc <- gtkVBoxNew() vc$packStart(gtkLabelNew("A word of advice")) vc$packStart(gtkHSeparatorNew()) hc <- gtkHBoxNew() hc$packStart(gtkLabelNew("My two cents")) entry <- gtkEntryNew() hc$packStart(entry) vc$packStart(hc) but <- gtkButtonNew() gtkButtonSetLabel(but, "Send!") vc$packStart(but) w <- gtkWindowNew() gtkWindowSetTitle(w, "All your input are belong to us") w$add(vc) sendData <- function(...) { print(gtkEntryGetText(entry)) } gSignalConnect(but, "clicked", sendData) Assign behaviour to events Damien Leroux sexy.rgtk
  • 11. sexy.rgtk manifesto sexy.rgtk aims at Make the widget tree creation more natural Make the code more readable Make the basic and common operations easier and more concise While retaining the full power of RGtk2 sexy.rgtk is a layer on top of RGtk2 plain RGtk2 code can be mixed with sexy.rgtk code Damien Leroux sexy.rgtk
  • 12. sexy.rgtk equivalent code library(sexy.rgtk) sendData <- function(...) { print(ws$entry$text) } ws <- Window( title="All your input are belong to us", contents= VBox(contents=list( Label("A word of advice"), HSeparator(), HBox(contents=list( Label("My two cents"), Entry(use.name="entry"))), Button(label="Send!", on("clicked", sendData))))) Damien Leroux sexy.rgtk
  • 13. sexy.rgtk equivalent code (comparison) library(sexy.rgtk) sendData <- function(...) { print(ws$entry$text) } ws <- Window( title="All your input are belong to us", contents= VBox(contents=list( Label("A word of advice"), HSeparator(), HBox(contents=list( Label("My two cents"), Entry(use.name="entry"))), Button(label="Send!", on("clicked", sendData))))) library(RGtk2) sendData <- function(...) { print(gtkEntryGetText(entry)) } vc <- gtkVBoxNew() vc$packStart(gtkLabelNew("A word of advice")) vc$packStart(gtkHSeparatorNew()) hc <- gtkHBoxNew() hc$packStart(gtkLabelNew("My two cents")) entry <- gtkEntryNew() hc$packStart(entry) vc$packStart(hc) but <- gtkButtonNew() gtkButtonSetLabel(but, "Send!") vc$packStart(but) w <- gtkWindowNew() gtkWindowSetTitle(w, "All your input are belong to us") w$add(vc) gSignalConnect(but, "clicked", sendData) Damien Leroux sexy.rgtk
  • 14. How does it work ? Using RGtk2 (almost consistent) semantics Constructors gtkLabelNew section class action (simple constructor) gtkLabelNewWithMnemonic section class action (fancy constructor) Modificators gtkLabelSetText section class ! property Accessors gtkLabelGetText section class ! property Damien Leroux sexy.rgtk
  • 15. How does it work ? sexy.rgtk covers all classes, getters, and setters in the gtk section library(RGtk2) l <- gtkLabelNew() gtkLabelSetText(l, "pouet") print(gtkLabelGetText(l)) library(sexy.rgtk) l <- Label() l$text <- "pouet" print(l$text) sexy.rgtk combines the construction and configuration steps library(RGtk2) l <- gtkLabelNew() gtkLabelSetText(l, "pouet") gtkLabelSetAngle(l, 23) library(sexy.rgtk) l <- Label(text="pouet", angle=23) Damien Leroux sexy.rgtk
  • 16. How does it work ? sexy.rgtk makes the widget hierarchy more explicit library(RGtk2) l <- gtkLabelNew() w <- gtkWindowNew() gtkLabelSetText(l, "Foobar") gtkWindowSetTitle(w, "Wibble") w$add(l) library(sexy.rgtk) w <- Window( title="Wibble", contents=Label(text="Foobar")) Signal connections are also more better (sic) with sexy.rgtk library(RGtk2) callback <- function(widget, data) { cat("Pouet.n") } b <- gtkButtonNew() gtkButtonSetLabel(b, "Fire") gSignalConnect(b, "clicked", callback) # or connectSignal(b, "clicked", callback) # Oh wait, this breaks the naming rules library(sexy.rgtk) callback <- function(widget , data) { cat("Pouet.n") } b <- Button(label="Fire", on("clicked", run=cat("Pouet.n"))) # or b <- Button(label="Fire", on("clicked", callback)) Damien Leroux sexy.rgtk
  • 17. Feature summary All the gtk* functions are wrapped in an easier interface. library(RGtk2) library(sexy.rgtk) Unified constructors bu <- gtkButtonNew() bu <- gtkButtonNewFromStock(...) bu <- Button() bu <- Button(from.stock=list(...)) Natural getters and setters gtkButtonSetFocusOnClick(bu, T) gtkButtonGetLabel(bu, "...") bu$focus.on.click <- T bu$label Coherent use of names() to include getters and setters Damien Leroux sexy.rgtk
  • 18. Feature summary All the gtk* functions are wrapped in an easier interface. library(RGtk2) library(sexy.rgtk) Everything can be actually done via the constructors w <- gtkWindowNew() l <- gtkLabelNew() gtkLabelSetText(l, "1234567890") gtkLabelSelectRegion(l, 2, 5) w$add(l) w <- Window(contents= Label(use.name="lab", text="1234567890", apply=list( SelectRegion= list(2, 5) )) Widget access through the hierarchy with use.name= gtkLabelSetText(l, "toto pouet") w$lab$text <- "toto pouet" Damien Leroux sexy.rgtk
  • 19. There’s more! sexy.rgtk also tries to address some common patterns Associate a label to an input widget library(RGtk2) l <- gtkLabelNew() gtkLabelSetText(l, "Input") i <- gtkEntryNew() hbox <- gtkHBoxNew() hbox$packStart(l) hbox$packStart(i) # to use a mnemonic: l <- gtkLabelNewWithMnemonic() gtkLabelSetText(l, "_Input") gtkLabelSetMnemonicWidget(l, i) library(sexy.rgtk) # also supports vertical alignment # and label on either side of the # widget x <- LabeledWidget("Input", Entry()) # to use a mnemonic: x <- LabeledWidget("_Input", Entry(), mnemonic=T) Rows or columns of widgets (VBoxes inside HBox or vice versa) library(RGtk2) vb <- gtkVBoxNew() hb <- gtkHBoxNew() hb$packStart(gtkLabelNew()) hb$packStart(gtkLabelNew()) vb$packStart(hb) hb <- gtkHBoxNew() hb$packStart(gtkEntryNew()) vb$packStart(hb) library(sexy.rgtk) # of course it can also become # very verbose when you actually # configure the widgets vb <- Rows(Label(), Label(), br, Entry()) Damien Leroux sexy.rgtk
  • 20. There’s more! Last but not least: displaying a data.frame library(RGtk2) # I’m sorry this is way too gory. # In short: # - create an rGtkDataFrame( # my.data.frame) # (this is the datastore) # - create renderer function(s) # function(col, colrenderer , # model, iter, data) # - create a GtkTreeView # - associate the datastore with the # tree view # - declare each column to display # and assign a renderer to each # of them library(sexy.rgtk) # Supports specific renderers only if # required , with a default to # plaintext as seen in the demo. # By default , all columns are to be # displayed. # The interface to the renderers is # simplified. # Also supports row names. df.widget <- DataFrame(my.data.frame) # et voila! Damien Leroux sexy.rgtk
  • 21. References Build a simple GUI with RGtk2 http://tuxette.nathalievilla.org/?p=866&lang=en RGtk2: R bindings for Gtk 2.8.0 and above http://cran.r-project.org/web/packages/RGtk2/ index.html Mulcyber: sexy.rgtk: Project home https: //mulcyber.toulouse.inra.fr/projects/sexy-rgtk/ Damien Leroux sexy.rgtk