Learn R Programming

hypergate (version 0.8.5)

update_gate: Updates a gate vector

Description

Updates a gate vector

Usage

update_gate(xp, polygon, gate_vector = rep(0, nrow(xp)), value = 1)

Value

The updated gate_vector

Arguments

xp

A two colums matrix

polygon

A list with two components x and y of equal lenghts and numeric values

gate_vector

a vector of length nrow(xp) with integer values

value

The number that will be assigned to gate_vector, corresponding to points that lie in the polygon