Description Usage Arguments Value Author(s) Examples
View source: R/HUC_aggregator.R
Aggregates fromHUCs recursively.
1  | HUC_aggregator(huc, fromHUC)
 | 
huc | 
 The huc in question  | 
fromHUC | 
 The list of fromHUCs for all the hucs  | 
The list of all fromHUCs upstream of given huc
David Blodgett dblodgett@usgs.gov
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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.