Process the deparsing options for deparse, dput and dump.
.deparseOpts(control)<p></p><p>..deparseOpts</p>
| Parameter | Description |
|---|---|
control |
character vector of deparsing options. |
# NOT RUN {
(iOpt.all <- .deparseOpts("all")) # a four digit integer
## one integer --> vector binary bits
int2bits <- function(x, base = 2L,
ndigits = 1 + floor(1e-9 + log(max(x,1), base))) {
r <- numeric(ndigits)
for (i in ndigits:1) {
r[i] <- x%%base
if (i > 1L)
x <- x%/%base
}
rev(r) # smallest bit at left
}
int2bits(iOpt.all)
## what options does "all" contain ?
(oa <- ..deparseOpts[-1][int2bits(iOpt.all) == 1])
stopifnot(identical(iOpt.all, .deparseOpts(oa)))
# }