I am trying to replace a column in my data with the output of function: bdp(column + "equity", "GICS_SECTOR NAME")
Require(Rblpapi)
#Create raw data example
ticker <- c(2,3,4,5,6)
sector <- c(NA,NA,NA,NA,NA)
dataraw <- data.frame(ticker, random)
dataraw$sector <- bdp("dataraw$ticker Equity", "GICS_SECTOR_NAME")
This does not work due to "" making it text only and I have to add the word "Equity" e.g. IBM Equity. An example of it working perfectly would be bdp("IBM Equity", "GICS_SECTOR_NAME")
You can add the "Equity" part using paste and use the resulting ticker as an argument to
bdp
: