Learn R Programming

dataSDA (version 0.1.8)

interval_geometry: Geometric Properties of Interval Data

Description

Functions to compute geometric characteristics of interval-valued data.

Usage

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, ...)

Value

A numeric matrix or value

Arguments

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.

Author

Han-Ming Wu

Details

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

See Also

int_width int_radius int_center int_overlap

Examples

Run this code
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")

Run the code above in your browser using DataLab