Created
October 8, 2012 06:02
-
-
Save alexland/3850956 to your computer and use it in GitHub Desktop.
for programatic update of an R package--avoid having to use complete filename with version appended
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
pkg_name = paste("~/path/to/package", system('cd /path/to/package; ls adStats*', intern=T), sep="/") | |
install.packages(pkg_name, repos=NULL, type="source") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated to be added to .RProfile without resulting in infinite loop
install_command = paste("R --vanilla CMD install ~/'path/to/package'", system("cd ~/'path/to/package'; ls adStats*", intern=T), sep="/")
system(install_command, intern=T)