]> git.donarmstrong.com Git - ape.git/blobdiff - R/read.nexus.data.R
various fixes and small news
[ape.git] / R / read.nexus.data.R
index 076173c3de32206c567ea1d974326afcd8650955..cd261a40ab6d7463177fffca40a18526b03b51af 100644 (file)
@@ -2,7 +2,8 @@
 {
     # Simplified NEXUS data parser.
     #
-    # Version: 09/13/2006 01:01:59 PM CEST 
+    # Version: 09/13/2006 01:01:59 PM CEST
+    #          (modified by EP 2011-06-01)
     #
     # By:      Johan Nylander, nylander @ scs.fsu.edu
     #
@@ -53,7 +54,7 @@
     }
 
     "trim.whitespace" <- function (x)
-    { 
+    {
         gsub("\\s+", "", x)
     }
 
         gsub(";", "", x)
     }
 
-    if(file.access(file, mode = 4)) {
-        stop("file could not be found")
-    }
-
     X <- scan(file = file, what = character(), sep = "\n",
               quiet = TRUE, comment.char = "[", strip.white = TRUE)
     ntax <- find.ntax(X)
         tot.ntax <- tot.ntax + 1
         if (tot.ntax == ntax) {
             i <- 1
-            tot.ntax <- 0 
+            tot.ntax <- 0
             tot.nchar <- tot.nchar + chars.done
             if (tot.nchar == nchar*ntax) {
                 print("ntot was more than nchar*ntax")