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

Fix for variableInfo attribute that comes back incomplete.

parent b075d091
No related branches found
No related tags found
1 merge request!59Error handling.
......@@ -358,13 +358,14 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
siteInfo <- cbind(siteInfo, t(propertyValues))
names(extraVariableData) <- make.unique(names(extraVariableData))
variableInfo <- data.frame(parameterCd=extraVariableData$variableCode$text,
variableInfo <- c(parameterCd=extraVariableData$variableCode$text,
parameter_nm=extraVariableData$variableName,
parameter_desc=extraVariableData$variableDescription,
valueType=extraVariableData$valueType,
param_units=extraVariableData$unit$unitCode,
noDataValue=NA, #as.numeric(extraVariableData$noDataValue), since it's already converted
stringsAsFactors=FALSE)
param_units=extraVariableData$unit$unitCode)
variableInfo <- data.frame(t(variableInfo), stringsAsFactors=FALSE)
statInfo <- data.frame(statisticName=statName,
statisticCd=statCd,
......@@ -387,7 +388,7 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
}
######################
attList[[uniqueName]] <- list(extraSiteData, extraVariableData)
......@@ -425,6 +426,7 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
mergedDF <- data.frame()
}
variableInformation$noDataValue <- rep(NA, nrow(variableInformation))
row.names(mergedDF) <- NULL
attr(mergedDF, "url") <- obs_url
......
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