Re: [Rd] Bug with `[<-.POSIXlt` on specific OSes

2022-10-22 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Tue, 18 Oct 2022 10:56:25 +0200 writes: >>>>> Suharto Anggono Suharto Anggono via R-devel >>>>> on Fri, 14 Oct 2022 16:21:14 + (UTC) writes: >> I think '[.POSIXlt' and &#

[Rd] unsplit() mangles attributes

2022-11-01 Thread Steve Martin
Hello, Unsplitting a named vector that's been split sets all the names as missing. x <- 1:12 names(x) <- letters[x] f <- gl(2, 6) unsplit(split(x, f), f) 123456789 10 11 12 The unsplit() function correctly deals with row names when unsplittin

Re: [Rd] R blog link on developer page

2022-11-09 Thread Martin Maechler
ation (https://blog.r-project.org/)? > Apologies if this was the wrong list to raise this - please flag if there's a more appropriate one. > Tim Thank you, Tim. You were right and the change has happened now. Martin __ R-devel@r-p

Re: [Rd] Shouldn't "Loading" be "Attaching" when referring to library() calls?

2023-01-10 Thread Martin Maechler
ertainly ambiguity in the internal variable names referenced > above -- in require, we see > loaded <- paste0("package:", package) %in% search() > https://github.com/r-devel/r-svn/blob/4198a2941b702d965bb2374c2b908f48c369f40a/src/library/base/R/library.R#L680

Re: [Rd] Shouldn't "Loading" be "Attaching" when referring to library() calls?

2023-01-10 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Tue, 10 Jan 2023 10:26:53 +0100 writes: >>>>> Michael Chirico via R-devel >>>>> on Mon, 9 Jan 2023 12:25:46 -0800 writes: >> require() and library() both emit this message immediately

Re: [Rd] Bug or feature?

2023-01-17 Thread Martin Maechler
vs se.fit=TRUE In the mean time, you have filed a new bugzilla isse about this, https://bugs.r-project.org/show_bug.cgi?id=18456 so we (and everyone interested) will continue the discussion there. Thank you for contributing to make R better by this! Best regards, Martin > -- >

Re: [Rd] memory leak in png()

2023-01-17 Thread Martin Maechler
rom the bottom up) shows package grid C code, then R main but infrastructure for grDevices ("GEStrWidth (engine.c)") and subdirectory grDevices/src/cairo/cairoFns.c and then goes into system cairo or pangocairo libraries, which here (Linux Fedora 36) are (I thik) libpang

Re: [Rd] memory leak in png()

2023-01-17 Thread Martin Maechler
Note that cairo_pdf() also suffers from the same leak .. as to be expected once you notice that much of the cairo device handling uses common code. ... .. and then, when you are aware that on Linux, the default interactive device is x11() and its default type is *also* "cairo" { possibly not on

Re: [Rd] memory leak in png()

2023-01-17 Thread Martin Maechler
ession when you start up: Then they do *not* use any memory (and startup time) resources, and if you really need them, load the namespaces and possibly even attach the package to search(). That is perfectly valid smart use of resources from within R, and indeed a feature and not a bug. Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Sys.getenv(): Error in substring(x, m + 1L) : invalid multibyte string at '' if an environment variable contains \xFF

2023-01-31 Thread Martin Maechler
> Tomas Kalibera > on Tue, 31 Jan 2023 10:53:21 +0100 writes: > On 1/31/23 09:48, Ivan Krylov wrote: >> Can we use the "bytes" encoding for such environment variables invalid >> in the current locale? The following patch preserves CE_NATIVE for >> strings valid in the

Re: [Rd] uniroot violates bounds?

2023-02-20 Thread Martin Maechler
>>>>> Serguei Sokol via R-devel >>>>> on Mon, 20 Feb 2023 10:59:22 +0100 writes: > Le 18/02/2023 à 21:44, J C Nash a écrit : >> I wrote first cut at unirootR for Martin M and he revised and put in >> Rmpfr. >> >> T

Re: [Rd] uniroot violates bounds?

2023-02-22 Thread Martin Maechler
>>>>> Martin Maechler on Mon, 20 Feb 2023 19:25:02 +0100 writes: >>>>> Serguei Sokol via R-devel >>>>> on Mon, 20 Feb 2023 10:59:22 +0100 writes: >> Le 18/02/2023 à 21:44, J C Nash a écrit : >>> I wrote first cut at u

Re: [Rd] Compilation Error when DEBUG_approx Toggled on in RISC-V

2023-02-24 Thread Martin Maechler
but to the 0, 1, or 2 people in the world who may have manually compiled *and* defined DEBUG_approx .. > Thank you for your time and consideration. and to you, too! The fixed is part of the source now. Best, Martin > Best, > Jane He > _

Re: [Rd] transform.data.frame() ignores unnamed arguments when no named argument is provided

2023-03-03 Thread Martin Maechler
debugging is often not really feasible anyway ..), but somewhat experienced useRs should know about options(warn = 1) # or options(warn = 2) # plus options(error = recover) # or tryCatch( ..., warning = ..) or {even more} Martin -- Martin Maechler ETH Zurich and R Core team __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] confusing all.equal output

