2508 search results for "ggplot2"

PITFALL: Did you really mean to use matrix(nrow, ncol)?

June 17, 2014
By
PITFALL: Did you really mean to use matrix(nrow, ncol)?

Are you a good R citizen and preallocates your matrices? If you are allocating a numeric matrix in one of the following two ways, then you are doing it the wrong way!x <- matrix(nrow=500, ncol=100)orx <- matrix(NA, nrow=500, ncol=100)Why? Becau...

Read more »

Proficiency levels @ PISA and visualisation challenge @ useR!2014

June 13, 2014
By
Proficiency levels @ PISA  and visualisation challenge @ useR!2014

16 days to go for submissions in the DataVis contest at useR!2014 (see contest webpage). The contest is focused on PISA data and students’ skills. The main variables that reflect pupil skills in math / reading / science are plausible values e.g. columns PV1MATH, PV1READ, PV1SCIE in the dataset. But, these values are normalized to

Read more »

The Gilbreath’s Conjecture

June 12, 2014
By
The Gilbreath’s Conjecture

317 is a prime, not because we think so, or because our minds are shaped in one way rather than another, but because it is so, because mathematical reality is built that way (G.H. Hardy) In 1958, the mathematician and magician Norman L. Gilbreath presented a disconcerting hypothesis conceived in the back of a napkin. Gilbreath

Read more »

Bar charts with percentage labels but counts on the y axis

June 11, 2014
By
Bar charts with percentage labels but counts on the y axis

Bar charts and histograms are easily to understand. I often write for non-specialist audiences so I tend to use them a lot. People like percentages too, so a bar chart with counts on the y axis but percentage labels is a useful thing to be able to produce. But how to do them in our

Read more »

Making Back-to-Back Histograms

June 10, 2014
By
Making Back-to-Back Histograms

A colleage of mine asked me how to do back to back histograms (instead of on top of each other). I feel as though there should be a function like voilin plot from the vioplot package. Voilin plots are good for displaying data, but the violin must have the left and right (or top and

Read more »

The Three Little Pigs

June 8, 2014
By
The Three Little Pigs

Jesse, you asked me if I was in the meth business or the money business. Neither. I’m in the empire business (Walter White in Breaking Bad) The game of pig has simple rules but complex strategies. It was described for the first time in 1945  by a magician called John Scarne. Playing the pig game

Read more »

A simple workflow for using R with Microsoft Office products

June 5, 2014
By
A simple workflow for using R with Microsoft Office products

The challenge of integrating Microsoft products with R software has been an outstanding issue for several years. Reasons for these issues are complicated and related to fundamental differences in developing proprietary vs open-source products. To date, I don’t believe there has been a satisfactory solution but I present this blog as my attempt to work

Read more »

str Implementation for Data Frames

June 5, 2014
By

The str function is perhaps the most useful function in R. It provides great information about the structure of some object. When I teach R, especially for those coming from SPSS, the str function for data frames provides the information they are use to seeing on the variable view tab. However, sometimes I want to display the information str...

Read more »

Cohort analysis with R – “layer-cake graph” (part 2)

Cohort analysis with R – “layer-cake graph” (part 2)

Continue to exploit great idea of ‘layer-cake’ graph. If you like approach I shared in previous topic, perhaps you have one or two questions we should answer. Recall “Total revenue by Cohort” chart : As total revenue depends on number of customers we attracted and on amount of money each of them spent with us, it has sense to... Read More »

Read more »

Are they happy at school? PISA data and visualisation challange @ useR!2014

June 3, 2014
By
Are they happy at school? PISA data and visualisation challange @ useR!2014

I hope you have already heard about DataVis contest at useR!2014 (in case you did not, here is more information: http://www.oecd.org/pisa/pisaproducts/datavisualizationcontest.htm). As a jury member I am not going to submit any work, but I am going to encourage you to play with the data, crunch a finding and submit interesting plot. How easy is

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)