2146 search results for "Ggplot2"

d3 <- R with rCharts and slidify

April 29, 2013
By

I believe that the NY Times interactive feature 512 Paths to the White House is one of the best visualizations of all time.  It is even better when we have details on the process of creating this marvel.   Although the graphic is not suited for other data sources (please tell me if this is not...

Read more »

Slides and exercise from my second R intro seminar

April 28, 2013
By
Slides and exercise from my second R intro seminar

This week I held the second introductory seminar on R, and I think it went pretty well — though I guess you really should ask my colleagues if you want to know. The first seminar was a lecture, and this seminar was a tutorial where we made some plots and calculated a few of the

Read more »

The Financial Crisis on Tape Part II

April 26, 2013
By
The Financial Crisis on Tape Part II

EDIT: I am aware of some browsers failing to load the github code below. I will try to improve this as soon as possible. Until then it may work better on www.joesdatadiner.com than at http://www.r-bloggers.com/. Finally all the code is availa...

Read more »

FasteR! HigheR! StrongeR! – A Guide to Speeding Up R Code for Busy People

April 25, 2013
By
FasteR! HigheR! StrongeR! – A Guide to Speeding Up R Code for Busy People

This is an overview of tools for speeding up your R code that I wrote for the Davis R Users’ Group. First, Ask “Why?” It’s customary to quote Donald Knuth at this point, but instead I’ll quote my twitter buddy Ted Hart to illustrate a point: I’m just going to say it.I like for loops in #Rstats,...

Read more »

Stamen maps with spplot

Stamen maps with spplot

Several R packages provide an interface to query map services (Google Maps, Stamen Maps or OpenStreetMap) to obtain raster images …Continuar leyendo »

Read more »

2D plot with histograms for each dimension (2013 edition)

April 22, 2013
By
2D plot with histograms for each dimension (2013 edition)

In 2009, I wrote about a way to show density plots along both dimensions of a plot. When I ran the code again to adapt it to a new project, it didn't work because ggplot2 has become better in the meantime. Below is the updated code. Using the gridExtra...

Read more »

What Is the Probability of a 16 Seed Beating a 1 Seed?

April 21, 2013
By
What Is the Probability of a 16 Seed Beating a 1 Seed?

Note: I started this post way back when the NCAA men's basketball tournament was going on, but didn't finish it until now. Since the NCAA Men's Basketball Tournament has moved to 64 teams, a 16 seed as never upset a 1 seed. You might be tempted to say ...

Read more »

What Is the Probability of a 16 Seed Beating a 1 Seed?

April 20, 2013
By
What Is the Probability of a 16 Seed Beating a 1 Seed?

Note: I started this post way back when the NCAA men's basketball tournament was going on, but didn't finish it until now. Since the NCAA Men's Basketball Tournament has moved to 64 teams, a 16 seed as never upset a 1 seed. You might be tempted to say...

Read more »

Modeling habitat diversity and species richness

April 20, 2013
By
Modeling habitat diversity and species richness

How does habitat diversity affect species richness? Perhaps intuition suggests that habitat diversity increases species richness by facilitating niche or resource partitioning among species. But, for a fixed area, as habitat heterogeneity increases, the area that can be allocated to each habitat type decreases. In a recent paper, Allouche and colleagues (2012) provide a theoretical and empirical treatment...

Read more »

Agent-based modeling in R – habitat diversity and species richness

April 20, 2013
By
Agent-based modeling in R – habitat diversity and species richness

How does habitat diversity affect species richness? Perhaps intuition suggests that habitat diversity increases species richness by facilitating niche or resource partitioning among species. But, for a fixed area, as habitat heterogeneity increases, the area that can be allocated to each habitat type decreases. In a recent paper, Allouche and colleagues (2012) provide a theoretical and empirical treatment...

Read more »