В Fri, 23 May 2025 11:47:33 +
Marttila Mikko via R-devel пишет:
> When called with a numeric vector, the `replace.zero` argument is
> disregarded.
>
> > prettyNum(0, zero.print = "- ", replace.zero = TRUE)
> [1] "-"
> Warning message:
> In .format.zeros(x, zero.print, replace = replace.zer
> Of course, it would be preferable if didn't need to detach the namespace.
Here's a version only detaches the namespace when necessary:
```r
use <- function(package, include.only) {
package <- as.character(package)[[1L]]
if (!requireNamespace(package, quietly = TRUE)) {
warning("
Hello,
Currently `use` fails silently if you try to attach functions from the
same namespace. It would be nice and more similiar to the use of
roxygen2 if it could add (and maybe even remove?) functions. Here is a
simple proof of concept I have posted on Stack Overflow [1]. Something
similar
Dear list,
I'd like to report a bug in `prettyNum()`. When called with a numeric vector,
the `replace.zero` argument is disregarded.
> prettyNum(0, zero.print = "- ", replace.zero = TRUE)
[1] "-"
Warning message:
In .format.zeros(x, zero.print, replace = replace.zero) :
'zero.print' is truncat