Learn R Programming

set6 (version 0.2.4)

as.Interval: Coercion to R6 Interval

Description

Coerces object to an R6 Interval.

Usage

as.Interval(object)

# S3 method for Set as.Interval(object)

# S3 method for Interval as.Interval(object)

# S3 method for list as.Interval(object)

# S3 method for data.frame as.Interval(object)

# S3 method for matrix as.Interval(object)

# S3 method for numeric as.Interval(object)

# S3 method for ConditionalSet as.Interval(object)

Arguments

object

object to coerce

Details

  • as.Interval.list/as.Interval.data.frame - Assumes the list/data.frame has named items/columns: lower, upper, type, class.

  • as.Interval.numeric - If the numeric vector is a continuous interval with no breaks then coerces to an Interval with: lower = min(object), upper = max(object), class = "integer". Ordering is ignored.

  • as.Interval.matrix - Tries coercion via as.Interval.numeric on the first column of the matrix.

  • as.Interval.Set - First tries coercion via as.Interval.numeric, if possible wraps result in a Set.

  • as.Interval.FuzzySet - Tries coercion via as.Interval.Set on the support of the FuzzySet.

See Also

Interval

Other coercions: as.FuzzySet(), as.Set()