
Flexible subsetting of a matrix by coordinates
flexible_coordinate_subset.Rd
Expects first column is an X coordinate and second is Y. Returns a logical vector indicating which coordinates are in bounds
Arguments
- coords
Coordinate matrix
- i
Specifies subsetting in the X axis.
If
i
is a scalar, coordinates less than or equal to i are includedIf
i
is a 2-length vector, the elements will be treated as min and max of the subset window, respectivelyIf
i
is a range, any coordinates within the range will be included
- j
Same as
i
- inv
Whether to invert the y axis -- commonly done for microscopy image data.