1817 search results for "ggplot2"

Hierarchical linear models and lmer

October 31, 2012
By
Hierarchical linear models and lmer

Hierarchical linear models and lmer Article by Ben Ogorek Graphics by Bob Forrest Background My last article featured linear models with random slopes. For estimation and prediction, we used the lmer function from the lme4 package. Today we'll consider another level in the hierarchy, one...

Read more »

GGtutorial: Day 3 – Introduction to Colors

October 31, 2012
By
GGtutorial: Day 3 – Introduction to Colors

So, where does ggplot get its colors? If you’ve ever asked ggplot to color on the basis of a factor, you might have beeen surprised by the default color choices.  The fact is, ggplot colors factors on the basis of finding evenly spaced colors a...

Read more »

Fitting Distributions to Data with R

October 31, 2012
By

In “Fitting Distributions with R” Vito Ricci writes; “Fitting distributions consists in finding a mathematical function which represents in a good way a statistical variable. A statistician often is facing with this problem: he has some observations of a quantitative character and he wishes to test if those observations, being a sample of an unknown population, belong from a...

Read more »

Build Static HTML Help Pages for R Packages

October 29, 2012
By
Build Static HTML Help Pages for R Packages

Many R users may still remember the good old days when we had static HTML documentation for R packages. That was probably before R 2.10.0 (in 2009). Then we had the fancy dynamic HTML help based on the built-in httpd server, but it has never really mad...

Read more »

Animated map of 2012 US election campaigning, with R and ffmpeg

October 28, 2012
By

(Video link here, in case the embedded player doesn’t work for you.) Idea: see if I can mimic the idea behind Ben Schmidt’s lovely video of ocean shipping routes, and apply it to another dataset. But which? “Hmm… what’s another … Continue reading →

Read more »

Notes on a Scandal – When Jimmy beat Katy

October 25, 2012
By
Notes on a Scandal  – When Jimmy beat Katy

No the title doesn’t refer to how Katy Perry suffered at another of Jimmy Savile’s sexual predelictions, although these are two of  the participants. I’ll get to the details later Just over a year ago, I reflected on the relative wiki searches of leading female singing celebrities, including Ms Perry. In the light of the

Read more »

Palettes in R

October 25, 2012
By
Palettes in R

In its simplest form, a palette in R is simply a vector of colors. This vector can be include the hex triplet or R color names.The default palette can be seen through palette(): > palette("default") # you'll only need this line if you've previ...

Read more »

Congressional ideology by state

October 25, 2012
By
Congressional ideology by state

In a recent post, I illustrated how to add a background geom to your ggplot. While that code worked, and the plot looked fine, it was pointed out to me that I was missing an important aspect of plot layering with ggplot2. Namely, it is not, as I previ...

Read more »

Plotting the debate "Winner"

October 24, 2012
By
Plotting the debate "Winner"

As a Political Scientist, it could not be more gauche to talk about the Presidential debate in terms of a winner and a loser, but the occasion provides the opportunity to show how to do (at least) three really useful things: Directly load price and v...

Read more »

RStudio training

October 23, 2012
By
RStudio training

At RStudio, we want you to be effective R users. As well as creating great software, we want to make it easier for you to master R. To this end, we’re very happy to announce our new training offerings. We’re kicking off with two public courses: Effective data visualisation and reports and reproducible research in

Read more »