[Seqinr-commits] r1707 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 15 11:04:05 CET 2009


Author: lobry
Date: 2009-11-15 11:04:05 +0100 (Sun, 15 Nov 2009)
New Revision: 1707

Modified:
   pkg/R/where.is.this.acc.R
Log:
stopAtFirst argument suggested by Avril Coghlan

Modified: pkg/R/where.is.this.acc.R
===================================================================
--- pkg/R/where.is.this.acc.R	2009-11-12 18:11:08 UTC (rev 1706)
+++ pkg/R/where.is.this.acc.R	2009-11-15 10:04:05 UTC (rev 1707)
@@ -1,7 +1,7 @@
-where.is.this.acc <- function(acc, ...){
-	#
-	# Argument check:
-	#
+where.is.this.acc <- function(acc, stopAtFirst = TRUE, ...){
+  #
+  # Argument check:
+  #
   if(!is.character(acc)) stop("string expected for argument acc")
   #
   result <- character(0)
@@ -33,6 +33,9 @@
       result <- c(result, banks[i])
     }
     closebank()
+    if(length(result) != 0 && stopAtFirst){
+      return(invisible(result))
+    }
   }
 }
 #



More information about the Seqinr-commits mailing list