Get a path to your Dropbox folder

[This article was first published on Apply R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I am currently designing my RStudio – Dropbox – Mardown/Knitter/Wordpress – Github workflow. One problem is that working on multiple machines with different version of Windows means I somehow need to tell R where my Dropbox folder is located.

I used to set the working directory at the beginning of my R scripts but it became tedious to change the path all the time. The solution might be to add definition of ‘dropbox.folder.path’ variable to .Rprofile files. Or there is a hard way – to write a script detecting Dropbox location automatically.

I have found this hint and created the script below. It is for Windows only (because I do not have Dropbox on the cluster). However, it should be easy to modify it for linux / MacOS if needed (see this shell script).


To leave a comment for the author, please follow the link and comment on their blog: Apply R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)