Learn R Programming

fractional (version 0.1.3)

numerators: Extract the parts of a fractional object

Description

Generic function for extracting numerators with methods for "fractional" or "charFrac" objects

Generic function for extracting denominators with methods for "fractional" or "charFrac" objects

Usage

numerators(x)
"numerators"(x)
"numerators"(x)
"numerators"(x)
denominators(x)
"denominators"(x)
"denominators"(x)
"denominators"(x)

Arguments

x
An object of class "fractional" or "charFrac"

Value

An integer vector of numeratorsAn integer vector of denominators

Methods (by class)

  • charFrac: numerators method function for "charFrac" objects
  • fractional: numerators method function for "fractional" objects
  • default: Default numerators method for numeric objects
  • charFrac: denominators method function for "charFrac" objects
  • fractional: denominators method function for "fractional" objects
  • default: Default denominators method for numeric objects

Examples

Run this code
(pi_approx <- vfractional(base::pi, eps = 0, maxConv = 1:10))
numerators(pi_approx)
denominators(pi_approx)

Run the code above in your browser using DataLab