2508 search results for "ggplot2"

Sustainability of water use in agriculture

March 9, 2014
By
Sustainability of water use in agriculture

AQUASTAT, developed and maintained by the Food and Agriculture Organization of the UN, is the global database that gives quantitative information on water resources and withdrawal of water for different uses. Agricultural water withdrawal is defined as follows: Annual quantity of self-supplied water withdrawn for irrigation, livestock and aquaculture purposes. It includes water from primary

Read more »

Guidebook for growth curve analysis

March 3, 2014
By
Guidebook for growth curve analysis

I don't usually like to use complex statistical methods, but every once in a while I encounter a method that is so useful that I can't avoid using it. Around the time I started doing eye-tracking research (as a post-doc with Jim Magnuson), people were ...

Read more »

Using R: correlation heatmap, take 2

March 3, 2014
By
Using R: correlation heatmap, take 2

Apparently, this turned out to be my most popular post ever.  Of course there are lots of things to say about the heatmap (or quilt, tile, guilt plot etc), but what I wrote was literally just a quick celebratory post to commemorate that I’d finally grasped how to combine reshape2 and ggplot2 to quickly make

Read more »

Reading OECD.Stat into R

March 1, 2014
By
Reading OECD.Stat into R

OECD.Stat is a commonly used statistics portal in the research world but there are no easy ways (that I know of) to query it straight from R. There are two main benefits of querying OECD.Stat straight from R: 1. Create reproducible analysis (something that is easily lost if you have to download excel files) 2.

Read more »

Who knows the Oscar winners? The betting markets, probably.

February 28, 2014
By
Who knows the Oscar winners? The betting markets, probably.

This is the time of year when everyone likes to speculate on the winners of the Academy Awards, to be announced on Sunday. There are plenty of ways to try and predict which movie is going to win Best Picture or who'll win Best Actress. You could look at the various betting markets and see who the speculators are...

Read more »

Simply creating various scatter plots with ggplot #rstats

February 28, 2014
By
Simply creating various scatter plots with ggplot #rstats

Inspired by these two postings, I thought about including a function in my package for simply creating scatter plots. In my package, there’s a function called sjp.scatter for creating scatter plots. To reproduce these examples, first load the package and then attach the sample data set: The simplest function call is by just providing two

Read more »

The tf-idf-Statistic For Keyword Extraction

February 27, 2014
By
The tf-idf-Statistic For Keyword Extraction

The tf-idf-statistic (“term frequency – inverse document frequency”) is a common tool for the purpose of extracting keywords from a document by not just considering a single document but all documents from the corpus. In terms of tf-idf a word … Continue reading → The post The tf-idf-Statistic For Keyword Extraction appeared first on joy...

Read more »

Easily generate correlated variables from any distribution

February 27, 2014
By
Easily generate correlated variables from any distribution

In this post I will demonstrate in R how to draw correlated random variables from any distributionThe idea is simple.  1. Draw any number of variables from a joint normal distribution. 2. Apply the univariate normal CDF of variables to derive pro...

Read more »

Type I error rates in test of normality by simulation

February 26, 2014
By
Type I error rates in test of normality by simulation

This simulation tests the type I error rates of the Shapiro-Wilk test of normality in R and SAS. First, we run a simulation in R. Notice the simulation is vectorized: there are no "for" loops that clutter the code and slow the simulation. # type I erroralpha <- 0.05# number of simulationsn.simulations <- 10000#...

Read more »

Unemployment revisited

February 23, 2014
By
Unemployment revisited

Approximately a year ago I made a post graphing unemployment in Europe and other locations. I have always wanted to do this again, not because the R-code would be so interesting, but just because I wanted to see the plots. As time progressed I attempte...

Read more »

Sponsors

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)