Use R to get a public link to a Dropbox file

I have several R functions that save files for window deletion (mostly graphics). This allows me to share them online as a web address. These functions will save the charts and automatically open them and the Dropbox directory in which they are located. I'm all about laziness / efficiency (depending on your perspective) and, unfortunately, when I finish, I still need to right-click the file I and then Dropbox / copy public link. I would like R to get this public link if possible (one day I will have what I will be even more lazy and write directly to the clipboard).

+8
r dropbox
source share
1 answer

you can use CLI for Dropbox and system function (I'm on Linux) R.

I have a png file (interpolation.png) in my shared folder, if I need a public link, I can do something like this:

getwd() [1] "/home/ahmadou/Dropbox/Public" system('dropbox puburl interpolation.png ', intern = TRUE) [1] "https://dl.dropbox.com/u/8750577/interpolation.png" 

Hope for this help

+16
source share

All Articles