Publications by Ralph

Creating a Presentation with LaTeX Beamer – Frame Transitions

04.09.2010

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 mechanism for including tran...

1318 sym R (13 sym/1 pcs) 2 img

Classification Trees

18.09.2010

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 tre...

1877 sym R (1738 sym/7 pcs) 2 img

Classification Trees using the rpart function

21.09.2010

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 using a simi...

1446 sym R (911 sym/6 pcs) 2 img

Plotting Time Series data using ggplot2

30.09.2010

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 here: > head(yt.views) Date Views 1 201...

1227 sym R (265 sym/2 pcs) 4 img

Programming with R – Function Basics

20.10.2010

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 the same initial a...

2175 sym R (178 sym/3 pcs)

Programming with R – Checking Function Arguments

24.10.2010

In a previous post we considered writing a simple function to calculate the volume of a cylinder by specifying the height and radius of the cylinder. The function did not have any checking of the validity of the function arguments which we will consider in this post. R has various functions that we can use to test certain conditions in our functi...

2051 sym R (1075 sym/4 pcs)

Programming with R – Returning Information as a List

01.11.2010

In previous posts (here and here) we created a simple function that returns a single numeric value. In some situations it may be more useful to return a more flexible data type, such as a list object, to provide more information about the calculations that have been performed. We can extend our previous function by changing the return value to a ...

1336 sym R (610 sym/3 pcs)

Programming with R – Checking Data Types

13.11.2010

There are a number of useful functions in R that test the variable type or convert between different variable types. These can be used to validate function input to ensure that sensible answers are returned from a function or to ensure that the function doesn’t fail. Following on from a previous post on a simple function to calculate the volume...

1890 sym R (994 sym/4 pcs)

Programming with R – Processing Football League Data Part I

23.11.2010

In this post we will make use of football results data from the football-data.co.uk website to demonstrate creating functions in R to automate a series of standard operations that would be required for results data from various leagues and divisions. The first step is to consider what control options should be available as part of the function an...

3931 sym Python (5888 sym/10 pcs)

LaTeX Typesetting – Basics

28.11.2010

The LaTeX typesetting is used to create professional looking documents on a home computer. It may have a steeper learning curve than using a Word Processor, but this initial effort will often pay off reasonably quickly. The system is almost a necessity for anyone writing documents with a large amount of mathematics as most alternatives are painfu...

2814 sym R (330 sym/5 pcs) 2 img