touches: Check if quadrat pairs touch each other

View source: R/utils.r

touchesR Documentation

Check if quadrat pairs touch each other

Description

Check if quadrat pairs touch each other

Usage

touches(q1, q2, corner = FALSE)

Arguments

q1

quadrat codes, having length of one, or equal length with q2.

q2

quadrat codes, having length of one, or equal length with q1.

corner

if TRUE, quadrats touch only at their corners also treated as touched.

Value

Returns TRUE if the two plots touch each other and FALSE if do not.

Examples

q1 <- c("A1a2", "A1a2", "A1a1")
q2 <- c("A1a4", "B1a2", "A1a3")
touches(q1, q2)


Marchen/r_ogawa documentation built on July 5, 2025, 6:29 a.m.