If you go with the R package route, and:
- you want you're user's to know when their package is out of date
- your package code is in a git repo (always a good idea)
- your users install the package using
devtools::install_git("path/to/package/git/repo")
then you can add these lines to your package's .onload() method (documented here and here: ?.onLoad):
# Check if the package is up to date
pd <- packageDescription(pkgname)
out_of_date_message_template <-
'Your copy of package %s is not up to date.\nUse devtools::install_git("%s") to update this package\n'
if(identical(pd$RemoteType,"git")){
try({
# get the hash of the remote repo
out_file <- tempfile()
on.exit(unlink(out_file))
failed <- system2("git",sprintf('ls-remote "%s"',pd$RemoteUrl),stdout = out_file)
if(failed)
return() # failed to get the git repo hash
remotes <- readLines(out_file)
if(!identical(pd$RemoteSha,gsub("\t.*","",remotes[1])))
packageStartupMessage(
sprintf(out_of_date_message_template,
pkgname,
gsub("\\\\","\\\\\\\\",pd$RemoteUrl)))
})
}
then when you push an update to your network git repo, users with out of date code will get this message when they call library(my_app)
Your copy of package my_app is not up to date.
Use devtools::install_git("path\\to\\package\\git\\repo") to update this package
devtools::install("path/to/my/code")to install the Shiny app onto each computer. Hadley Wickham's excellent guide to building R packages has more on that solution (this is more R specific and probably a bit more of an investment than git)