as_improper: Converts a Parsed Fraction to an Improper Fraction

Description Usage Arguments Examples

View source: R/fractions.R

Description

Given a string or a fraction parsed using parse_fraction(), this function will check to see whether it is in its improper form, and if not, it will convert it to an improper fraction.

Usage

1
as_improper(fraction)

Arguments

fraction

The input fraction, already parsed, or a string to be parsed using parse_fraction(fraction, improper = TRUE, reduce = FALSE).

Examples

1
2
3
4
5
6
7
frac <- "-3 1/2"
as_improper(frac)

p_frac <- parse_fraction(frac, improper = FALSE)
as_improper(p_frac)

as_improper("3")

mrdwab/mathrrr documentation built on July 20, 2020, 11:14 p.m.