filter_points: filter_points

Description Usage Arguments Value Examples

Description

filter_points filters points outside the target area.

Usage

1
2
filter_points(df, xmin, xmax, ymin, ymax, limits = NULL, x = x,
  y = y, margin = 25)

Arguments

df

A data frame containing x and y coordinates

xmin, xmax, ymin, ymax

Minimum and maximum coordinates of target area

limits

a named list of limits including xmin, xmax, ymin, ymax

x, y

x and y variables to use

margin

The margin (in pixels) around the target area you want to include

Value

Returns a data frame with coordinates outside the target area replaced by NaN values

Examples

1
2
df <- data.frame(x = runif(10, 0, 10), y = runif(10, 0, 10))
filter_points(df, 4, 6, 5, 7, margin = 1)

abeith/eyeCleanR documentation built on June 1, 2019, 12:43 a.m.