Learn R Programming

bcr (version 0.1.1)

stock: Stock prices

Description

Scraps Le Boursier's and gets the historical prices for the specified companies.

Usage

stock(x)

stocks(...)

Arguments

x, ...

Company name as returned by the get_today() function

Value

Returns a data.frame containing all the historical data for the specified stock.

  • date: the date of the given record.

  • open: the opening price of the stock on date.

  • high: the highest price.

  • low: the lowest price.

  • close: the closing price.

  • volume: Volume of stocks traded on date.

If the plural variant is used it'll add a symbol column that'll contain the name of the company.

Examples

Run this code
# NOT RUN {
head(stock("Wafa Assur"), 20)
head(stock(), 20) # same as runing stock("MASI")
head(stock("MADEX"), 20)
head(stocks("Masi", "MADEX"), 20)
# }

Run the code above in your browser using DataLab