2138 search results for "ggplot2"

ddply in action

March 7, 2013
By
ddply in action

Top Batting Averages Over Time Top Batting Averages Over Time reference:http://www.baseball-databank.org/ ShortI'm going to use plyr and ggplot2 to look at how top batting averages have changed over time First load the data: options(width = 100)library(ggplot2) ## Warning message: package 'ggplot2' was built under R version 2.14.2 library(plyr)data(baseball)head(baseball) ## ...

Read more »

geom_point Legend with Custom Colors in ggplot

March 7, 2013
By
geom_point Legend with Custom Colors in ggplot

Formerly, I showed how to make line segments using ggplot.Working from that previous example, there are only a few things we need to change to add custom colors to our plot and legend in ggplot.First, we'll add the colors of our choice. I'll do th...

Read more »

Veterinary Epidemiologic Research: Linear Regression Part 2 – Checking assumptions

March 6, 2013
By
Veterinary Epidemiologic Research: Linear Regression Part 2 – Checking assumptions

We continue on the linear regression chapter the book Veterinary Epidemiologic Research. Using same data as last post and running example 14.12: Now we can create some plots to assess the major assumptions of linear regression. First, let’s have a look at homoscedasticity, or constant variance of residuals. You can run a statistical test, the

Read more »

Exporting plain, lattice, or ggplot graphics

March 6, 2013
By
Exporting plain, lattice, or ggplot graphics

A blend between a basic scatterplot, lattice scatterplot and a ggplot In a recent post I compared the Cairo packages with the base package for exporting graphs. Matt Neilson was kind enough to share in...

Read more »

Times per second benchmark

March 5, 2013
By

In GNU R the simplest way to measure execution time of a piece code is to use system.time. However, sometimes I want to find out how many times some function can be executed in one second. This is especially useful when we want to compare function...

Read more »

All That Glitters

March 3, 2013
By
All That Glitters

"The law itself follows Gold" Sextus Propertius.But what about stocks, bonds and real estate? Do they follow Gold too? Using the correlation data from my previous post, The Financial Crisis on Tape Part I, this question is easy to investigate. Indeed, ...

Read more »

Occurrence of Alzheimer deaths in Netherlands

March 3, 2013
By
Occurrence of Alzheimer deaths in Netherlands

I wanted to know a bit more about the number of people suffering from Alzheimer. It has been getting more attention and it runs in my family. From CBS (Statistics Netherlands) I pulled the data regarding the number of people dying from it. I am af...

Read more »

Has the NFL Combine’s 40 yard dash gotten faster ?

March 3, 2013
By
Has the NFL Combine’s 40 yard dash gotten faster ?

Last week on one of my favourite podcasts, ESPN’s Football Today, Matt Williamson & Kevin Weidl discussed the standout prospects from the NFL Combine. A lot of the conversation was around how the 40 yard dash times have improved year on year due to better training technique and specific training for the combine activities. I

Read more »

rstats shiny app for tracking the next pope

March 2, 2013
By
rstats shiny app for tracking the next pope

Update: Apparently this post needs a disclaimer. The probabilities are based on odds published by an online bookmaker. In no way, shape, or form is this an attestation nor algorithmic prediction of who the next Pope will be. The house ALWAYS wins. The odds are developed by the bookmaker as they see fit, this information is not released to the general public...

Read more »

Tools for making a paper

March 1, 2013
By

Since it seems to be the fashion, here’s a post about how I make my academic papers. Actually, who am I trying to kid? This is also about how I make slides, letters, memos and “Back in 10 minutes” signs to pin on the door. Nevertheless it’s for making academic papers that I’m going to

Read more »