updateStockByName: (HRJ) Add stock number to HRJ data frame based on its three...

Description Usage Arguments Value Examples

Description

(HRJ) Add stock number to HRJ data frame based on its three letter stock name.

Usage

1
updateStockByName(df, stockdat, by.x = "StockID", by.y = "StockID")

Arguments

df

A data frame with column "stock.name" containing the three letter stock name.

stockdat

A data frame with columns "Stock.Number" and "StockID". "StockID" contains the three letter stock name. This data frame is obtained using readStockData.

Value

The function returns a data frame, same as used for the first argument, but with a "stock.number" column.

Examples

1
2
3
4
5
6
## Not run: 
data.stock <- readStockData( 'STOCFILE.STF')
hrj.list <- readHRJtext(filepath)
hrj.list$hrj.cwt.list <- lapply(hrj.list$hrj.cwt.list, updateStockByName, data.stock$stocks.df)

## End(Not run)

MichaelFolkes/ctctools documentation built on May 7, 2019, 4:56 p.m.