sub-.prettyUsgs: Extract or replace parts of prettyUsgs objects.

Description Usage Arguments Value See Also Examples

Description

`[.prettyUsgs` extracts or replaces parts prettyUsgs objects and retains appropriate attributes.

Usage

1
2
## S3 method for class 'prettyUsgs'
x[i, ...]

Arguments

prettyUsgs

A dataframe of class c("prettyUsgs", "data.frame") returned from PrettyUsgs

Value

A dataframe of class c("prettyUsgs", "data.frame") or numeric

See Also

Other streamObs: FindUsgsStns, GetSiteHuc, GetUsgsHucData, GetUsgsIvProduct, ImproveHucMeta, LoadMetaDB, PlotPrettyUsgs, PrettyUsgs, QueryHaveSite, QuerySiteData, QuerySiteInfo, QuerySiteName, QuerySiteProd, SaveHucData, subset.prettyUsgs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
## these should be made formal tests
dbPath <- '~/wrfHydroTestCases/usgsDb/'
threeSites <- QuerySiteInfo(path = dbPath, info = c("site_no"))[1:3,]$site_no
obs <- PrettyUsgs(QueryHaveSite(threeSites, path=dbPath, ret='00060', get=TRUE))
length(unique(obs$site_no))
atomicV <- obs[,'value']
str(atomicV)
atomicS <- obs[1,'value']
str(atomicS)
df0 <- obs[,c('value','POSIXct','site_no')]
df1 <- obs[,c('value','POSIXct')]
df2 <- obs[1,c('value','POSIXct','site_no')]

## End(Not run)

mccreigh/rwrfhydro documentation built on Feb. 28, 2021, 1:53 p.m.