Skip to content

Commit

Permalink
site_no hand holding.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldecicco-USGS committed Dec 3, 2015
1 parent 8e4c4bb commit 49bae52
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/importRDB1.r
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,25 @@ importRDB1 <- function(obs_url, asDateTime=TRUE, convertType = TRUE, tz=""){
readr.data.char <- read_delim(doc, skip = (meta.rows+2),delim="\t",col_names = FALSE,
col_types = cols(.default = "c"))
readr.data[,unique.bad.cols] <- lapply(readr.data.char[,unique.bad.cols], parse_number)

}

} else {
readr.data <- read_delim(doc, skip = (meta.rows+2),delim="\t",col_names = FALSE, col_types = cols(.default = "c"))
}

names(readr.data) <- header.names

if("site_no" %in% names(readr.data)){
if(!is.integer(readr.data$site_no)){
if(is.null(readr.data.char)){
readr.data.char <- read_delim(doc, skip = (meta.rows+2),delim="\t",col_names = FALSE,
col_types = cols(.default = "c"))
}
names(readr.data.char) <- header.names
readr.data$site_no <- readr.data.char$site_no
}
}
comment(readr.data) <- readr.meta
readr.data <- as.data.frame(readr.data)

Expand Down

0 comments on commit 49bae52

Please sign in to comment.