Learn R Programming

PWFSLSmoke (version 1.0.16)

monitor_distance: Calculate Distances From ws_monitor Monitors to Location of Interest

Description

This function returns the distances (km) between monitoring sites and a location of interest. These distances can be used to create a mask identifying monitors within a certain radius of the location of interest.

Usage

monitor_distance(ws_monitor, longitude, latitude)

Arguments

ws_monitor

ws_monitor object

longitude

longitude of the location of interest

latitude

latitude of the location of interest

Value

vector of of distances (km)

See Also

distance

Examples

Run this code
# NOT RUN {
N_M <- Northwest_Megafires
# Walla Walla
WW_lon <- -118.330278
WW_lat <- 46.065
distance <- monitor_distance(N_M, WW_lon, WW_lat)
closestIndex <- which(distance == min(distance))
distance[closestIndex]
N_M$meta[closestIndex,]
# }

Run the code above in your browser using DataLab