From 76e054ee051cc981f6af6c4828bd5f45f0ac6fb3 Mon Sep 17 00:00:00 2001
From: unknown <ldecicco@usgs.gov>
Date: Wed, 28 Jan 2015 16:16:13 -0600
Subject: [PATCH] Switched around order

---
 R/importRDB1.r | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/R/importRDB1.r b/R/importRDB1.r
index 965f7462..743c09c0 100644
--- a/R/importRDB1.r
+++ b/R/importRDB1.r
@@ -92,9 +92,7 @@ importRDB1 <- function(obs_url, asDateTime=FALSE, qw=FALSE, convertType = TRUE,
     doc <- textConnection(rawData)
   }
   
-  fileVecChar <- scan(obs_url, what = "", sep = "\n", quiet=TRUE)
-  pndIndx<-regexpr("^#", fileVecChar)
-  hdr <- fileVecChar[pndIndx > 0L]
+
   
   tmp <- read.delim(  
     doc, 
@@ -106,6 +104,10 @@ importRDB1 <- function(obs_url, asDateTime=FALSE, qw=FALSE, convertType = TRUE,
     fill = TRUE, 
     comment.char="#")
   
+  fileVecChar <- scan(obs_url, what = "", sep = "\n", quiet=TRUE)
+  pndIndx<-regexpr("^#", fileVecChar)
+  hdr <- fileVecChar[pndIndx > 0L]
+  
   dataType <- tmp[1,]
   data <- tmp[-1,]
   
-- 
GitLab