Re: [Rd] zapsmall(x) for scalar x

2023-12-16 Thread Steve Martin
Zapping a vector of small numbers to zero would cause problems when printing the results of summary(). For example, if zapsmall(c(2.220446e-16, ..., 2.220446e-16)) == c(0, ..., 0) then print(summary(2.220446e-16), digits = 7) would print Min. 1st Qu. MedianMean 3rd Qu.Max. 0

[Rd] zapsmall(x) for scalar x

2023-12-16 Thread Gregory Warnes
I was quite suprised to discover that applying `zapsmall` to a scalar value has no apparent effect. For example: > y <- 2.220446e-16 > zapsmall(y,) [1] 2.2204e-16 I was expecting zapsmall(x)` to act like > round(y, digits=getOption('digits')) [1] 0 Looking at the current source code, indicat

Re: [Rd] Partial matching performance in data frame rownames using [

2023-12-16 Thread Ivan Krylov
On Wed, 13 Dec 2023 09:04:18 +0100 Hilmar Berger via R-devel wrote: > Still, I feel that default partial matching cripples the functionality > of data.frame for larger tables. Changing the default now would require a long deprecation cycle to give everyone who uses `[.data.frame` and relies on p