diff --git a/R/importRDB1.r b/R/importRDB1.r index 965f746247e7cae9750df4499f4fce41226e37c2..743c09c09d9f9e9295918d84a2d50d9d4d234f6c 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,]