Dr. Mark Gardener



R: MonogRaphs

A series of essays on random topics using R: The Statistical Programming Language

R is a powerful and flexible beast. Getting started using R is not too difficult and you can learn to start using R in an afternoon. However, mastering R takes rather longer! I have been using R for a while now and am continually lerning new things. These monographs are my way of exploring various topics in a completely unstructured manner.

Tips & Tricks for R | An Introduction to R| Writer's Bloc | Courses

More articles, hints, tips and tricks

Beta coeff calc.R file for beta coefficients in regression models.

Script file for hg_plot() command.

Amazon tech.book store


Index of entries

The most recent entries will be at the top...

Beta coefficients from regression models

Beta coefficients are regression coefficients (analogous to the slope in a simple regression/correlation) that are standardized against one another. This standardization means that they are "on the same scale", or have the same units, which allows you to compare the magnitude of their effects directly. Here I present some notes about what beta coefficients are and a some custom commands that allow you to compute and display them.

Data layout - stack()ing your data

Data can be set out in several ways. Excel tends to require data in sample format but a scientific recording format is generally more flexible and generally required by R commnds such as aov() and lm().

When you have data in the "wrong" layout you need to be able to rearrange them into a more "sensible" layout so that you can unleash the power of R most effectively. The stack() command is a useful tool that can help you achieve this layout.

I am Legend

A legend is a tool to help explain a graph. You are most commonly going to want to add one to a bar chart where you have several data series. You'll also want to add one to a line or scatter plot when you have more than one series. Essentially you use a legend to help make a complicated plot more understandable. These notes give a little insight into ways to produce legends in R plots.

Overlapping histograms

I was preparing some teaching material recently and wanted to show how two samples distributions overlapped. This meant I needed to work out how to plot two histograms on one axis and also to make the colours transparent, so that they could both be discerned.

The three Rs: Reading, wRiting and aRithmetic

I remember reading about the 3 Rs as the most important topics in education: reading writing and arithmetic. I thought it would be interesting to examine these in an R context e.g. reading data, writing data and doing maths.

Part 1. Reading
Part 2. wRiting
Part 3. aRithmetic

Dot charts and Histograms

The histogram is the classic way to visualize the distribution of a dataset. However, a dot chart (or tally plot) can make a nice change. In this monogRaph I look to develop a custom R function that will draw a dot chart histogram (sometimes called a Wilkinson dotchart).

Learning to work with R

I was asked to contribute to a series of blogs on the Amazon tech.book store. I decided that something about the general process of learning R would be more useful than a discussion of a specific R-related topic. So, I set out what I believe to be some of the key elements in learning to use R. The blog appeared in early April and the monogRaph here is simply my own copy.

See my Publications about statistics and data analysis.

Writer's Bloc – my latest writing project includes R scripts

Courses in data analysis, data management and statistics.


Follow me...
Facebook Twitter Google+ Linkedin Amazon
Top Home
Data Analysis
Contact GardenersOwn Homepage