---
title: "bhavs: Download Equity Bhavcopy through RSelenium"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{bhavs}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

## Introduction 

Function ```bhavs``` downloads the zipfile of equity bhavcopy from NSE for the given date through RSelenium. 


``` r
library(nser)
library(RSelenium)

# Start a selenium server and browser either from Google Chrome (Update it to latest version) or from Firefox

#driver <- rsDriver(browser = c("chrome"), port = 3163L, chromever = "91.0.4472.101")
#driver <- rsDriver(browser = c("firefox"), port = 3799L)
 
#remDr <- driver$client

```

Use ```bhavs`` to download the bhavcopy for the given date. 
Mention the date in numeric (ddmmyyyy). Time interval delay in seconds can be adjusted. Default is 0 second. 

``` r
#bhavs("03012000", 2)

# Close the Browser
#remDr$close()

``` 
