:78 Function create_function() is deprecated [8192]

bug in logic of checking whether packages needed to be installed

Marcelo Ponce [2019-07-08 07:23:05]
bug in logic of checking whether packages needed to be installed
Filename
tools/setup.R
diff --git a/tools/setup.R b/tools/setup.R
index 8502812..fa69447 100644
--- a/tools/setup.R
+++ b/tools/setup.R
@@ -21,7 +21,7 @@ NeededPackages <- function(pckges, otherPckgs="", def.mirror='https://cloud.r-pr

 	# deal with packages from CRAN
         needTOinstall <- !(pckges %in% availablePckges)
-	if (sum(needTOinstall) == 0) {
+	if (sum(needTOinstall) != 0) {
 	    cat("Requested packages:")
 	    print(pckges)
 	    cat("installing...", pckges[needTOinstall], '\n')
@@ -32,7 +32,7 @@ NeededPackages <- function(pckges, otherPckgs="", def.mirror='https://cloud.r-pr

 	# deal with packages from BioConductor
         needTOinstall <- !(otherPckgs %in% availablePckges)
-	if (sum(needTOinstall) == 0 ) {
+	if (sum(needTOinstall) != 0 ) {
 	    cat("Requested packages:")
 	    print(otherPckgs)
 	    cat("installing...", otherPckgs[needTOinstall], '\n')
ViewGit