diff --git a/R/RblQuery.R b/R/RblQuery.R index 51e0d20..c2a7e2b 100644 --- a/R/RblQuery.R +++ b/R/RblQuery.R @@ -43,10 +43,10 @@ #' @examples #' \dontrun{ #' # Run RblConnect first -#' x <- RblQuery(fields = c('PX_LAST', 'PX_OPEN', 'PX_HIGH', 'PX_LOW'), -#' identifiers = c('SXXE Index', "SX5E Index"), -#' from = '2005-01-01') -#' str(x) +#' data <- RblQuery(fields = c('PX_LAST', 'PX_OPEN', 'PX_HIGH', 'PX_LOW'), +#' identifiers = c('SXXE Index', "SX5E Index"), +#' from = '2005-01-01') +#' str(data) #' } #' #' @export diff --git a/R/core.R b/R/core.R index eb55037..981a25a 100644 --- a/R/core.R +++ b/R/core.R @@ -137,11 +137,14 @@ RblFiles <- function(){ #' #' # 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')) +#' RblRequest <- +#' RblRequestBuilder( +#' header = c(FIRMNAME = RblUser(), +#' PROGRAMNAME = 'gethistory', +#' DATERANGE = '20050101|20151231'), +#' fields = c('PX_LAST'), +#' identifiers = c('SXXE Index') +#' ) #' RblRequest #' } #' @@ -214,11 +217,14 @@ RblRequestBuilder <- function(header, fields, identifiers, overrides = c()) { #' #' # 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')) +#' 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) @@ -277,11 +283,14 @@ RblUpload <- function(RblRequest, filename = format(Sys.time(), "%m%d%H%M%S"), v #' #' # 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')) +#' 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) @@ -361,11 +370,14 @@ RblDownload <- function(file, frequency = 60, timeout = 3600, verbose = TRUE) { #' #' # 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')) +#' 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) @@ -375,7 +387,7 @@ RblDownload <- function(file, frequency = 60, timeout = 3600, verbose = TRUE) { #' #' # Import the data #' data <- RblParse(out) -#' data +#' str(data) #' } #' #' @import xts diff --git a/man/RblDownload.Rd b/man/RblDownload.Rd index 52d8172..0a3bd3c 100644 --- a/man/RblDownload.Rd +++ b/man/RblDownload.Rd @@ -29,11 +29,14 @@ If the file is not available yet (i.e. a request file has just been uploaded), t # 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')) +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) diff --git a/man/RblParse.Rd b/man/RblParse.Rd index ce7c004..d99f4bb 100644 --- a/man/RblParse.Rd +++ b/man/RblParse.Rd @@ -31,11 +31,14 @@ Parse Bloomberg local response files and import the data in R. The PROGRAMNAME i # 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')) +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) @@ -45,7 +48,7 @@ out <- RblDownload(req$out) # Import the data data <- RblParse(out) -data +str(data) } } diff --git a/man/RblQuery.Rd b/man/RblQuery.Rd index ecc20b1..6030274 100644 --- a/man/RblQuery.Rd +++ b/man/RblQuery.Rd @@ -70,10 +70,10 @@ The following routine to query Bloomberg is implemented: \examples{ \dontrun{ # Run RblConnect first -x <- RblQuery(fields = c('PX_LAST', 'PX_OPEN', 'PX_HIGH', 'PX_LOW'), - identifiers = c('SXXE Index', "SX5E Index"), - from = '2005-01-01') -str(x) +data <- RblQuery(fields = c('PX_LAST', 'PX_OPEN', 'PX_HIGH', 'PX_LOW'), + identifiers = c('SXXE Index', "SX5E Index"), + from = '2005-01-01') +str(data) } } diff --git a/man/RblRequestBuilder.Rd b/man/RblRequestBuilder.Rd index 02ea994..544612a 100644 --- a/man/RblRequestBuilder.Rd +++ b/man/RblRequestBuilder.Rd @@ -28,11 +28,14 @@ Refer to the Documentation to build the request. # 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')) +RblRequest <- + RblRequestBuilder( + header = c(FIRMNAME = RblUser(), + PROGRAMNAME = 'gethistory', + DATERANGE = '20050101|20151231'), + fields = c('PX_LAST'), + identifiers = c('SXXE Index') + ) RblRequest } diff --git a/man/RblUpload.Rd b/man/RblUpload.Rd index 9bb9da4..f391aa5 100644 --- a/man/RblUpload.Rd +++ b/man/RblUpload.Rd @@ -32,11 +32,14 @@ The response file needs to be downloaded (see \code{\link{RblDownload}}) and par # 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')) +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)