rational-length: Rational class 'length'

rational-lengthR Documentation

Rational class length

Description

Rational class length

Usage

## S4 method for signature 'rationalS4'
length(x)

## S3 method for class 'rationalS3'
length(x, ...)

## S3 method for class 'rationalR6'
length(x, ...)

## S3 method for class ''rational::rationalS7''
length(x, ...)

Arguments

x

An object of class rational

...

Other arguments passed to length

Examples

  a <- rational(c(3L, 5L, 6L), c(4L, 5L, 7L), "S4")
  stopifnot(length(a) == 3)
  a <- rational(c(3L, 5L, 6L), c(4L, 5L, 7L), "S3")
  stopifnot(length(a) == 3)
  a <- rational(c(3L, 5L, 6L), c(4L, 5L, 7L), "R6")
  stopifnot(length(a) == 3)
  a <- rational(c(3L, 5L, 6L), c(4L, 5L, 7L), "S7")
  stopifnot(length(a) == 3)

bertcarnell/rational documentation built on Aug. 1, 2024, 8:14 p.m.