Topic: Utilities

Topic Description:

Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.



File: utilities/geometry.r

View File Source Download File No help file available

Function: insideRectangle

Function Description: insideRectangle

Checks a vector of coordinates x, y to return which are inside a rectangle. For a much more general function for checking whether points are inside polygons, use the function inout() in the package splancs.

Function Arguments:

ArgumentDefault Value
x
y
xrange
yrange

Function Source:

insideRectangle=function(x,y,xrange,yrange)
{
inX=x>=xrange[1] & x inY=y>=yrange[1] & y return(inX&inY)
}