Learn R Programming

geo (version 1.4-3)

inside: Finds a subset of data inside (or outside) a region

Description

Finds a subset of data within or without a region, returned as submatrix, boolean vector or indices of the original data.

Usage

inside(lat, lon = 0, reg, option = 1, projection = "Mercator")

Arguments

lat,lon
Latitude and longitude of the data, if lat = 0, lat must have components lat, lon or x, y in case projection is "none".
reg
Region we want to check wheter or not includes the data.
option
How should the results be returned:
1
Submatrix of data inside reg
2
Submatrix of data outside reg
3
Boolean vector, TRUE for data inside reg
4
Boolean vector, TRUE for data outside reg

5
Indices of data inside reg
6
Indices of data outside reg

projection
Projection, default "none"

Value

Submatrix, boolean vector or index to data as described for argument option.

See Also

Called by combine.rt, setgrid, calls adapt.