frac_mat | R Documentation |
Convert decimals to a matrix of numerators and denominators
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)
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 |
A matrix with the same number of columns as the length of x
and
rows for integer
s (if mixed
is TRUE
), numerator
s,
and denominator
s.
fracture()
to return a character vector of fractions.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.