R Under development (unstable) (2024-03-18 r86148 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) > #logger::log_threshold(level=loglevel('ERROR')) > > # Login using Wrong Username or Password > ds = DataClient$new("C:\\Vidya\\dsws\\sami\\DswsRUtilities\\DevR6\\Config.ini") cannot open the connectionERROR [2024-03-19 11:40:38] cannot open the connectionINFO [2024-03-19 11:40:38] DSConnect.R DSConnect$getToken :Getting Token and Token Expiry Please install xml2 packageERROR [2024-03-19 11:40:38] DSConnect.R DSConnect$getToken Please install xml2 packageERROR [2024-03-19 11:40:38] DSConnect.R DSConnect$getToken No response received Warning message: In file(filepath, open = "r", encoding = encoding) : cannot open file 'C:\Vidya\dsws\sami\DswsRUtilities\DevR6\Config.ini': No such file or directory > > # Login using Configuration > # ds = DataClient("Config.ini") > > # Example 1: To retrieve data for tickers VOD and BARC for dattypes PH and PL > # with start and end date as given. The retrived data is captured in a > # dataframe and further the values are displayed in a Chart. > # > > df = tryCatch ({ + print("Retrieving data into dataframe and plot the values") + ds$getDataframe(tickers = "VOD,BARC", fields= list("PH", "PL"), start ='2022-01-12',end = '2022-07-13', kind = 1) + }, + error = function(e) { stop (message(e))}) [1] "Retrieving data into dataframe and plot the values" INFO [2024-03-19 11:40:38] Datastream.R DataClient$getDataframe Getting Data INFO [2024-03-19 11:40:38] Datastream.R DataClient$getData Getting Data You are not logged on. Please recreate the client supplying valid user credentials.Error in value[[3L]](cond) : Calls: tryCatch -> tryCatchList -> tryCatchOne -> Execution halted