circle.ind: A Helper Function for venn3

Description Usage Arguments Value Author(s) Examples

View source: R/venn_functions.R

Description

Used in venn3 to tell whether proposed points are inside of the given circle.

Usage

1
circle.ind(ps, x, y, r)

Arguments

ps

a n x 2 matrix of coordinates.

x

the x coordinate of the center of the circle.

y

the y coordinate of the center of the circle.

r

the radius of the circle.

Value

a length n vector telling whether each row of ps is inside the given circle.

Author(s)

Kristian Lum kl@hrdag.org

Examples

1
2
3
4
ps <- cbind(runif(100), runif(100))
plot(dga:::circle(0, 0, 1), type = "l")
inds <- dga:::circle.ind(ps, 0, 0, 1)
points(inds)

dga documentation built on May 10, 2021, 5:06 p.m.