R for Public Health library(ggplot2) library(gridExtra) mtc <- mtcars head(mtc) mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6…
View More ggplot2 Cheatsheet from R for Public HealthCategory: R
How to format plots for publication using ggplot2
The following is the code from a presentation made by Rosemary Hartman to the Davis R Users’ Group. I’ve run the code through the spin…
View More How to format plots for publication using ggplot2ggplot2 Quick Reference: Themes
A plot can be themed by adding a theme. ggplot2 provides two built-in themes: theme_grey() – the default theme, with a grey background theme_bw() –…
View More ggplot2 Quick Reference: ThemesUsing RStudio as an interactive GIS with Leaflet
Kyle Walker, Texas Christian University February 17, 2015 Web: http://personal.tcu.edu/kylewalker Twitter: https://twitter.com/kyle_e_walker For exploratory GIS work, I have hesitated to use R instead of ArcGIS…
View More Using RStudio as an interactive GIS with LeafletMaps with R
This is the first post of a short series to show some code I have learnt to produce maps with R. NOTE: Although the procedure…
View More Maps with RPlume Model
For this workshop session we will consider a release of pollution from a point source. The scenario is that a pollution release from a research…
View More Plume ModelCrime Data Mapping
For this workshop session we’ll read in some data and do some basic mapping. We need a number of packages for this. library(“sp”) library(“raster”) library(“rgdal”)…
View More Crime Data MappingSpatial Cheatsheet
This cheatsheet is an attempt to supply you with the key functions and manipulations of spatial vector and raster data. It does not have examples…
View More Spatial Cheatsheethow to send email with attachment from R in windows
sendmailR works for me on Windows 7. I referenced http://cran.es.r-project.org/web/packages/sendmailR/sendmailR.pdf smtpServer= info for Outlook 2010 is in File -> Account Settings -> Account Settings ->…
View More how to send email with attachment from R in windowsManipulating Data Frames Using sqldf – A Brief Overview
By Josh Mills Introduction For those who are learning R and who may be well-versed in SQL, the sqldf package provides a mechanism to manipulate…
View More Manipulating Data Frames Using sqldf – A Brief Overview