R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

exdata <- read.csv("~/Desktop/Data/gardacyr.csv")
summary(exdata)
##                                        Crime     
##  Burglary and related offences            : 364  
##  Controlled drug offences                 : 364  
##  Damage to property and to the environment: 364  
##  Dangerous or negligent acts              : 364  
##  Fraud, deception and related offences    : 364  
##  Kidnapping and related offences          : 364  
##  (Other)                                  :2156  
##                     Division         Year          Number      
##  Cavan/Monaghan Division: 155   Min.   :2003   Min.   :   0.0  
##  Clare Division         : 155   1st Qu.:2006   1st Qu.: 107.0  
##  Cork City Division     : 155   Median :2009   Median : 388.0  
##  Cork North Division    : 155   Mean   :2009   Mean   : 754.4  
##  Cork West Division     : 155   3rd Qu.:2012   3rd Qu.: 947.2  
##  D.M.R. Eastern Division: 155   Max.   :2015   Max.   :9999.0  
##  (Other)                :3410

Including Plots

You can also embed plots, for example:

library (ggplot2)
ggplot(iris, aes(Sepal.Length,Petal.Length,col =Species))+geom_point()+geom_smooth()+geom_boxplot()
## `geom_smooth()` using method = 'loess'
## Warning: position_dodge requires non-overlapping x intervals

library (ggplot2)
ggplot(exdata, aes(Year,Number,col =Crime))+geom_line()

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.