Skip to content
Browse files

mute error massage when starting in Rstudio.

  • Loading branch information...
1 parent e143e85 commit 6650d3f514b078ed746bfab9fa449924625b6ce9 @talgalili committed Aug 18, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 R/zzz.r
View
2 R/zzz.r
@@ -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()} } )
}

0 comments on commit 6650d3f

Please sign in to comment.
Something went wrong with that request. Please try again.