R Under development (unstable) (2024-03-11 r86098 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(DatastreamR) > > # Login using Configuration > ds = DataClient$new("Config.ini") INFO [2024-03-13 10:17:27] DSConnect.R DSConnect$getToken :Getting Token and Token Expiry INFO [2024-03-13 10:17:27] DSConnect.R DSConnect$getJsonResponse Web response received > > df = tryCatch ({ + ds$getDataframe('ECON', list('DS.ECONCC(startdate=2023-06-07)'), kind=0) + }, + error = function(e){ + stop (message(e)) + } + ) INFO [2024-03-13 10:17:27] Datastream.R DataClient$getDataframe Getting Data INFO [2024-03-13 10:17:27] Datastream.R DataClient$getData Getting Data INFO [2024-03-13 10:17:28] DSConnect.R DSConnect$getJsonResponse Web response received Warning message: NAs introduced by coercion > print(df) [,1] ECON|DS.ECONCC(startdate=2023-06-07)|NA "Requested date cannot be earlier than 28 days ago" > > > > df = tryCatch ({ + ds$getData('ECON', list('DS.ECONCC(sequence=293327674)'), kind=0) + }, + error = function(e){ + stop (message(e)) + } + ) INFO [2024-03-13 10:17:28] Datastream.R DataClient$getData Getting Data INFO [2024-03-13 10:17:28] DSConnect.R DSConnect$getJsonResponse Web response received > print(df) Public: DataResponse: DSDataResponse, R6 Properties: list clone: function (deep = FALSE) initialize: function (dataResponse, properties, useNaNforNotANumber) > > > proc.time() user system elapsed 0.71 0.18 1.53