within {cyclones}R Documentation

Points within an area.

Description

Finds points within a given closed 2-D boundary.

Usage

within(x,y,X,Y,test=FALSE,plot=FALSE)
testWithin(a=3,b=5)

Arguments

x vector with x-cordinates to test if they lie inside given boundary.
y vector with y-cordinates to test...
X vector of x-coordinates of the boundary.
Y vector of y-coordinates of the boundary.
plot TRUE if plotting results.
test TRUE if conducting test.
a x-axis of ellipse.
b y-axis of ellipse.

Value

Bolean vector of same length as x.

Author(s)

R.E. Benestad

Examples

x <- rnorm(100)
y <- rnorm(100)
X <- cos(2*pi*seq(0,1,length=360))
Y <- cos(2*pi*seq(0,1,length=360))
print(sum(within(x,y,X,Y)))

[Package cyclones version 1.2-0 Index]