[rkward-cvs] SF.net SVN: rkward:[3826] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ rk.utility-functions.R

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Sep 25 12:29:45 UTC 2011


Revision: 3826
          http://rkward.svn.sourceforge.net/rkward/?rev=3826&view=rev
Author:   tfry
Date:     2011-09-25 12:29:45 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
Fix for the case that exactly one installed package remains as candidate.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.utility-functions.R

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.utility-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.utility-functions.R	2011-09-24 23:50:00 UTC (rev 3825)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.utility-functions.R	2011-09-25 12:29:45 UTC (rev 3826)
@@ -113,19 +113,19 @@
 "rk.old.packages" <- function (lib.loc = NULL, repos = getOption("repos"), contriburl = contrib.url(repos, type), instPkgs = installed.packages(lib.loc = lib.loc),
                              method, available = NULL, checkBuilt = FALSE, type = getOption("pkgType")) {
 	if (is.null (lib.loc)) lib.loc <- .libPaths ()
-	if (is.null (available)) available <- available.packages ()
+	if (is.null (available)) available <- available.packages (contriburl=contriburl, method=method)
 
 	seen.packages <- character (0)
 	old <- NULL
 	for (l in lib.loc) {
 		# check packages in one location at a time
-		inst <- instPkgs[instPkgs[,"LibPath"] == l,]
+		inst <- instPkgs[instPkgs[,"LibPath"] == l, , drop=FALSE]
 		old <- rbind (old, 
 			old.packages (lib.loc=l, repos=repos, contriburl=contriburl, instPkgs=inst, method=method, available=available, checkBuilt=checkBuilt, type=type))
 
 		# and discard any which are masked, before looking at further locations
 		seen.packages <- c (seen.packages, inst[, "Package"])
-		instPkgs <- instPkgs[!(instPkgs[, "Package"] %in% seen.packages),]
+		instPkgs <- instPkgs[!(instPkgs[, "Package"] %in% seen.packages), , drop=FALSE]
 	}
 	old
 }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list