| interval_geometry | R Documentation |
Functions to compute geometric characteristics of interval-valued data.
int_width(x, var_name, ...)
int_radius(x, var_name, ...)
int_center(x, var_name, ...)
int_overlap(x, var_name1, var_name2, ...)
int_containment(x, var_name1, var_name2, ...)
int_midrange(x, var_name, ...)
x |
interval-valued data with symbolic_tbl class. |
var_name |
the variable name or the column location (multiple variables are allowed). |
... |
additional parameters |
var_name1 |
the first variable name or column location. |
var_name2 |
the second variable name or column location. |
These functions compute basic geometric properties:
int_width: Width of each interval (upper - lower)
int_radius: Radius of each interval (width / 2)
int_center: Center point of each interval ((lower + upper) / 2)
int_overlap: Overlap measure between two interval variables
int_containment: Check if one interval contains another
int_midrange: Half-range of each interval ((upper - lower) / 2)
A numeric matrix or value
Han-Ming Wu
int_width int_radius int_center int_overlap
data(mushroom.int)
# Calculate interval widths
int_width(mushroom.int, var_name = "Pileus.Cap.Width")
int_width(mushroom.int, var_name = 2:3)
# Calculate interval radius
int_radius(mushroom.int, var_name = c("Stipe.Length", "Stipe.Thickness"))
# Get interval centers
int_center(mushroom.int, var_name = 2:4)
# Measure overlap between two variables
int_overlap(mushroom.int, "Pileus.Cap.Width", "Stipe.Length")
# Check containment
int_containment(mushroom.int, "Pileus.Cap.Width", "Stipe.Length")
# Calculate midrange
int_midrange(mushroom.int, var_name = 2:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.