Tutorials

Selection in R

June 1, 2012 | John Mount

The design of the statistical programming language R sits in a slightly uncomfortable place between the functional programming and object oriented paradigms. The upside is you get a lot of the expressive power of both programming paradigms. A downside of this is: the not always useful variability of the language’... [Read more...]

How to remember point shape codes in R

April 24, 2012 | John Mount

I suspect I am not unique in not being able to remember how to control the point shapes in R. Part of this is a documentation problem: no package ever seems to write the shapes down. All packages just use the “usual set” that derives from S-Plus and was carried ... [Read more...]

Sweeping through data in R

April 14, 2012 | Markus Gesmann

How do you apply one particular row of your data to all other rows?Today I came across a data set which showed the revenue split by product and location. The data was formated to show only the split by product for each location and the overall split by...
[Read more...]

Copy and paste small data sets into R

March 21, 2012 | Markus Gesmann

How can I embed a small data set into my R code? That was the question I came across today, when I prepared my talk about Dynamical Systems in R with simecol for the forthcoming Cologne R user group meeting. I wanted to add all the R code of the ...
[Read more...]

Why I don’t like Dynamic Typing

February 25, 2012 | John Mount

A lot of people consider the static typing found in languages such as C, C++, ML, Java and Scala as needless hairshirtism. They consider the dynamic typing of languages like Lisp, Scheme, Perl, Ruby and Python as a critical advantage (ignoring other features of these languages and other efforts at ... [Read more...]

The reshape function

February 9, 2012 | Markus Gesmann

The other day I wrote about the R functions by, apply and friends, which allow me to operate on subsets of data. All those functions work nicely, if the data is given in the right format. More often than not it isn't and I have to reshape the data befo...
[Read more...]

R is a language

January 11, 2012 | Luis

A commenter on this blog reminded me of one of the frustrating aspects faced by newbies, not only to R but to any other programming environment (I am thinking of typical students doing stats for the first time). The statement … Continue reading → [Read more...]

My Favorite Graphs

December 5, 2011 | Nina Zumel

The important criterion for a graph is not simply how fast we can see a result; rather it is whether through the use of the graph we can see something that would have been harder to see otherwise or that could not have been seen at all. – William Cleveland, The ... [Read more...]

My talk on doing phylogenetics in R

November 18, 2011 | Scott Chamberlain

I gave a talk today on doing very basic phylogenetics in R, including getting sequence data, aligning sequence data, plotting trees, doing trait evolution stuff, etc.Please comment if you have code for doing bayesian phylogenetic inference in R.  ...
[Read more...]

Programmers Should Know R

August 6, 2011 | John Mount

Programmers should definitely know how to use R. I don’t mean they should switch from their current language to R, but they should think of R as a handy tool during development.Again and again I find myself working with Java code like the following. td.linenos { background-color: #f0... [Read more...]

Your Data is Never the Right Shape

July 31, 2011 | John Mount

One of the recurring frustrations in data analytics is that your data is never in the right shape. Worst case: you are not aware of this and every step you attempt is more expensive, less reliable and less informative than you would want. Best case: you notice this and have ... [Read more...]

The cranky guide to trying R packages

February 13, 2011 | John Mount

This is a tutorial on how to try out a new package in R. The summary is: expect errors, search out errors and don’t start with the built in examples or real data. Suppose you want to try out a novel statistical technique? A good fraction of the time ... [Read more...]
1 2 3 4

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)