# Create new WqData object from sfbay data. First combine date and time
# into a single string after making sure that all times have 4 digits.
sfb <- transform(sfbay, time = substring(10000 + time, 2, 5))
sfb <- transform(sfb, time = paste(date, time, sep = ' '))
sfb <- wqData(sfb, 2:4, 5:12, site.order = TRUE, type = "wide",
time.format = "%m/%d/%Y %H%M")
head(sfb)
# If time of day were not required, then the following would suffice:
sfb <- wqData(sfbay, c(1,3,4), 5:12, site.order = TRUE, type = "wide",
time.format = "%m/%d/%Y")
head(sfb)
summary(sfb)
Run the code above in your browser using DataLab