Learn R Programming

wk (version 0.9.4)

rct_xmin: Rectangle accessors and operators

Description

Rectangle accessors and operators

Usage

rct_xmin(x)

rct_ymin(x)

rct_xmax(x)

rct_ymax(x)

rct_width(x)

rct_height(x)

rct_intersects(x, y)

rct_contains(x, y)

rct_intersection(x, y)

Value

  • rct_xmin(), rct_xmax(), rct_ymin(), and rct_ymax() return the components of the rct().

Arguments

x, y

rct() vectors

Examples

Run this code
x <- rct(0, 0, 10, 10)
y <- rct(5, 5, 15, 15)

rct_xmin(x)
rct_ymin(x)
rct_xmax(x)
rct_ymax(x)
rct_height(x)
rct_width(x)
rct_intersects(x, y)
rct_intersection(x, y)
rct_contains(x, y)
rct_contains(x, rct(4, 4, 6, 6))

Run the code above in your browser using DataLab