<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/a-comparative-review-of-the-rattle-gui-for-r/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://r4stats.com/2018/07/02/a-comparative-review-of-the-rattle-gui-for-r/"> R – r4stats.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h3><strong>Introduction</strong></h3>
<p>Rattle is a <a rel="nofollow" href="http://r4stats.com/articles/guipop/" target="_blank">popular</a> free and open source Graphical User Interface (GUI) for the <a rel="nofollow" href="https://www.r-project.org/" target="_blank">R software</a>, one that focuses on beginners looking to point-and-click their way through data mining tasks. Such tasks are also referred to as machine learning or predictive analytics.  Rattle’s name is an acronym for “R Analytical Tool To Learn Easily.” Rattle is available on Windows, Mac, and Linux systems.</p>
<p>This post is one of a <a rel="nofollow" href="http://r4stats.com/articles/software-reviews/" target="_blank">series of reviews</a> which aim to help non-programmers choose the GUI that is best for them. Additionally, these reviews include a cursory description of the programming support that each GUI offers.</p>
<div class="wp-caption">
<p><a rel="nofollow" href="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Main-Screen.png" target="_blank"><img data-orig-file="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Main-Screen.png?fit=789%2C561" data-orig-size="789,561" data-medium-file="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Main-Screen.png?fit=300%2C213" data-attachment-id="2650" data-image-meta="{" data-image-description="" src="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Main-Screen.png?resize=640%2C455" data-permalink="http://r4stats.com/articles/software-reviews/rattle/rattle-main-screen/" data-large-file="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Main-Screen.png?fit=640%2C455" alt="" data-image-title="Rattle Main Screen" sizes="(max-width: 640px) 100vw, 640px" width="450" data-comments-opened="1" class="wp-image-2650"></a></p>
<p class="wp-caption-text">Figure 1. The Rattle interface with the “Data” tab chosen, showing which file I’m reading, and the roles of the variables will play in analyses. The role assigned to each variable is critically important. Note the all-important “Execute” button in the upper left of the screen. Nothing happens until it’s clicked.</p>
</div>
<p> </p>
<h3><strong>Terminology</strong></h3>
<p>There are various definitions of user interface types, so here’s how I’ll be using these terms:</p>
<p>GUI = Graphical User Interface using menus and dialog boxes to avoid having to type programming code. I do not include any assistance for programming in this definition. So, <em>GUI users</em> are people who prefer using a GUI to perform their analyses. They don’t have the time or inclination to become good programmers.</p>
<p>IDE = Integrated Development Environment which helps programmers write code. I do not include point-and-click style menus and dialog boxes when using this term. <em>IDE users</em>are people who prefer to write R code to perform their analyses.</p>
<p> </p>
<h3><strong>Installation</strong></h3>
<p>The various user interfaces available for R differ quite a lot in how they’re installed. Some, such as <a rel="nofollow" href="http://r4stats.com/articles/software-reviews/jamovi/" target="_blank">jamovi</a> or <a rel="nofollow" href="http://r4stats.com/articles/software-reviews/rkward/" target="_blank">RKWard</a>, install in a single step. Others install in multiple steps, such as R Commander (two steps) and <a rel="nofollow" href="http://r4stats.com/articles/software-reviews/deducer/" target="_blank">Deducer</a> (up to seven steps). Advanced computer users often don’t appreciate how lost beginners can become while attempting even a simple installation. The Help Desks at most universities are flooded with such calls at the beginning of each semester!</p>
<p>The steps to install Rattle are:</p>
<ol>
<li>Install R</li>
<li>In R, install the toolkit that Rattle is written in by executing the command: install.packages(“RGtk2”)</li>
<li>Also in R, install Rattle itself by executing the command:<br>
install.packages(“rattle”, dependencies=TRUE)<br>
The very  latest development version is available <a rel="nofollow" href="https://bitbucket.org/kayontoga/rattle" target="_blank">here</a>.<br>
Note that while Rattle’s name is capitalized, the name of the rattle package is spelled in <strong>all lower-case letters!</strong></li>
<li>If you wish to take advantage of interactive visualization (highly recommended) then install the <a rel="nofollow" href="http://www.ggobi.org/" target="_blank">GGobi</a> software from: http://www.ggobi.org/downloads/.</li>
</ol>
<p> </p>
<h3><strong>Plug-in Modules</strong></h3>
<p>When choosing a GUI, one of the most fundamental questions is: what can it do for you? What the initial software installation of each GUI gets you is covered in the Graphics, Analysis, and Modeling sections of this series of articles. Regardless of what comes built-in, it’s good to know how active the development community is. They contribute “plug-ins” which add new menus and dialog boxes to the GUI. This level of activity ranges from very low (RKWard, Deducer) through moderate (jamovi) to very active (R Commander).</p>
<p>Rattle’s complete capability was designed and programmed by <a rel="nofollow" href="https://togaware.com/about/graham-williams/" target="_blank">Graham Williams</a> of Togaware. As a result, it doesn’t have plug-ins, but it does include a comprehensive set of data mining tools.</p>
<p> </p>
<h3><strong>Startup</strong></h3>
<p>Some user interfaces for R, such as jamovi, start by double-clicking on a single icon, which is great for people who prefer to not write code. Others, such as R commander and JGR, have you start R, then load a package from your library, and call a function. That’s better for people looking to learn R, as those are among the first tasks they’ll have to learn anyway.</p>
<p>Rattle is run as a part of R itself, so the steps to start it begin with starting R:</p>
<ol>
<li>Start R.</li>
<li>Load Rattle from your library by executing the command: library(“rattle”)</li>
<li>Start Rattle by executing the command: rattle()</li>
</ol>
<p> </p>
<h3><strong>Data Editor</strong></h3>
<p>A data editor is a fundamental feature in data analysis software. It puts you in touch with your data and lets you get a feel for it, if only in a rough way. A data editor is such a simple concept that you might think there would be hardly any differences in how they work in different GUIs. While there are technical differences, to a beginner what matters the most are the differences in simplicity. Some GUIs, including jamovi, let you create only what R calls a data frame. They use more common terminology and call it a data set: you create one, you save one, later you open one, then you use one. Others, such as RKWard trade this simplicity for the full R language perspective: a data set is stored in a workspace. So the process goes: you create a data set, you save a workspace, you open a workspace, and choose a data set from within it.</p>
<p>Rattle’s data editor is unique for a GUI in that it does not offer a way to create a data set. It lets you edit any data set you open using R’s built-in edit function, but that function offers very few features. Clicking on a variable name will cause a dialog to open, offering to change the variable’s name or type as numeric or character (see Figure 2). Rattle automatically converts variables that have fewer than 10 values into “categorical” ones. R would call these factors. You can always recode variables from numeric to categorical (or vice versa) in the “Transform” tab (see Data Management section).</p>
<div class="wp-caption">
<p><a rel="nofollow" href="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Data-Editor.png" target="_blank"><img data-orig-file="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Data-Editor.png?fit=637%2C364" data-orig-size="637,364" data-medium-file="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Data-Editor.png?fit=300%2C171" data-attachment-id="2649" data-image-meta="{" data-image-description="" src="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Data-Editor.png?resize=637%2C364" data-permalink="http://r4stats.com/articles/software-reviews/rattle/rattle-data-editor/" data-large-file="https://i0.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Data-Editor.png?fit=637%2C364" alt="" data-image-title="Rattle Data Editor" sizes="(max-width: 637px) 100vw, 637px" width="450" data-comments-opened="1" class="wp-image-2649"></a></p>
<p class="wp-caption-text">Figure 2. Rattle uses R’s built-in edit function as its data editor. Here I clicked on the name of the variable “Rainfall” to show how you might rename it or change its data type.</p>
</div>
<p> </p>
<h3><strong>Data Import</strong></h3>
<p>Since R GUIs are using R to do the work behind the scenes, they often include the ability to read a wide range of files, including SAS, SPSS, and Stata. Some, like <a rel="nofollow" href="http://r4stats.com/articles/software-reviews/bluesky/" target="_blank">BlueSky Statistics</a>, also include the ability to read directly from SQL databases. Of course you can always use R code to import data from any source and then continue to analyze it using any GUI, but the point of GUIs is to avoid programming.</p>
<p>Rattle skips many common statistical data formats, but it includes a couple exclusive ones, such as the Attribute-Relation File Format used by other data mining tools. It also includes “corpus” which reads in text documents, and it then it performs the popular <a rel="nofollow" href="https://en.wikipedia.org/wiki/Tf%E2%80%93idf" target="_blank">tf-idf</a>calculation to prepare them for analysis using the other numerically-based analysis methods.</p>
<p>On its “Data” tab, Rattle offers several formats:</p>
<ol>
<li>File: CSV</li>
<li>File: TXT</li>
<li>File: Excel</li>
<li>Attribute-Relation File Format (ARFF)</li>
<li>Open Database Connectivity (ODBC)</li>
<li>R Dataset</li>
<li>RData File</li>
<li>Library</li>
<li>Corpus (for text analysis)</li>
<li>Script</li>
</ol>
<p> </p>
<h3><strong>Data Management</strong></h3>
<p>It’s often said that 80% of data analysis time is spent preparing the data. Variables need to be transformed, recoded, or created; strings and dates need to be manipulated; missing values need to be handled; datasets need to be stacked or merged, aggregated, transposed, or reshaped (e.g. from wide to long and back). A critically important aspect of data management is the ability to transform many variables at once. For example, social scientists need to recode many survey items, biologists need to take the logarithms of many variables. Doing these types of tasks one variable at a time can be tedious. Some GUIs, such as jamovi and RKWard handle only a few of these functions. Others, such as  BlueSky Statistics or the R Commander can handle all, or nearly all, of these tasks.</p>
<p>Rattle provides minimal data management tools. Its designer chose to focus on reading a single data set, and making transformations that are common in data mining projects quick and easy. More complex  data management tasks are left to other tools such as SQL in a database before the data set is read in, or using R programming.</p>
<p>Rattle’s “Transform” tab cycles through various data management “types.”  The way it works is quite unique. As you can see in Figure X, I have selected the Transform tab by clicking on it. I then held the CTRL key down to select several variables that are highlighted in blue. If the variables had been next to one another, I could have clicked on the first one, then shift-clicked on the last to select them all. Next I chose my transformation, by choosing “Recode” and then “Recenter.” Finally, I clicked the “Execute” button (or F2) to complete the process by adding three new recoded variables to the data set. Original variables are never changed, and you never have the ability to choose the name of the new variable(s). A prefix is appended to the variable name(s) automatically to speed the process. In this case, my Rainfall variable was transformed into “RRC_Rainfall”. The RRC prefix stands for “Recoded, Re-Centered.”</p>
<p>Whenever a variable is transformed, its status in the “Data” tab switches from “Input” to “Ignore”, while the transformed version of variable enters the data with an “Input” role.</p>
<div class="wp-caption">
<p><a rel="nofollow" href="https://i1.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Transform-Tab-1.png" target="_blank"><img data-orig-file="https://i1.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Transform-Tab-1.png?fit=1300%2C716" data-orig-size="1300,716" data-medium-file="https://i1.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Transform-Tab-1.png?fit=300%2C165" data-attachment-id="2655" data-image-meta="{" data-image-description="" src="https://i1.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Transform-Tab-1.png?resize=640%2C352" data-permalink="http://r4stats.com/articles/software-reviews/rattle/rattle-transform-tab-2/" data-large-file="https://i1.wp.com/r4stats.com/wp-content/uploads/2018/06/Rattle-Transform-Tab-1.png?fit=640%2C353" alt="" data-image-title="Rattle Transform Tab" sizes="(max-width: 640px) 100vw, 640px" width="450" data-comments-opened="1" class="wp-image-2655"></a></p>
<p class="wp-caption-text">Figure 3. Rattle’s “Transform” tab with three variables selected. The “Recode” sub-tab is also selected and the “Recenter” transformation is chosen. When the “Explore” button is clicked, the newly tranformed variables will be appended to the data set with a prefix indicating the type of transformation performed.</p>
</div>
<p> </p>
<p>As easy as some transformations are, other transformations are impossible. For example, if you had a formula to calculate recommended daily allowances of vitamins, there’s no way to do it. Conditional transformations, those which have different formulas for different subsets of the observations (e.g. daily allowances of vitamins calculated differently for men and women) are also not possible. Here are the available transformations:</p>
<p>Transform> Rescale> Normalize</p>
<ul>
<li>Recenter (Z-score)</li>
<li>Scale 0 to 1</li>
<li>(Var – Median)/Mean Absolute Deviation (MAD)</li>
<li>Natural Log</li>
<li>Log 10</li>
<li>Matrix (divide all by a constant)</li>
</ul>
<p>Transform> Impute</p>
<ul>
<li>Replace missing with zeros (e.g. requesting nothing gets you nothing)</li>
<li>Mean</li>
<li>Median</li>
<li>Mode</li>
<li>Constant</li>
</ul>
<p>Transform> Recode</p>
<ul>
<li>Binning> Quantiles</li>
<li>Binning> KMeans clusters</li>
<li>Binning> Equal width intervals</li>
<li>Binning> N Equally spaced intervals</li>
<li>Indicator variables</li>
<li>Join Categorics</li>
<li>As Categoric</li>
<li>As Numeric</li>
</ul>
<p>Continued <a rel="nofollow" href="http://r4stats.com/articles/software-reviews/rattle/" target="_blank">here…</a></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://r4stats.com/2018/07/02/a-comparative-review-of-the-rattle-gui-for-r/"> R – r4stats.com</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/hBQKQBLl0do" height="1"></a></div>