Blog Archives

Programming with R – Function Basics

October 20, 2010
By

One of the benefits of using R for statistical analysis is the programming language which allows users to define their own functions, which is particularly useful for analysis that needs to be repeated. For example, a monthly output from a database may be provided in a pre-determined format and we might be interested in running

Read more »

Plotting Time Series data using ggplot2

September 30, 2010
By
Plotting Time Series data using ggplot2

There are various ways to plot data that is represented by a time series in R. The ggplot2 package has scales that can handle dates reasonably easily. Fast Tube by Casper As an example consider a data set on the number of views of the you tube channel ramstatvid. A short snippet of the data is shown

Read more »

Classification Trees using the rpart function

September 21, 2010
By
Classification Trees using the rpart function

In a previous post on classification trees we considered using the tree package to fit a classification tree to data divided into known classes. In this post we will look at the alternative function rpart that is available within the base R distribution. Fast Tube by Casper A classification tree can be fitted using the rpart function

Read more »

Classification Trees

September 18, 2010
By
Classification Trees

Decision trees are applied to situation where data is divided into groups rather than investigating a numerical response and its relationship to a set of descriptor variables. There are various implementations of classification trees in R and the some commonly used functions are rpart and tree. Fast Tube by Casper To illustrate the use of the tree

Read more »

Creating a Presentation with LaTeX Beamer – Frame Transitions

September 4, 2010
By
Creating a Presentation with LaTeX Beamer – Frame Transitions

Transitions are often used in presentations to break up the presentation and to keep the audience awake, but often the outcome is irritation/distraction with text or other objects flying on or off the screen from different directions. As such they should be used sparingly if at all in a talk. LaTeX beamer has a simple

Read more »

Creating a Presentation with LaTeX Beamer – Using Overlays

August 25, 2010
By
Creating a Presentation with LaTeX Beamer – Using Overlays

Overlays can be used in a LaTeX beamer presentation to reveal parts of a slide sequentially, which can be a useful way of imparting information to your audience. There are a number of different ways that overlays can be created depending on the sophistication required in the presentation. Fast Tube by Casper The \pause command is the

Read more »

Charting the performance of cricket all-rounders – IT Botham

August 16, 2010
By
Charting the performance of cricket all-rounders – IT Botham

Cricket is a sport that generates a large volume of performance data and corresponding debate about the relative qualities of various players over their careers and in relation to their contemporaries. The cricinfo website has an extensive database of statistics for professional cricketers that can be searched to access the information in various formats. As an

Read more »

Useful functions for data frames

August 9, 2010
By

The R software system is primarily command line based so when there are large sets of data it is not easy to browse the data frames. There are various useful functions for working with data frames. For example, after loading data from a text file we might want to view the first few lines of a

Read more »

Creating a Presentation with LaTeX Beamer – Including Images from Graphics Files

August 7, 2010
By
Creating a Presentation with LaTeX Beamer – Including Images from Graphics Files

It will often be more efficient to generate graphics in an external software package and then include these files in a LaTeX beamer presentation. The standard LaTeX approach to including graphics can be utilised to perform this task. Fast Tube by Casper The graphicx is useful for including graphics files in a presentation and this package has

Read more »

Creating a Presentation with LaTeX Beamer – Equations and tikz

July 23, 2010
By
Creating a Presentation with LaTeX Beamer – Equations and tikz

Many presentations created using LaTeX beamer included mathematical equations and these can be easily included in a presentation and in this post we will consider using the tikz package to add various interesting elements to equations, such as lines between text on a slide and part of an equation. Fast Tube by Casper The examples on this

Read more »