From f67151110ebfe0cc32ca05ed81bda2e551ff2110 Mon Sep 17 00:00:00 2001 From: Laura DeCicco Date: Wed, 6 Jan 2016 15:10:39 -0600 Subject: [PATCH] Need to convert 1 line results. --- DESCRIPTION | 2 +- R/readNWISsite.r | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1daee627..6fa3080e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: dataRetrieval Type: Package Title: Retrieval Functions for USGS and EPA Hydrologic and Water Quality Data -Version: 2.4.4 +Version: 2.4.5 Date: 2015-12-09 Authors@R: c( person("Robert", "Hirsch", role = c("aut"), email = "rhirsch@usgs.gov"), diff --git a/R/readNWISsite.r b/R/readNWISsite.r index d42b195a..b26726b1 100644 --- a/R/readNWISsite.r +++ b/R/readNWISsite.r @@ -70,7 +70,9 @@ readNWISsite <- function(siteNumbers){ urlSitefile <- paste0("http://waterservices.usgs.gov/nwis/site/?format=rdb&siteOutput=Expanded&sites=",siteNumber) data <- importRDB1(urlSitefile,asDateTime=FALSE) - + #readr needs multiple lines to convert to anything but characters: + data[,grep("_va",names(data))] <- sapply(data[,grep("_va",names(data))], as.numeric) + return(data) }