Created
July 15, 2012 01:52
-
-
Save jknowles/3114394 to your computer and use it in GitHub Desktop.
Source an R script hosted in Dropbox from R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Made by Jared Knowles | |
# Not necessarily going to work for scripts outside of the Public folder | |
# Not recommended for production use | |
# myurl must be a character string with the full public link of the script file | |
# Problem--we can't use URL shorteners | |
dropbox_source<-function(myurl){ | |
s<-str_extract(myurl,"[/][a-z][/]\\d+[/][a-z]*.*") | |
new_url<-paste("http://dl.dropbox.com",s,sep="") | |
source(new_url) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment