Brief look at R Commander: A free R based point and click program. Part 1.



Brief look at R Commander: A free R based point and click program. Part 1. 



I have an affinity for free stats programs and R Commander is a clever R package with a GUI that is easy to use with the same features of RStudio, and of course the power of R. There are a number of R commander specific plug-ins now available here: http://www.rcommander.com/ These can be loaded in the same way you load other R packages, however (see below).

I am using R Commander on my work computer in Windows 7.

Anyway, let's have a look. I am assuming you have R installed, or RStudio. I will open RStudio and install the R Commander Package, Rcmdr.

Install R Commander
If you go to the toolbar and select Tools, Install Packages, you can type in Rcmdr. As you can see the R Commander plug-ins are also displayed:




































Once you select the Install button, you will be ready to open R Commander by simply selecting Rcmdr from installed packages. You may get a popup window like this first, however. If you do, select yes.



Once complete, you select the Rcmdr packages below:





R Commander opens up immediately:






Using R Commander
As I noted above, you can install a number of R Commander plug-ins. These can be Loaded from the Tools menu option, and you select Load Packages....loading whatever you need to load. I loaded userfriendlyscience, since i use this package often. But you can load whatever package you have in R, assuming you have installed them first.

R Commander has a number really cool features. I won't show them in this post, but I will load a datafile. In the next post I will outline some cool features. You can see the RMarkdown tab above and the RScript file too. These will be very handy.


Loading a file

From the menu bar you can select Data and open a variety of datafiles in several ways:





Here I am importing a large SPSS file. You can see the R Script being recorded as each command is generated through the menu. You also see some import options and the ability to assign a name for the dataset.



After you select OK the program imports the data through the standard R procedure, see RScript below. Note, the options to Edit data set and View data set are now available. You can also select statistical procedures:




Note, if you select Edit data set or if you run an analysis, you need to go back to your RStudio to see the results or the open datafile. e.g.,




































As you can see above, the datafile is open to edit or view and the Console shows the results of a quick t-test I ran from R Commander. In the next post I will show some more analyses.

Markdown
Finally, I want to show the R Commander Markdown file and what happens when you select the Generate Report button shown here:


As you see above, you can view the Markdown, edit it, and you can generate a report. If you have not worked with Markdown (and Notebook) files, they are great. I will tell you why in a later post. But if you select the Generate report button, the markdown file is executed and it creates a easy to read html file, great for blogging and sharing (I know, i should actually use it more!).

Here is a snapshot. It can be embed, if you host it somewhere, or you could paste the entire html code here in Blogger, or elsewhere. But I just want to show you a screen shot. I could actually compose an entire blog post in the Markdown and paste the full html as a post. The file below is unedited, but you can edit it in the R Markdown area above.





That's all I have for now. Next time I will try some analyses, unless I get sidetracked with some other free software, or if I decide to blog about Markdown and Notebook files.

If you have trouble getting R Commander to work, let me know.







Comments

Popular Posts