Histograms are used very often in public health to show the distributions of your independent and dependent variables. Although the basic command for histograms (hist()) in R is simple, getting your histogram to look exactly like you want takes g...

Having got my NHS Winter sitrep data scraper into shape (I think!), and dabbled with a quick Shiny demo using the R/Shiny library, I thought I’d tidy it up a little over the weekend and long the way learn a few new presentation tricks. To quickly recap the data availability, the NHS publish a weekly

This is a follow on from the post Using apply sapply and lappy in R.The dataset we are using was created like so:m <- matrix(data=cbind(rnorm(30, 0), rnorm(30, 2), rnorm(30, 5)), nrow=30, ncol=3)Three columns of 30 observations, normally distributed with means of 0, 2 and 5. We want a density plot to compare the distributions of the three columns...

On November, the 27th, a special post took my interest. Scott Mutchler presented a small framework for predictive analytics based on the PMML (Predictive Model Markup Language) and a Java-based REST-Interface. PMML is a XML based standard for the description and exchange of analytical models. The idea is that every piece of software which supports the corresponding...

In case you missed them, here are some articles from November of particular interest to R users. In the webinar "Real-Time Predictive Analytics with Big Data", I showed how R fits into a real-time production system. R package developer Yihui Xie shares his favorite software and hardware in an interview with The Setup. Hadley Wickham created a handy tutorial...

Statistical plots drawn with the ggplot2 package generate numerous grid grobs and viewports which are labelled and organised into a coherent hierarchy. This report describes an example that shows how to manipulate the grobs and viewports in a ggplot2 plot … Continue reading →

Redos of the plots from this post: Bit more communicative, though the overplotting is a bit annoying. Code: ## gis libraries library(spBayes) library(MBA) library(geoR) library(fields) library(sp) library(maptools) library(rgdal) library(classInt) library(lattice) library(xtable) library(spatstat) library(splancs) ## Other packages library(ggplot2) library(foreign) library(stringr)...

A few quick plots of West Baltimore neighborhoods, first Sandtown-Winchester: and Harlem Park: These aren’t very polished, I’ll put up better versions. Here’s the code for those that want it: ## gis libraries library(spBayes) library(MBA) library(geoR) library(fields) library(sp) library(maptools) library(rgdal)...