| frac_mat {fracture} | R Documentation | 
Convert decimals to a matrix of numerators and denominators
Description
Convert decimals to a matrix of numerators and denominators
Usage
frac_mat(
  x,
  ...,
  denom = NULL,
  base_10 = FALSE,
  common_denom = FALSE,
  mixed = FALSE,
  max_denom = 1e+07
)
as.frac_mat(x)
is.frac_mat(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 matrix with the same number of columns as the length of x and
rows for integers (if mixed is TRUE), numerators,
and denominators.
See Also
fracture() to return a character vector of fractions.
Examples
x <- (6:1) / (1:6)
frac_mat(x)
frac_mat(x, common_denom = TRUE)
frac_mat(x, base_10 = TRUE)
frac_mat(x, base_10 = TRUE, max_denom = 100)
frac_mat(x, base_10 = TRUE, common_denom = TRUE)
frac_mat(x, base_10 = TRUE, common_denom = TRUE, max_denom = 100)
frac_mat(x, mixed = TRUE)
frac_mat(x, mixed = TRUE, common_denom = TRUE)
frac_mat(x, mixed = TRUE, base_10 = TRUE)
frac_mat(x, mixed = TRUE, base_10 = TRUE, max_denom = 100)
frac_mat(x, mixed = TRUE, base_10 = TRUE, common_denom = TRUE)
frac_mat(x, mixed = TRUE, base_10 = TRUE, common_denom = TRUE, max_denom = 100)