Skip to content

Commit b02c754

Browse files
committed
fixed merge error in waterML1
1 parent 7bab13c commit b02c754

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

R/importWaterML1.r

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,12 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz=""){
244244
obsDF <- full_join(obsDF, valParentDF, by = c("dateTime","tz_cd"))
245245
}
246246
}else{
247-
obsDF <- data.frame()
247+
#need column names for joining later
248+
obsDF <- data.frame(dateTime=character(0), tz_cd=character(0), stringsAsFactors = FALSE)
249+
if(asDateTime){
250+
obsDF$dateTime <- as.POSIXct(obsDF$dateTime)
251+
}
252+
248253
}
249254
}
250255

0 commit comments

Comments
 (0)