diff --git a/R/importRDB1.r b/R/importRDB1.r index ce2627228d3147f6253007a15d96999783fde12a..3aac742870b295d87b2ad1ec73603e05da56174b 100644 --- a/R/importRDB1.r +++ b/R/importRDB1.r @@ -23,7 +23,7 @@ #' endDate <- "2012-10-01" #' offering <- "00003" #' property <- "00060" -#' \dontrun{ +#' #' obs_url <- constructNWISURL(siteNumber,property, #' startDate,endDate,"dv",format="tsv") #' data <- importRDB1(obs_url) @@ -47,7 +47,7 @@ #' fileName <- "RDB1Example.txt" #' fullPath <- file.path(filePath, fileName) #' importUserRDB <- importRDB1(fullPath) -#' } +#' importRDB1 <- function(obs_url, asDateTime=FALSE, qw=FALSE, convertType = TRUE, tz=""){ if(tz != ""){ @@ -223,6 +223,8 @@ importRDB1 <- function(obs_url, asDateTime=FALSE, qw=FALSE, convertType = TRUE, row.names(data) <- NULL } + names(data) <- make.names(names(data)) + comment(data) <- hdr attr(data, "url") <- obs_url attr(data, "queryTime") <- Sys.time()