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:
data(mtcars)
library(ggplot2)
data(mtcars) # Creating scatter plot of mpg vs hp
ggplot(mtcars, aes(x = hp, y = mpg)) + geom_point(aes(color = factor(cyl), shape = factor(gear)), size = 3) + labs( title = "Relationship Between Horsepower and Fuel Efficiency", subtitle = "Miles per Gallon (mpg) vs Horsepower (hp) in mtcars Dataset", x = "Horsepower (hp)", y = "Miles Per Gallon (mpg)", color = "Number of Cylinders", shape = "Number of Gears", caption = "Data Source: mtcars dataset" ) + theme_minimal()