fracture {fracture} | R Documentation |
Convert decimals to a character vector of fractions
Description
Convert decimals to a character vector of fractions
Usage
fracture(
x,
...,
denom = NULL,
base_10 = FALSE,
common_denom = FALSE,
mixed = FALSE,
max_denom = 1e+07
)
as.fracture(x)
is.fracture(x)
Arguments
x |
A vector of decimals or, for |
... |
These dots are for future extensions and must be empty. |
denom |
If |
base_10 |
If |
common_denom |
If If the least common denominator is greater than |
mixed |
If If |
max_denom |
All denominators will be less than or equal to
If A |
Value
A character vector.
See Also
frac_mat()
to return a matrix of numerators and denominators.
Examples
x <- (6:1) / (1:6)
fracture(x)
fracture(x, common_denom = TRUE)
fracture(x, base_10 = TRUE)
fracture(x, base_10 = TRUE, max_denom = 100)
fracture(x, base_10 = TRUE, common_denom = TRUE)
fracture(x, base_10 = TRUE, common_denom = TRUE, max_denom = 100)
fracture(x, mixed = TRUE)
fracture(x, mixed = TRUE, common_denom = TRUE)
fracture(x, mixed = TRUE, base_10 = TRUE)
fracture(x, mixed = TRUE, base_10 = TRUE, max_denom = 100)
fracture(x, mixed = TRUE, base_10 = TRUE, common_denom = TRUE)
fracture(x, mixed = TRUE, base_10 = TRUE, common_denom = TRUE, max_denom = 100)