Skip to content
Snippets Groups Projects
Commit 4f363020 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Moving specific rating curve bit to rating curve function.

parent 2464b509
No related branches found
No related tags found
1 merge request!151readr for importRDB1
......@@ -151,10 +151,6 @@ importRDB1 <- function(obs_url, asDateTime=FALSE, qw=FALSE, convertType = TRUE,
intColumns <- grep("_nu",names(data))
if("current_rating_nu" %in% names(data)){
intColumns <- intColumns[!("current_rating_nu" %in% names(data)[intColumns])]
data$current_rating_nu <- gsub(" ", "", data$current_rating_nu)
}
data[,intColumns] <- sapply(data[,intColumns],as.integer)
if(length(grep('d$', dataType)) > 0){
......
......@@ -204,6 +204,11 @@ readNWISrating <- function (siteNumber,type="base"){
data <- importRDB1(url, asDateTime=FALSE)
if("current_rating_nu" %in% names(data)){
intColumns <- intColumns[!("current_rating_nu" %in% names(data)[intColumns])]
data$current_rating_nu <- gsub(" ", "", data$current_rating_nu)
}
if(nrow(data) > 0){
if(type == "base") {
Rat <- grep("//RATING ", comment(data), value=TRUE, fixed=TRUE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment