Re: [Rd] Bug in prettyNum

2025-05-23 Thread Ivan Krylov via R-devel
В 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

Re: [Rd] FR: improve "use" function

2025-05-23 Thread Trevor Davis
> 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("

[Rd] FR: improve "use" function

2025-05-23 Thread Roland Fuß via R-devel
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

[Rd] Bug in prettyNum

2025-05-23 Thread Marttila Mikko via R-devel
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