vfractional {fractional} | R Documentation |
A function which allows any or all of the first three
arguments of fractional
to be vectors, with short
vectors recycled in the usual way. Note that the return
value is a character string vector and may not be
used in arithmetic operations
vfractional(x, eps = 1e-06, maxConv = 20)
x |
as for |
eps |
as for |
maxConv |
as for |
A character string vector of class "charFrac"
oldOpt <- options(scipen = 15) pi_approx <- vfractional(base::pi, eps = 0, maxConv = 1:10) within(data.frame(pi_approx, stringsAsFactors = FALSE), { value = numerical(pi_approx) error = signif(base::pi - value, 3) n = seq_along(value) - 1 })[, c("n", "pi_approx", "value", "error")] options(oldOpt)