as_simplified: Simplifies Parsed Fractions to Proper or Mixed Fraction Form

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 simplified form, and if not, it will convert it to a proper or mixed fraction, depending on whether the parsed number has a whole number component.

Usage

1
as_simplified(fraction)

Arguments

fraction

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

Examples

1
as_simplified("17/2")

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