spatial_search: Filter data by longitude and latitude.

Description Usage Arguments Details Value Examples

View source: R/spatial_search.R

Description

spatialsearch returns the data that falls within radius given radius, and latitude and longitude coordinates.

Usage

1
spatial_search(df, lat, lon, r)

Arguments

df

A dataframe in FishNet2 standard format (by using read.csv())

lat

Latitude coordinate

lon

Longitude coordinate

r

Radius in kilometers

Details

This is a function to filter data given in the format of a csv file from FishNet2. For this to work properly, the dataframe must have column names using names given in standard csv format from FishNet2 website.

Value

Rows in file that fall within circle with center (lat,long) and radius r

Examples

1
2
3
4
5
6
spatial_search(ictaluridae, 36.12, -77.63, 1)

## Not run: 
spatial_search(ictaluridae, -173,44,10)

## End(Not run)

kdors/rfishnet2 documentation built on May 23, 2020, 7:07 p.m.