getpoints: getpoints selects any lat-long records within a view

Description Usage Arguments Value Examples

Description

given a particular view (that is the leftlong, the rightlong, the uplat, and the downlat - as a vector of 4) getpoints will select those records from a data.frame being explored. This prepares the data for summarizing effort, catch, divers, etc.

Usage

1
getpoints(view, dat, Long = "long", Lat = "lat")

Arguments

view

the leftlong, rightlong, uplat, and the downlat as a vector of 4 which identifies the window onto Tasmania being considered.

dat

a data.frame usually obtained from getlatlong applied to a SpatialPolygonsDataFrame. But it could be any that had a long and a lat field within it.

Long

the name of the longitude column in the data.frame. defaults to long

Lat

the name of the latitude column in the data.frame. defaults to lat

Value

a data.frame containing the specific records associated with the lat-long records within the area of the view.

Examples

1
2
3
4
5
## Not run: 
 # ab <- readRDS(paste0(datadir,"G1Ha_2018_10_23.rds"))#get spatial obj
 # abdat <- getlatlong(ab)     # convert to data.frame + lat long

## End(Not run)

haddonm/abspatial documentation built on June 7, 2019, 9:54 a.m.