View source: R/table_getRecordIndex.R
table_getRecordIndex | R Documentation |
Returns a vector of locationTbl
row indexes for the
locations associated with each locationID
.
table_getRecordIndex(locationTbl = NULL, locationID = NULL, verbose = TRUE)
locationTbl |
Tibble of known locations. |
locationID |
Vector of |
verbose |
Logical controlling the generation of progress messages. |
Vector of locationTbl
row indexes.
library(MazamaLocationUtils)
locationTbl <- get(data("wa_monitors_500"))
# Wenatchee
lon <- -120.325278
lat <- 47.423333
# Get the locationID first
locationID <- table_getLocationID(locationTbl, lon, lat, distanceThreshold = 5000)
# Now find the row associated with this ID
recordIndex <- table_getRecordIndex(locationTbl, locationID)
str(locationTbl[recordIndex,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.