Learn R Programming

rfishnet2 (version 0.2.0)

spatial_search: Filter data by longitude and latitude.

Description

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

Usage

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

Value

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

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.

Examples

Run this code
# NOT RUN {
spatial_search(ictaluridae, 36.12, -77.63, 1)

# }
# NOT RUN {
spatial_search(ictaluridae, -173,44,10)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab