find_index_in_2D_df: Find index from a 2-D data frame (e.g., map)

Description Usage Arguments

Description

Find index from a 2-D data frame (e.g., map)

Usage

1
2
3
4
5
6
7
8
9
find_index_in_2D_df(
  data_2D,
  query,
  num_index_per_query = 1,
  x = "lon",
  y = "lat",
  x_query = "lon",
  y_query = "lat"
)

Arguments

data_2D

2-D data frame where x/y or lon/lat are available and from which the index is derived.

query

Data frame for query. Each row of the query (2-d matrix or 2-column data frame) looks for the closest value in distance (to the row) from the data and return its index corresponding to that value in data_2D.

num_index_per_query

the number of indices to be returned - typically just one.

x

the x (axis) name in data_2D

y

the y (axis) name in data_2D

x_query

the x (axis) name in the query data frame

y_query

the y (axis) name in the query data frame


seunjeong/rmapping documentation built on Dec. 13, 2020, 3:36 a.m.