TestFile.rmd

This is my first RMD file

**** test.rmd - start - not to be included in the test.rmd file

This is the main heading

This is a secondary heading

This is a tertiary heading

This text will appear bold!
This text will also appear bold!

This text will appear in italics!
This text will also appear in italics!

Ordered Lists

  1. first item in list
  2. second item in list
  3. third item in list

Unordered Lists - 1
* first item in list
* second item in list
* third item in list

Unordered Lists - 2

Block Quote
> Ordered Lists
> 1. first item in list
> 2. second item in list
> 3. third item in list
> Unordered Lists
> - first item in list
> - second item in list
> - third item in list

Block Code - 1

    > Ordered Lists  
    > 1. first item in list  
    > 2. second item in list  
    > 3. third item in list  
    > Unordered Lists  
    > - first item in list  
    > - second item in list  
    > - third item in list  

Image Rstudio logo

Links RStudio Maexdata

knitr Global Options

# for development
knitr::opts_chunk$set(echo=TRUE, eval=TRUE, error=TRUE, warning=TRUE, message=TRUE, cache=FALSE, tidy=FALSE, fig.path='figures/')
# for production
knitr::opts_chunk$set(echo=TRUE, eval=TRUE, error=FALSE, warning=FALSE, message=FALSE, cache=FALSE, tidy=FALSE, fig.path='figures/')
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

Including plots

you can also embed plots, for example:

plot(pressure)

Load Libraries

library(dplyr)
library(tidyr)

Load Nifty

dfrNifty <- read.csv("./data/nifty-data.csv", header=T, stringsAsFactors=F)
nrow(dfrNifty)
## [1] 2100
head(dfrNifty)
##      RecDate Mkt Series  Sector     Symbol NameOfTheSecurityInNse
## 1 2014-12-01   N     EQ  Cement        ACC            ACC LIMITED
## 2 2014-12-01   N     EQ  Cement  AMBUJACEM     AMBUJA CEMENTS LTD
## 3 2014-12-01   N     EQ    FMCG ASIANPAINT   ASIAN PAINTS LIMITED
## 4 2014-12-01   N     EQ FinSrvc   AXISBANK      AXIS BANK LIMITED
## 5 2014-12-01   N     EQ    Auto BAJAJ-AUTO     BAJAJ AUTO LIMITED
## 6 2014-12-01   N     EQ FinSrvc BANKBARODA         BANK OF BARODA
##   PrevClose OpenPrice HighPrice LowPrice ClosePrice TradeValue TradeQty
## 1   1475.35   1476.00    1479.7  1461.15    1470.95  202553784   137735
## 2    229.90    229.25     233.5   228.55     230.35  348745207  1512068
## 3    744.70    753.95     802.2   753.10     797.05 2576774020  3291847
## 4    481.20    484.40     493.2   481.15     489.15 2267475272  4634567
## 5   2640.80   2642.50    2660.8  2613.05    2636.30  527142941   199683
## 6   1087.20   1091.00    1104.7  1074.35    1082.65 1447645708  1328730
##   IndSec CoprInd Trades X52W_High X52W_Low
## 1      Y           6422   1564.65   970.15
## 2      Y          19712    243.80   150.10
## 3      Y          68366    802.20   460.20
## 4      Y          53177   2043.05   369.05
## 5      Y          10121   2695.00  1793.20
## 6      Y          29489   1104.70   511.15
maxSpeedVal <- max(cars$speed)
maxDistsVal  <- max(cars$dist)

The maximum speed is 25
The maximum dist is 120