Running R Scripts Directly From Dropbox

I have written a little function that allows users to run R scripts out of Dropbox directly from any location. It was aided by this post on biobucket. The reason I am particularly interested in this feature is because I am often using a server to run my R code. This otherwise would require me to upload my R script directly to the server every time I make a change. However, I can instantly test my code on the server by having it run the code remotely since dropbox is very good at detecting changes and updating its database instantly.

# Evaluate code directly from a dropbox filedropbox.eval <- function(x, noeval=F){require(RCurl)# Load the file into memory as a text file with getURL intext <- getURL(paste0("https://dl.dropboxusercontent.com/",x), ssl.verifypeer = FALSE)# For some reason \r seem to be frequently inserted into # the script files that I save. They present a problem# so I remove them using gsub. intext <- gsub("\r","", intext)# Evaluate the input file.if(!noeval)eval(parse(text = intext), envir= .GlobalEnv)# Finally return the dropbox script as text.return(intext)}

I am starting work on a package (RConcerto) meant to provide tools for helping in the production of Concerto online tests. It also includes tools for generating HTML objects. More on this in the future.