Note: This problem can only be replicated if one has a Thomson Reuters Datastream login
I am attempting to request data from Thomson Reuters Datastream using RDatastream::ds
but cannot successfully request data. It seems that the problem has got to do with the specification of my login credentials in the 'user' argument of the ds
function.
How do I specify the 'user' argument correctly to make requests?
This is an example unsuccessful request I have attempted, copied straight from the package documentation:
ds(user, c("U:IBM", "U:MMM"), c("P", "PO"), "2012-07-20")
This is the subsequent error:
Error in apply(records, 2, function(record) { :
dim(X) must have a positive length
So far I have:
- Tried to follow the package documentation where it specifies that login credentials in the 'user' argument must be given in list, with values being username and password. I have tried 2 specifications in the argument:
a) user <- list(username= "my username", password="my password")
b) user <- list(username= "DS: my username", password="my password")
The second specification is attempted because the documentation examples append 'DS:'
at the start of the username. Both of the user specifications give the same aforementioned error.
- Looked at responses by the package author to R users that had the same problem, found here: https://github.com/fcocquemas/rdatastream/issues/1
Namely, I have tried appending 'DS:'
to username and replacing @
in the username with @
. Notably, my username is an email package but author suggested that the username should be ~7 alphanumeric characters. Though I am hoping to get work around my issue making requests with ds
without having to request an alternative username from Thomson Reuters if possible.
Lastly, I am able to make successfully make requests using the the Thomson Reuters desktop app and Excel add in, where I use the same login credentials that I am feeding into the ds
package.