2023-03-03 Thread Martin Maechler
>>>>> peter dalgaard >>>>> on Thu, 2 Mar 2023 19:47:59 +0100 writes: > I believe the wording goes back to Martin Maechler many > moons ago (AFAICT towards the end of the last millennium.) > We might leave it to him to change it? > -

Re: [Rd] Augment base::replace(x, list, value) to allow list= to be a predicate?

2023-03-07 Thread Steve Martin
That's an interesting example, as it's conceptually similar to what Pavel is proposing, but structurally different. gsubfn() is more complicated than a simple switch in the body of the function, and wouldn't work well as an anonymous function. Multiple dispatch can nicely encompass both of these c

Re: [Rd] Multiple Assignment built into the R Interpreter?

2023-03-14 Thread Martin Maechler
>>>>> Sebastian Martin Krantz >>>>> on Sat, 11 Mar 2023 11:04:54 +0200 writes: [] > But maybe this has already been discussed here and already > decided against. In that case, a way to browse R-devel > archives to find

Re: [Rd] make file.rename return invisible

2023-03-24 Thread Martin Maechler
e that very safe use (in scripts run automatically, ..) should happen inside if (!file.rename(a,b)) stop("Could not successfully rename ", a, " to ", b) anyway... and indeed it's much much less confusing for people debugging such code that functions behave normally,

Re: [Rd] Query: Could documentation include modernized references?

2023-03-31 Thread Martin Maechler
es and > responding to their requests. And maybe don't do any > until you hear from a member of R Core that they're > willing to participate in this, because they certainly > don't accept all suggestions. > Dunca

Re: [Rd] Error message for infinite probability parameters in rbinom() and rmultinom()

2023-04-08 Thread Martin Maechler
> Christophe Dutang > on Sat, 8 Apr 2023 14:21:53 +0200 writes: > Dear all, > Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability. > Maybe, a more precise message will be helpful when d

Re: [Rd] Confusion about ks.test() handling of ties and exact vs approximate results

2023-04-21 Thread Martin Maechler
> Karolis Koncevičius > on Fri, 21 Apr 2023 11:32:41 +0300 writes: > Hello, > Today I was investigating ks.test() with two numerical arguments (x and y) and was left a bit confused about the policy behind handling ties. > I might be missing something, so sorry in advance

Re: [Rd] Possible inconsistency between `as.complex(NA_real_)` and the docs

2023-04-22 Thread Martin Maechler
> Hi all, > > Surprisingly (at least to me), `as.complex(NA_real_)` results in > `complex(real = NA_real_, imaginary = 0)` rather than `NA_complex_`. Well, the logic here is really the mathematical equivalence: if you turn a real number x in to a complex one, say z, then z = x + i * 0 , i.e.

Re: [Rd] range() for Date and POSIXct could respect `finite = TRUE`

