search for: zapshow

Displaying 2 results from an estimated 2 matches for "zapshow".

Did you mean: napshot
2023 Dec 19
1
[External] Re: zapsmall(x) for scalar x
...digits) } ##--- \examples{ x2 <- pi * 100^(-2:2)/10 print( x2, digits = 4) zapsmall( x2) # automatical digits zapsmall( x2, digits = 4) zapsmall(c(x2, Inf)) # round()s to integer .. zapsmall(c(x2, Inf), min.d=-Inf) # everything is small wrt Inf (z <- exp(1i*0:4*pi/2)) zapsmall(z) zapShow <- function(x, ...) rbind(orig = x, zapped = zapsmall(x, ...)) zapShow(x2) ## using a *robust* mFUN mF_rob <- function(x, ina) boxplot.stats(x, do.conf=FALSE)$stats[5] ## with robust mFUN(), 'Inf' is no longer distorting the picture: zapShow(c(x2, Inf), mFUN = mF_rob) zapShow(c(x2, I...
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
Does mFUN() really need to be a function of x and the NA values of x? I can't think of a case where it would be used on anything but the non-NA values of x. I think it would be easier to specify a different mFUN() (and document this new argument) if the function has one argument and is applied to the non-NA values of x. zapsmall <- function(x, digits = getOption("digits"),