c++ - how to read msg file with R -


i use r lot process financial data, e.g. cds spreads, correlation of tranche data, time series... ...

now have periodic data update bloomberg via email, , data text in email (not attachment file), wanna write function read data them (hundreds of emails, .msg extention), , save excel.

does 1 have hint on how read data? prefer r, c++ works if r cannot it.

here format of email (part of):>>>>>

$$ jpm cdx options: hy19 aug expiry  update - ref 102⅜[~354bp]                bond put          bond call  k [~sprd]|sep13>pay   dlt |sep13>rcv   dlt |midvol [sprdvol] 108 [313] |  355 365   92% |    5 13     8% |  5.4% [ 40%] 107 [335] | 243½253½ 85% |   23 36    17% |  7.8% [ 33%] 106 [369] |  203 213   77% |  52½62½  28% |  7.1% [ 34%] 105 [387] |  147 167   59% |  99½116½ 41% |  9.3% [ 46%] 

here start:

email  <- "$$ jpm cdx options: hy19 aug expiry  update - ref 102⅜[~354bp]                bond put          bond call  k [~sprd]|sep13>pay   dlt |sep13>rcv   dlt |midvol [sprdvol] 108 [313] |  355 365   92% |    5 13     8% |  5.4% [ 40%] 107 [335] | 243½253½ 85% |   23 36    17% |  7.8% [ 33%] 106 [369] |  203 213   77% |  52½62½  28% |  7.1% [ 34%] 105 [387] |  147 167   59% |  99½116½ 41% |  9.3% [ 46%]" email ll <- readlines(textconnection(email)) mm <- read.table(text=ll[-c(1,2)],sep='|',header=true)    k...sprd.  sep13.pay...dlt  sep13.rcv...dlt midvol..sprdvol. 1 108 [313]    355 365   92%      5 13     8%       5.4% [ 40%] 2 107 [335]     243½253½ 85%     23 36    17%       7.8% [ 33%] 3 106 [369]    203 213   77%      52½62½  28%       7.1% [ 34%] 4 105 [387]    147 167   59%      99½116½ 41%       9.3% [ 46%] 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -