Press "Enter" to skip to content

Visualizations In Five Lines Of Code

David Smith highlights a Sharon Machlis article showing visualizations in up to five lines of R code:

I’ve reproduced Sharon’s code and charts below. I did make a couple of tweaks to the code, though. I added a call to checkpoint(“2016-08-22”) which, if you’ve saved the code to a file, will install all the necessary packages for you. (I also verified that the code runs with package versions as of today’s date, and if you’re trying out this code at a later time it will continue to do so, thanks to checkpoint.) I also modifiedĀ the data download code to make it work more easily on Windows. Here are the charts and code

It’sĀ really easy to get basic visualizations within R, and these are better than basic visualizations.