Skip to content

Commit

Permalink
mute error massage when starting in Rstudio.
Browse files Browse the repository at this point in the history
  • Loading branch information
talgalili committed Aug 18, 2013
1 parent e143e85 commit 6650d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/zzz.r
Expand Up @@ -81,7 +81,7 @@ remove.installr.GUI <- function() {
# Thanks for Romain: http://stackoverflow.com/questions/4369334/first-lib-idiom-in-r-packages

# adding and removing menus from the Rgui when loading and detaching the library
setHook(packageEvent("installr", "attach"), {function(pkgname, libpath) {add.installr.GUI()} } )
setHook(packageEvent("installr", "attach"), {function(pkgname, libpath) {tryCatch(add.installr.GUI(), error = function(e) invisible(FALSE))} } )
setHook(packageEvent("installr", "detach"), {function(pkgname, libpath) {remove.installr.GUI()} } )

}
Expand Down

0 comments on commit 6650d3f

Please sign in to comment.