Articles by Ralph

R Matrix Operations

March 27, 2011 | Ralph

R can be used to perform various matrix calculations. This include functions for creating matrices (matrix), addition (+), multiplication (%*%) and inversion (solve). Fast Tube by Casper Other useful resources are provided on the Supplementary Material... [Read more...]

R Package Automated Download

March 6, 2011 | Ralph

There are situations where we might want to run R on a standalone machine so need to download a (potentially) large number of packages to install on this system. Rather than having to through the pain of searching through CRAN to find the packages and all the dependencies and manually ... [Read more...]

Data Mining with WEKA

January 30, 2011 | Ralph

There are a number of good open source projects for statistics and data mining, for example the software WEKA developed at the University of Waikato. The description on their website states that: Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied ... [Read more...]

Gapminder

January 6, 2011 | Ralph

As many people are aware Hans Rosling is an enthusiastic swedish academic with a passion for statistics who recently presented the program The Joy of Stats. One of the great things about Hans Rosling is his presentations and the interactive graphics that he uses to make his points. Fast Tube ... [Read more...]

LaTeX Typesetting – Tables

January 2, 2011 | Ralph

One area of LaTeX that is not always straightforward is producing tabular material. In this post we will look at some of the basics of creating tables in a LaTeX document. Fast Tube by Casper When creating tables there is a tabular environment that can be used and we need ...
[Read more...]

LaTeX Typesetting – Document Structure

December 10, 2010 | Ralph

Following on from the initial post about creating a document using LaTeX we need to consider the structure of the document, i.e. headings and page layout. Fast Tube by Casper Document Class The document class is a template that specifies the appearance of different components of a document, e.... [Read more...]

LaTeX Typesetting – Basics

November 28, 2010 | Ralph

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 ... [Read more...]

Programming with R – Processing Football League Data Part I

November 23, 2010 | Ralph

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 ... [Read more...]

Programming with R – Checking Data Types

November 13, 2010 | Ralph

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 ... [Read more...]

Programming with R – Returning Information as a List

November 1, 2010 | Ralph

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 ... [Read more...]

Programming with R – Checking Function Arguments

October 24, 2010 | Ralph

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 ... [Read more...]

Programming with R – Function Basics

October 20, 2010 | Ralph

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 ... [Read more...]

Plotting Time Series data using ggplot2

September 30, 2010 | Ralph

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 ...
[Read more...]

Classification Trees using the rpart function

September 21, 2010 | Ralph

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 ...
[Read more...]

Classification Trees

September 18, 2010 | Ralph

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 ...
[Read more...]

Creating a Presentation with LaTeX Beamer – Using Overlays

August 25, 2010 | Ralph

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 ... [Read more...]

Charting the performance of cricket all-rounders – IT Botham

August 16, 2010 | Ralph

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 ... [Read more...]
1 2 3 4 5

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)