As part of Microsoft’s acquisition of Revolution Analytics, Microsoft have turbo-boosted their newly acquired package DeployR. DeployR is a cool way for data scientists to throw their scripts into a repository, which after validation, are exposed via the DeployR API to an application developer to consume.
Further information about DeployR is for another day. This post is about my futile attempts to access data in the base repository.
The deployrExternal() Function
DeployR has a function called deployrExternal() which allows the scripts to access a central repository. Scripts or data can be stored in the “public” folder of the repository, which can then be accessed via any other script using the deployrExternal() function.
You’ve set up your VM, you’ve installed DeployR, and you’ve done a quick test script to check all the relevant functions work.
Boring stuff done - you can now do your cool R stuff, right?
Unfortunately, on executing your deployrExternal() line, you may get this error message:
I spent quite a while uninstalling and reinstalling DeployR, and messing around with the root folders in the
Program Files\\..\deployr repository. Eventually, I purchased a Microsoft Support subscription and got in touch with them. They continually sent me links to different versions of documentation on their website, asking if I had read it, followed by substantial radio silence.
Then … I got a helpful reply! It turns out that the deployrExternal() function does not have access to the base DeployR directory (as at version 8.0.5).
The problem has now been registered as a bug, and they said they will be fixing it in the next release.
One workaround is to hard-code the full file path with the name of the file you’re referencing. It could look something like this:
It’s not great, but the base folder should be static after installation, so is low risk.
Alternatively, Microsoft suggested to use a custom function to replicate deployrExternal():
I hope this helps someone. I’ll update the post if I get a response about a patch or update.