A simple example

ABCD
GHI

Read-And-Delete

  1. Introduction
  2. how to write an equation
  3. Plot in R
  4. Conclusion

Writting an Equations in R

$ CMR = \hat{ \alpha } + \ \hat{ \beta}PGNP + \ \hat{ \gamma } FLR + \ \hat{ \epsilon } $

where : CMR = Child Mortality Rate PGNP = per capita GNP FMR = Female Literacy Rate

plot(cars, pch = 20, col = "blue")

plot of chunk unnamed-chunk-1

Code with output

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

code without the output

summary(cars)

How to read data in slidify

setwd("C:/Users/agohil/Book")
data = read.csv("final.csv" , sep = ",", header = TRUE)
head(data)
##   Income Consumption
## 1    200         130
## 2    450         300
## 3    200          50
## 4    300         220
## 5    600         450
## 6    550         140

Including a table in your slide

knitr::kable(data)
Income Consumption
200 130
450 300
200 50
300 220
600 450
550 140
150 80

embedding an image in presentation

image:

library(googleVis)
## Warning: package 'googleVis' was built under R version 3.1.2
op <- options(gvis.plot.tag='chart')
## Add the mean
CityPopularity$Mean=mean(CityPopularity$Popularity)
CC <- gvisComboChart(CityPopularity, xvar='City',
          yvar=c('Mean', 'Popularity'),
          options=list(seriesType='bars',
                       width=450, height=300,
                       title='City Popularity',
                       series='{0: {type:\"line\"}}'))
plot(CC)