RblParse {RblDataLicense}R Documentation

Parse Bloomberg response file and import data

Description

Parse Bloomberg local response files and import the data in R. The PROGRAMNAME in use is auto detected: 'getdata' and 'gethistory' are supported.

Usage

RblParse(file, auto.assign = FALSE, env = parent.frame(), verbose = TRUE)

Arguments

file

character string representing the local file to parse (see RblDownload)

auto.assign

logical. Should results be loaded to env when using PROGRAMNAME=gethistory?

env

where to create objects if auto.assign = TRUE

verbose

logical. Should R report extra information on progress?

Value

PROGRAMNAME=getdata

data.frame containig identifiers (rows) and fields (columns). NULL on failure.

PROGRAMNAME=gethistory

list of xts objects. If auto.assign=TRUE the xts objects are loaded in env and the object names are returned. NULL on failure.

Examples

## Not run: 
# Run RblConnect first

# Build a request file to download the daily closing prices of 
#  EURO STOXX Index from 2005-01-01 to 2015-12-31.
RblRequest <- 
     RblRequestBuilder(
          header = c(FIRMNAME = RblUser(), 
                     PROGRAMNAME = 'gethistory', 
                     DATERANGE = '20050101|20151231'),
          fields = c('PX_LAST'), 
          identifiers = c('SXXE Index')
     )
                                
# Upload the request file
req <- RblUpload(RblRequest)

# Download the response file
out <- RblDownload(req$out)

# Import the data
data <- RblParse(out)
str(data)

## End(Not run)


[Package RblDataLicense version 0.2.5 Index]