2023-04-29 Thread Martin Maechler
these three Summary.*() methods so they do obey 'finite = TRUE' . I think I agree they should. Martin > ``` x <- .Date(c(0, Inf, 1, 2, Inf)) x #> [1] "1970-01-01" > "Inf" "1970-01-02" "1970-01-03" "Inf" >

Re: [Rd] save.image Non-responsive to Interrupt

2023-05-02 Thread Martin Maechler
aiming they are: with our recursive objects it's surely not very easy to determine the "minimally necessary" such calls. In addition, we may still consider adding an extra optional argument, say `check.interrupt = TRUE` which we may default to TRUE when save.image() is call

Re: [Rd] range() for Date and POSIXct could respect `finite = TRUE`

2023-05-04 Thread Martin Maechler
>>>>> Davis Vaughan >>>>> on Mon, 1 May 2023 08:46:33 -0400 writes: > Martin, > Yes, I missed that those have `Summary.*` methods, thanks! > Tweaking those to respect `finite = TRUE` sounds great. It seems like > it might be a li

Re: [Rd] save.image Non-responsive to Interrupt

2023-05-05 Thread Martin Maechler
patch which uses Tomas' approach (I think) in all cases, making uniformly use of this macro (derived from a version of what Tomas used): #define IF_IC_R_CheckUserInterrupt()\ if(!(--ic)) { \ R_CheckUserInterrupt(); \ ic

Re: [Rd] range() for Date and POSIXct could respect `finite = TRUE`

2023-05-11 Thread Martin Maechler
ength length(x) .. which is TRUE where x[i] is not NA/NaN/+Inf/-Inf .. *and* is.infinite := Negate(is.finite){or vice versa if you prefer}. I agree that this may be useful somewhat more generally than just for range() methods. What do others think? Martin > On Thu, May 4, 2023 at 5:29

Re: [Rd] range() for Date and POSIXct could respect `finite = TRUE`

2023-05-19 Thread Martin Maechler
teger, character *and* raw, the latter really debatable - but *not* in this thread). So, allows.infinite(x) would *not* vectorize but return TRUE or FALSE (and typically not NA ..), in some sense being a property of class(x) only. > On Thu, May 11, 2023 at 1:49 AM Martin Maechler >

Re: [Rd] range() for Date and POSIXct could respect `finite = TRUE`

2023-05-22 Thread Martin Maechler
e anymore --- at least not in this thread --- that min() and max() should also get a 'finite = FALSE' optional argument. This is about range(x, finite=TRUE) to work (the "same" as the default method), e.g. when x inherits from "Date" or "POSIXct" *and* to do s

[Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB

2023-05-30 Thread Martin Morgan
I build my own R from source on an M1 mac. I have a clean svn checkout in one directory ~/src/R-devel. I switch to ~/bin/R-devel and the first time run cd ~/bin/R-devel ~/src/R-devel/configure --enable-R-shlib 'CFLAGS=-g -O0' CPPFLAGS=-I/opt/R/arm64/include 'CXXFLAGS=-g -O0' make -j At some poi

Re: [Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB

2023-05-30 Thread Martin Morgan
DYLD_LIBRARY_PATH=/Users/ma38727/bin/R-devel/lib And then `library(tools)` works. To run lldb I needed to grant Xcode permissions using my local administrator account. @Thomas I can't see anything in the Console app logs, but this might be partly my ineptitude. Martin From: Tomas Kalibera

Re: [Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB

2023-05-31 Thread Martin Morgan
t I realized that the R-SIG-mac mailing list might have been more appropriate, but I did not see the issue discussed there. Martin From: Prof Brian Ripley Date: Wednesday, May 31, 2023 at 3:46 AM To: Martin Morgan Cc: Tomas Kalibera , R-devel Subject: Re: [Rd] Building R from source always fails

Re: [Rd] why does [A-Z] include 'T' in an Estonian locale?

2023-06-01 Thread Martin Maechler
t answer is "use [:alpha:] > and don't worry about it") > (In contrast, the ICU engine underlying stringi/stringr says "[t]he > characters to include are determined by Unicode code point ordering" - see > https://stackoverflow.com/questions/76

Re: [Rd] bug in na.contiguous? Doesn't give the first tied stretch if it is at the start

2023-06-02 Thread Martin Maechler
p the first element of 'keep' to allow correct indexing later. > Georgi Boshnakov Thanks a lot, Georgi, for raising this. I think you are right : 1) this is a bug {in the R code base since the beginning (na.contiguous added to R in 1999)} 2) your propositi

Re: [Rd] infelicity in `na.print = ""` for numeric columns of data frames/formatting numeric values

2023-06-05 Thread Martin Maechler
t.data.frame() which is quite a bit related, of course, to how 'numeric' columns are formatted -- as you note yourself below; I vaguely recall that the data.frame method could be an even "harder problem" .. but I don't remember the details. It may also be that there a

Re: [Rd] codetools wrongly complains about lazy evaluation in S4 methods

2023-06-16 Thread Martin Maechler
define qr.X as an > implicit generic without creating other problems, but my > experiments with setGenericImplicit were not promising ... In principle, I'd say that setGenericImplicit() would be a good / "the correct" approach, but as you already tried un

Re: [Rd] codetools wrongly complains about lazy evaluation in S4 methods

2023-06-21 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 16 Jun 2023 11:41:12 +0200 writes: >>>>> Mikael Jagan >>>>> on Thu, 15 Jun 2023 22:00:45 -0400 writes: >> On 2023-06-15 5:25 pm, Hervé Pagès wrote: >>> Oh but I see no

Re: [Rd] Installation of R-4.3.1 with intel 2022

2023-06-21 Thread Martin Maechler
ile e.g. giving us the last 20 lines or so, e.g. from tail -n 20 /juno/opt/sources/R/R-4.3.1-intel21/tests/d-p-q-r-tst-2.Rout.fail Also, in addition to the output of sessionInfo(), the output of str(.Machine) maybe interesting. Once I'd see these, I might have to ask fur

Re: [Rd] Installation of R-4.3.1 with intel 2022

2023-06-22 Thread Martin Maechler
rm, *AND* if you also send the results of sessionInfo() {I've also asked you about in the last e-mail !} we'd already know enough to adapt the test, but I'd be interested to learn a bit more (via the above *.rds file). Thank you for helping to find more about the internal accur

Re: [Rd] Installation of R-4.3.1 with intel 2022

2023-06-22 Thread Martin Maechler
>>>>> Giuseppe Calò >>>>> on Thu, 22 Jun 2023 14:52:00 +0200 writes: > Hello Martin, this is output > R version 4.3.1 (2023-06-16) -- "Beagle Scouts" > Copyright (C) 2023 The R Foundation for Statistical Comp

Re: [Rd] New behavior when running script in package directory?

2023-06-22 Thread Martin Maechler
ort it there ... > Mikael Indeed. I have now replied to this CC'ing to ESS-help@... instead of R-devel@... It's visible in the mailing list *archives* now: https://stat.ethz.ch/pipermail/ess-help/2023-June/013203.html Martin [.]

Re: [Rd] Installation of R-4.3.1 with intel 2022

2023-06-22 Thread Martin Maechler
Others, e.g., Tomas, is much more expert than me about such error signalling, but *no*, I do not think that a disabled matherr is a problem, notably as you mention gcc doing it anyway, and gcc does not show a problem AFAIK. Martin > ———

Re: [Rd] Warning 'as.data.frame.POSIXct()' is deprecated

2023-07-06 Thread Martin Maechler
.POSIXct(as.POSIXct(x), row.names, >> optional, ...) >> if (!optional) >> names(value) <- deparse1(substitute(x)) >> value >> } >> >> >> Kind regards >> Enrico Indeed, thank you, Enrico! That's anot

Re: [Rd] logic tweak needed for as.data.frame. deprecation warning

2023-07-07 Thread Martin Maechler
t types I have amended the code, using sys.function(-1L) in the first check which does fix the above error and catches more false positives. This is now in R-devel svn rev >= 84653 and is planned to eventually be ported to the R 4.3.x series, i.e., currently "R 4.3.1 patched". Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [R] Errors in "An introduction to R"

2023-07-11 Thread Martin Maechler
uot; metaphor with > "workspace". I such word use here is correct. In other parts of the R-intro the "working directory" actually has been correct use (not even metaphoric). > -- > Best regards, Ivan Thank you again, Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Concerns with SVD -- and the Matrix Exponential

2023-07-17 Thread Martin Maechler
> J C Nash > on Sun, 16 Jul 2023 13:30:57 -0400 writes: > Better check your definitions of SVD -- there are several > forms, but all I am aware of (and I wrote a couple of the > codes in the early 1970s for the SVD) have positive > singular values. > JN Indeed.

Re: [Rd] feature request: optim() iteration of functions that return multiple values

2023-08-05 Thread Martin Becker
For a solution that does not require any change to the original function being optimized, the following one-liner could be used, which converts existing functions to functions that return only the first element: returnFirst <- function(fun) function(...) do.call(fun,list(...))[[1]] Example: f

Re: [Rd] hist(..., log="y")

2023-08-07 Thread Martin Maechler
timates, e.g. those by density(). Hence, I'd argue that if you expect enough sophistication from your "viewer"s to understand a log-scale histogram, I'd say you should use a density with log="x" and or "y" and I I have successfully do

Re: [Rd] Improving user-friendliness of S4 dispatch failure when mis-naming arguments?

2023-08-11 Thread Martin Maechler
slations and hence ensure you only check in case of English ...}. > but I don't suppose a full patch would be dramatically different from the > above. I agree: The patch looks to make sense to me, too, while I'm not entirely sure about the extra call. = FALSE (which I of c

Re: [Rd] R 4.3: Change in behaviour of as.character.POSIXt for datetime values with midnight time

2023-08-14 Thread Martin Maechler
idually* {smart R users ==> "think lapply(.)"} : Currently, this would be "something like" unlist(lapply(x, as.POSIXlt)) well, and then you need to jump a hoop additionally. If you want POSIXct, like this : .POSIXct(unlist(lapply( * , as.POSI

Re: [Rd] R 4.3: Change in behaviour of as.character.POSIXt for datetime values with midnight time

2023-08-15 Thread Martin Maechler
>>>>> Tim Taylor >>>>> on Mon, 14 Aug 2023 12:26:51 +0100 writes: > Martin, > Thank you. Everything you have written is helpful and I admit I am likely guilty of using as.character() instead of format() in the past(). > Ignoring the above

Re: [Rd] Heads up about documentation-related reports

2023-08-16 Thread Martin Maechler
Tierney and Tomas Kalibera wrote in their two R blogs: ==> https://blog.r-project.org/ and look for the 2 blog entries with "Reviewing Bug Reports" in their title. I'm sorry if the above does not sound encouraging.. I hope it still does encourage to rather concentrate on

Re: [Rd] Concerns with SVD -- and the Matrix Exponential

2023-08-16 Thread Martin Maechler
>>>>> Durga Prasad G me14d059 >>>>> on Wed, 16 Aug 2023 13:36:10 +0530 writes: > Dear Martin, I am getting different responses from different officials of > R-Software, well, well, .. Here on R-devel, we got two messages in addition to mine, none

[Rd] FYI: daily R source tarballs from ETH: *.xz instead of *.bz2)

2023-09-08 Thread Martin Maechler
z one (sorted newest first): https://stat.ethz.ch/R/daily/?C=M;O=D Best, Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] proposal: 'dev.capabilities()' can also query Unicode capabilities of current graphics device

2023-09-20 Thread Martin Maechler
The problem is that some pdf *viewers*, notably `evince` on Fedora Linux, for several years now, do *not* show *some* of the UTF-8 glyphs because they do not use the correct fonts {which *are* on the machine; good old `xpdf` does in that case show the glyphs}. Martin _

Re: [Rd] Recent changes to as.complex(NA_real_)

2023-09-22 Thread Martin Maechler
7;b' is NA_real_ or NaN, even where "information" > {nonzero 'b'} is clearly lost ... The question of *warning* here is related indeed, but I think we should try to look at it only *secondary* to your first proposal. > Whatever decision is made about as.com

Re: [Rd] Recent changes to as.complex(NA_real_)

2023-09-23 Thread Martin Maechler
inary part (e.g. think of the Riemann hypothesis), and typically vice versa. With your proposal, for a (potentially large) vector of complex numbers, after Re(z) <- 1/2 I could no longer rely on Re(z) == 1/2, because it would be wrong for those z where (the imaginary part/ the num

Re: [Rd] NROW and NCOL on NULL

2023-09-25 Thread Martin Maechler
L(NULL) being 1 is not > extremely good (and portable). Well, it remains *very* portable, as long as we keep the behavior. It has worked as it does for more than twenty years, and if you finally remain convinced that we won't change, it will remain portable between all versions of R f

Re: [Rd] Recent changes to as.complex(NA_real_)

2023-09-25 Thread Martin Maechler
>>>>> Hervé Pagès >>>>> on Sat, 23 Sep 2023 16:52:21 -0700 writes: > Hi Martin, > On 9/23/23 06:43, Martin Maechler wrote: >>>>>>> Hervé Pagès >>>>>>> on Fri, 22 Sep 2023 16:55:05 -0700 writes:

[Rd] is.atomic(NULL) will become FALSE

2023-09-25 Thread Martin Maechler
your code, already for current versions of R and will "automatically" continue to work correctly in future versions of R where is.atomic(NULL) will no longer be true. We hope this will help programming safe-ness *and* make learning and teaching of R more consistent. Enjoy using R!

Re: [Rd] Minor bug with stats::isoreg

2023-09-28 Thread Martin Maechler
75e+03 1.00 2.0056666 8 [16,] -5.e+09 -5.e+09 1.00 2.0056666 8 [17,] -5.e+99 -5.e+99 0.00 0.0000000 0 [18,] -5.e+199 -5.e+199 0.00 0.0000000 0 [19,] -5.0000e+299

Re: [Rd] Recent changes to as.complex(NA_real_)

2023-09-28 Thread Martin Maechler
> Gregory R Warnes > on Sat, 23 Sep 2023 13:22:35 -0400 writes: > It sounds like we need to add arguments (with sensible > defaults) to complex(), Re(), Im(), is.na.complex() etc to > allow the user to specify the desired behavior. I don't think I'd like such extra flexib

Re: [Rd] Recent changes to as.complex(NA_real_)

2023-09-28 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Thu, 28 Sep 2023 12:11:27 +0200 writes: >>>>> Gregory R Warnes >>>>> on Sat, 23 Sep 2023 13:22:35 -0400 writes: > > It sounds like we need to add arguments (with sensible > >

Re: [Rd] Use of `[` with array and resulting class

2023-09-29 Thread Steve Martin
This is due to `[` dropping dimensions by default. In your first example, think of a[1, , ] as having dimension c(1, 3, 2), but, because drop = TRUE, all dimensions of extent 1 (the first dimension) are dropped and the result has dimension c(3, 2). In your second example, b[1, , ] would have dimens

Re: [Rd] as(, "dgTMatrix")' is deprecated.

2023-10-03 Thread Martin Maechler
of it, >> but also too tired to track it down in Matrix. As far as >> I can grep I have no reference to either deprecated >> object, only the apparently innocuous Matrix::Matrix(A, >> sparse = TRUE). Can someone advise, Martin perhaps? I >&g

Re: [Rd] Subset has No Examples for Vector Data

2023-10-10 Thread Martin Maechler
2 1 3 1 > subset(tbl, tbl > 10) > #> random > #> H I K M > #> 13 14 17 11 > So it is subsetting vector data as wanted. > It is your expectation that a part of the table should be returned that > is not in ag

Re: [Rd] About FlexiBLAS in the R-admin docs

2023-10-12 Thread Martin Maechler
s part of R's sources, the latest version hence is always https://svn.r-project.org/R/trunk/doc/manual/R-admin.texi (or "almost always current" at one of its github mirrors ..) Best regards, Martin -- Martin Maechler ETH Zurich and R Core team >> Date: Wed, 27 Sep

Re: [Rd] as.character.Date() strips names in R 4.3.2 beta, bug?

2023-10-24 Thread Martin Maechler
. There's more about this if just simply at ?as.character.Date Best regards, Martin -- Martin Maechler ETH Zurich and R Core team __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] dim<-() changed in R-devel; no longer removing "dimnames" when doing dim(x) <- dim(x)

2023-10-30 Thread Martin Maechler
ssarily drop dimnames, e.g., in your `dim(x) <- dim(x)` case above, one could really argue that it's a "true loss" if x loses dimnames "unnecessarily" ... OTOH, I knew in the mean time that `dim<-` has always been documented to drop dimnames in all cases, and

Re: [Rd] dim<-() changed in R-devel; no longer removing "dimnames" when doing dim(x) <- dim(x)

2023-10-31 Thread Martin Maechler
>>>>> Hervé Pagès >>>>> on Mon, 30 Oct 2023 17:17:47 -0700 writes: > Hi Martin, Henrik, I actually like this change. > Makes a lot of sense IMO that dim(x) <- dim(x) be a no-op, > or, more generally, that foo(x) <- foo(x) be a no-op

[Rd] warnings() in R-devel: inherits from "warnings" - summary(warnings())

2023-10-31 Thread Martin Maechler
o get practically all warnings Best regards, Martin -- Martin Maechler ETH Zurich and R Core team __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] 'R CMD INSTALL' keeps going on despite serious errors, and returns exit code 0

2023-11-04 Thread Martin Maechler
(The bug was "only" in 382--388, fixed in 389 -- you were really unlucky!) Still, I'm sorry that you were accidentally affected, too. Martin >     * installing *source* package ‘CoreGx’ ... >     ** using staged installation >     ** R >   

Re: [Rd] c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?

2023-11-06 Thread Martin Maechler
he underlying "dilemma" that nobody can help us with is that "almost infinitely" many different complex numbers z fulfill is.na(z) |--> TRUE and only one of them is NA_complex_ and that may be unintuitive. OTOH, we already have for the doubles that there are at least t

Re: [Rd] c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?

2023-11-07 Thread Martin Maechler
for the 1st component, effectively changing the interpretation from "I don't know what this is" to "I don't know what this is but I'm sure it is on the real line". > Also, notice that things like >> Im(scan(text= "NA 0+1i", what=comp

Re: [Rd] c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?

2023-11-07 Thread Martin Maechler
>>>>> Michael Chirico >>>>> on Mon, 6 Nov 2023 23:18:40 -0800 writes: > Thanks Martin. My hang-up was not on what the outcome of as.complex(NA) > should be, but rather, how I should read code like c(x, y) generally. Till > now, I have

[Rd] False positives in check for lost braces (in tools::checkRd())

2023-11-07 Thread Martin Becker
reproducible example. Best regards and many thanks, Martin -- apl. Prof. Dr. Martin Becker, Akad. Oberrat Lehrstab Statistik Quantitative Methoden Fakultät für Empirische Humanwissenschaften und Wirtschaftswissenschaft Universität des Saarlandes Campus C3 1, Raum 2.17 66123 Saa

Re: [Rd] False positives in check for lost braces (in tools::checkRd())

2023-11-07 Thread Martin Becker
Am 07.11.23 um 23:00 schrieb Ivan Krylov: On Tue, 7 Nov 2023 17:13:05 +0100 Martin Becker wrote: More specifically, a 'Lost braces' NOTE is issued (at least sometimes) when using the \insertRef{...}{...} command from the Rdpack package. Does anything change if you use the d

Re: [Rd] False positives in check for lost braces (in tools::checkRd())

2023-11-07 Thread Martin Becker
Thank you very much, so I don't have to wait for the release of the new version of Rdpack on CRAN before submitting. Best regards, Martin -- apl. Prof. Dr. Martin Becker, Akad. Oberrat Lehrstab Statistik Quantitative Methoden Fakultät für Empirische Humanwissenschaften und Wirtschaftswiss

Re: [Rd] c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?

2023-11-09 Thread Martin Maechler
we now have had the parser accept 1i or 7i, 3.14i etc I think that it's not the *warning* that is wrong, but rather the *result* : Why should as.complex("1i") be different from one of these? > 1i [1] 0+1i > str2lang("1i") [1] 0+1i > scan(textConnection("

Re: [Rd] [R] Why Rprofile.site is not built with manual installation of R devel in linux?

2023-11-10 Thread Martin Maechler
{but not e.g. the crucial *.R ones !}. >> 2. In the installed R in /where/you/want/R/to/go, there is no even etc folder, there are only the folders bin, lib and share. >> Am I skipping some step? I am on Debain 12. Deb*ia*n {Debora(h) + Ian } Could it be that the Debian/Ubuntu default (for *their* build of /usr/bin/R ) where they indeed use an Rprofile.site and hence that Debian-specific setup is hurting you here in some way? I'm close to sure that Debian users may be able to help you one step further. Martin >> Thank you! >> Iago __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

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

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

2023-12-17 Thread Steve Martin
a scalar x, it was a >> vector. Your zapsmall() proposal wouldn't zap it to zero, and I don't >> see why summary() would if it was using your proposal. >> >> Duncan Murdoch >> >> On 17/12/2023 8:43 a.m., Gregory R. Warnes wrote: >> > Isn’t

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

2023-12-18 Thread Martin Maechler
tomatic choice : zapsmall <- function(x, digits = getOption("digits"), mFUN = function(x, ina) max(abs(x[!ina])), min.d = 0L) { if (length(digits) == 0L) stop("invalid 'digits'") if (all(ina <- is.na(x)

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

2023-12-18 Thread Steve Martin
<- mFUN(x[!ina]) round(x, digits = if(mx > 0) max(min.d, digits - as.numeric(log10(mx))) else digits) } Steve On Mon, Dec 18, 2023, 05:47 Serguei Sokol via R-devel wrote: > Le 18/12/2023 à 11:24, Martin Maechler a écrit : > >>>>>> Serguei Sokol via R-devel >

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

2023-12-19 Thread Martin Maechler
>>>>> Steve Martin >>>>> on Mon, 18 Dec 2023 07:56:46 -0500 writes: > 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.

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

2023-12-19 Thread Steve Martin
Thanks for sharing, Martin. You're right that the interface for mFUN should be more general than I initially thought.* Perhaps you have other cases/examples where the ina argument is useful, in which case ignore me, but your example with the robust mFUN doesn't use the ina argument.

Re: [Rd] [Feature Request] Hide API Key in download.file() / R's libcurl

2024-02-05 Thread Martin Maechler
> Simon Urbanek > on Sun, 4 Feb 2024 10:33:34 +1300 writes: > Any reason why you didn't use quiet=TRUE to suppress that > output? He wrote 'quite' instead of 'quiet' {see cited below '1. quite=1'} and probably never tried the correct spelling ... > There is no official

Re: [Rd] [EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments

2024-02-06 Thread Martin Morgan
this with data.frame df |> print(n = 2), which is an error (`n` partially matches `na.print`, and 2 is not a valid value); both methods silently ignore the typo print(m = 2). Martin Morgan From: R-devel on behalf of Henrik Bengtsson Date: Tuesday, February 6, 2024 at 4:34 PM To: Iz

Re: [Rd] round.Date and trunc.Date not working / implemented

2024-02-08 Thread Martin Maechler
> Jiří Moravec > on Wed, 7 Feb 2024 10:23:15 +1300 writes: > This is my first time working with dates, so if the answer is "Duh, work > with POSIXt", please ignore it. > Why is not `round.Date` and `trunc.Date` "implemented" for `Date`? > Is this because `Date` is (

Re: [Rd] Bug in comparison of language objects?

2024-02-21 Thread Martin Maechler
e() (which may have been the intention). > Duncan Murdoch I agree ... (and more do). Thank you for adding it as formal report to R's bugzilla, https://bugs.r-project.org/show_bug.cgi?id=18676 Unfortunately, it triggers something in the (byte) compiler test suite, and (also/hence) wi

Re: [Rd] `sort` hanging without R_CheckUserInterrupt()

2024-02-22 Thread Martin Maechler
> Aidan Lakshman > on Wed, 21 Feb 2024 15:10:35 -0500 writes: > Hi everyone, > Just a quick question/problem I encountered, wanted to make sure this is known behavior. Running `sort` on a long vector can take quite a bit of time, and I found today that there don’t seem to be

Re: [Rd] Spurious warning in as.data.frame.factor()

2024-03-14 Thread Martin Maechler
I (as "responsible" of the gymnastics) am grateful for Ivan's proposed additional S4-related conditions. Anybody trying S7 examples and see if they work w/o producing wrong warnings? > The patch passes make check-devel, but I'm not sure how to safely put > setGeneric('

Re: [Rd] Spurious warning in as.data.frame.factor()

2024-03-15 Thread Martin Maechler
>>>>> Ivan Krylov >>>>> on Thu, 14 Mar 2024 14:17:38 +0300 writes: > On Thu, 14 Mar 2024 10:41:54 +0100 > Martin Maechler wrote: >> Anybody trying S7 examples and see if they work w/o producing >> wrong warnings? &g

Re: [Rd] Spurious warning in as.data.frame.factor()

2024-03-15 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 15 Mar 2024 11:24:22 +0100 writes: >>>>> Ivan Krylov >>>>> on Thu, 14 Mar 2024 14:17:38 +0300 writes: >> On Thu, 14 Mar 2024 10:41:54 +0100 >> Martin Maechler wrote

Re: [Rd] `as.data.frame.matrix()` can produce a data frame without a `names` attribute

2024-03-22 Thread Martin Maechler
s` attribute, and it should be set to > `character()`. I agree. A (very nice IMO) patch I'm currently testing is 317c317 < names(value) <- collabs --- > names(value) <- collabs %||% character() Martin > Some evidence to support my theory is that >

Re: [Rd] `as.data.frame.matrix()` can produce a data frame without a `names` attribute

2024-03-22 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 22 Mar 2024 11:17:34 +0100 writes: >>>>> Davis Vaughan via R-devel >>>>> on Thu, 21 Mar 2024 15:10:29 -0400 writes: >> Hi all, >> I recently learned that it is pos

Re: [Rd] Repeated library() of one package with different include.only= entries

2024-04-11 Thread Martin Maechler
atures} has not been exercised a lot yet, and limitations as you found them haven't been noticed yet, or at least not noticed on the public R mailing lists, nor otherwise by R-core (?). Your implicitly proposed new feature (or even *changed* default be

Re: [Rd] [External] Re: Repeated library() of one package with different include.only= entries

2024-04-15 Thread Martin Maechler
names, old)) > } > Regardless, I think your suggestion to just point to > detach()+attachNamespace() is reasonable enough, the rare users that care > about this are likely to be able to figure out the rest from there. So I think we agree here; mentioning such a modify_

Re: [Rd] R 4.4.0 has version of Matrix 1.7-0, but it's not available on CRAN

2024-04-26 Thread Martin Maechler
wn tools/rsync-recommended script does. Finally, I'd think it definitely would be nice for install.packages("Matrix") to automatically get the correct Matrix version from CRAN ... so we (R-core) would be grateful for a patch to install.packages() to achieve this (unless

[Rd] Altrep and translations (was "[R] Description of error is untranslated when ....")

2024-05-14 Thread Martin Maechler
de R-core *and* at first just in a separate branch before being merged in to the main (r-devel) branch. OTOH: There may be good reasons for translations lookup being brittle in case of altrep error messages .. and hence left off purposely? Martin -- Martin Maechler ETH Zurich and R Core Team

<    7   8   9   10   11   12   13   14   15   16   >