Skip to content
Prev 2849 / 15075 Next

install.packages

Herve Pages <hpages at fhcrc.org> writes:
Actually, I think this occurs when a repository doesn't have any OSX
packages.  The lindsey repository has no OSX packages AFAIK.  You can
reproduce the warning using repos=repos[c(1, 5)].

The warning comes from available.packages (packages.R:67).

I suspect something like the following would be a reasonable fix:

--- a/src/library/utils/R/packages.R
+++ b/src/library/utils/R/packages.R
@@ -64,8 +64,10 @@ available.packages <-
                 on.exit()
             } # end of download vs cached
         } # end of localcran vs online
-        res0 <- cbind(res0, Repository = repos)
-        res <- rbind(res, res0)
+        if(length(res0)) {
+            res0 <- cbind(res0, Repository = repos)
+            res <- rbind(res, res0)
+        }
     }

I'm pretty sure this would come up for other platforms, it is just
more common for CRAN-style repositories to not have any OS X binaries
available.

Best,

+ seth