fromHUC_finder: FromHUC Finder

View source: R/fromHUC_finder.R

fromHUC_finderR Documentation

FromHUC Finder

Description

This function finds the hucs that flow into a given huc.

Usage

fromHUC_finder(huc, hucs, tohucs)

Arguments

huc

The huc in question

hucs

The list of all HUCs

tohucs

The list of TOHUCs

Value

The list of fromHUCs

Author(s)

David Blodgett dblodgett@usgs.gov

Examples

## Not run: 
load(system.file("extdata","testhucpoly.rda",package="HUCAgg"))
print(testhucPoly@data$HUC12[which(testhucPoly@data$TOHUC %in% "070900020504")])
print(testhucPoly@data$HUC12[which(testhucPoly@data$TOHUC %in% "070900020604")])
hucList<-testhucPoly@data$HUC12
fromHUC<-sapply(hucList,fromHUC_finder,hucs=testhucPoly@data$HUC12,tohucs=testhucPoly@data$TOHUC)
print(unlist(fromHUC["070900020504"][[1]]))
print(unlist(fromHUC["070900020604"][[1]]))

## End(Not run)


USGS-R/HUCAgg documentation built on Nov. 24, 2022, 4:36 a.m.