HUC_aggregator: HUC Aggregator

Description Usage Arguments Value Author(s) Examples

View source: R/HUC_aggregator.R

Description

Aggregates fromHUCs recursively.

Usage

1
HUC_aggregator(huc, fromHUC)

Arguments

huc

The huc in question

fromHUC

The list of fromHUCs for all the hucs

Value

The list of all fromHUCs upstream of given huc

Author(s)

David Blodgett dblodgett@usgs.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
load(system.file("extdata","testhucpoly.rda",package="HUCAgg"))
hucList<-testhucPoly@data$HUC12
fromHUC<-sapply(hucList,fromHUC_finder,
                hucs=testhucPoly@data$HUC12,
                tohucs=testhucPoly@data$TOHUC)
print(unlist(fromHUC["070900020604"][[1]]))
print(c(unlist(fromHUC["070900020504"][[1]]), 
        unlist(fromHUC["070900020602"][[1]]), 
        unlist(fromHUC["070900020603"][[1]])))
aggrHUCs<-sapply(hucList, HUC_aggregator, fromHUC=fromHUC)
print(unlist(aggrHUCs["070900020604"][[1]]))

## End(Not run)

jread-usgs/HUCAgg documentation built on May 20, 2019, 10:45 a.m.