* using log directory 'd:/RCompile/CRANincoming/R-devel/DatastreamR.Rcheck' * using R Under development (unstable) (2024-03-11 r86098 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'DatastreamR/DESCRIPTION' ... OK * this is package 'DatastreamR' version '2.0.3' * package encoding: UTF-8 * checking CRAN incoming feasibility ... NOTE Maintainer: 'LSEG (LSEG) ' New submission Possibly misspelled words in DESCRIPTION: Datastream (2:22, 10:38, 10:65) The Title field should be in title case. Current version is: 'R package for Datastream Web Services API' In title case that is: 'R Package for Datastream Web Services API' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking serialization versions ... OK * checking whether package 'DatastreamR' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... NOTE Authors@R field gives persons with invalid ORCID identifiers: LSEG (LSEG) [aut, cre] (YOUR-ORCID-ID) * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... WARNING Warning: S4 exports specified in 'NAMESPACE' but not defined in package 'DatastreamR' * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... WARNING Undocumented code objects: 'DSTimeSeriesCarryIndicator' 'DSTimeSeriesDataInput' 'DSTimeSeriesDateAlignment' 'DSTimeSeriesDateInfo' 'DSTimeSeriesDateRange' 'DSTimeSeriesFrequencyConversion' 'DSTimeSeriesRequestObject' 'DSUserObjectAccessRights' 'DSUserObjectFrequency' 'DSUserObjectResponseStatus' 'DSUserObjectShareTypes' 'DataClient' 'TimeSeriesClient' All user-level objects in a package should have documentation entries. See chapter 'Writing R documentation files' in the 'Writing R Extensions' manual. * checking for code/documentation mismatches ... WARNING Functions or methods with usage in Rd file 'hello.Rd' but not in code: 'hello' * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking examples ... ERROR Running examples in 'DatastreamR-Ex.R' failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: hello > ### Title: Hello, World! > ### Aliases: hello > > ### ** Examples > > hello() Error in hello() : could not find function "hello" Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [27s] ERROR Running 'Test_GetData.R' Running 'Test_UCTS.R' Running 'test_GetDataBundle.R' Running 'test_GetData_EconCC.R' Running 'test_GetData_Expressions.R' Running 'test_GetData_Lists.R' Running 'test_GetData_RespClass.R' Running 'test_GetData_SymbolSub.R' Running 'test_GetData_plot.R' Running 'test_UCTS_CreateItem.R' Running 'test_UCTS_DeleteItem.R' Running 'test_UCTS_GetAllItems.R' Running 'test_UCTS_GetItem.R' Running 'test_UCTS_UpdateItem.R' Running 'testthat.R' Running the tests in 'tests/Test_GetData.R' failed. Complete output: > library(DatastreamR) > #logger::log_threshold(level=loglevel('ERROR')) > > # Login using Wrong Username or Password > ds = DataClient$new(NULL, "YourId", "YourPwd") INFO [2024-03-13 10:17:17] DSConnect.R DSConnect$getToken :Getting Token and Token Expiry could not find function "DSFault"ERROR [2024-03-13 10:17:17] DSConnect.R DSConnect$getToken could not find function "DSFault"ERROR [2024-03-13 10:17:17] DSConnect.R DSConnect$getToken No response received > > # 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-13 10:17:17] Datastream.R DataClient$getDataframe Getting Data INFO [2024-03-13 10:17:17] 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 Running the tests in 'tests/test_UCTS_UpdateItem.R' failed. Complete output: > ProcessTimeseriesResponse = function(tsResponse, tsName) + { + if (!is.null(tsResponse)) + { + # Any request dealing with a single user created item returns a + # DSUserObjectResponse. This has ResponseStatus property that indicates + # success or failure + if (tsResponse$ResponseStatus != DSUserObjectResponseStatus$UserObjectSuccess) + print(paste('Request failed for timeseries', tsName, 'with error ', names(DSUserObjectResponseStatus)[tsResponse$ResponseStatus + 1], ': ', tsResponse$ErrorMessage, '\n\n')) + else if (!is.null(tsResponse$UserObject)) # The timeseries item won't be returned if you set SkipItem true in CreateItem or UpdateItem + { + # Here we simply display the timeseries data using a dataframe. + tsItem = tsResponse$UserObject + metadata = c (Id = tsItem$Id, + Desc = tsItem$Description, + LastModified = as.character(tsItem$LastModified), + StartDate = ifelse (!is.null(tsItem$DateInfo), as.character(tsItem$DateInfo$StartDate), NULL), + EndDate = ifelse(!is.null(tsItem$DateInfo),as.character(tsItem$DateInfo$EndDate), NULL), + Frequency = ifelse(!is.null(tsItem$DateInfo), names(DSUserObjectFrequency)[tsItem$DateInfo$Frequency + 1], NULL), + NoOfValues = ifelse(!is.null(tsItem$DateRange), tsItem$DateRange$ValuesCount , 0)) + df = data.frame(metadata) + print(df) + + if (!is.null(tsItem$DateRange)) + { + df = data.frame(Dates = sapply(tsItem$DateRange$Dates, + FUN = function(x) + { return (as.character(x)) }), + Values = sapply(tsItem$DateRange$Values, + FUN = function(x) + { ifelse (is.null(x), return (NA_character_ ), return (x) )} )) + # Values if NULL, is printed as because, while + # convertind list to vector either by using as.vector or sapply, + # the NULL values in the list are deleted. and thus there will + # be mismatch in no of rows and cannot be put in a dataframe + print(df) + } + } + } + else + print(paste('Timeseries ', tsName, ' successfully updated but item details not returned.')) + } > > testID = 'TSVVV023' > > # Modifying 'TSVVV023' it to be a daily frequency > # series with data from 2000 until 2020. > > # we'll get the list of supported dates between the start and end date. > startDate = as.Date('2000-01-01') > endDate = as.Date('2020-12-31') > freq = DSUserObjectFrequency$Daily Error: object 'DSUserObjectFrequency' not found Execution halted Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(DatastreamR) > > test_check("DatastreamR") Error in `test_dir()`: ! No test files found Backtrace: ▆ 1. └─testthat::test_check("DatastreamR") 2. └─testthat::test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") 3. └─rlang::abort("No test files found") Execution halted * checking PDF version of manual ... [27s] OK * checking HTML version of manual ... OK * DONE Status: 2 ERRORs, 3 WARNINGs, 3 NOTEs