Re: [Rd] sqrt(.Machine$double.xmax)^2 == Inf, but only on Windows in R

2025-04-29 Thread Martin Maechler
is the README you get here https://github.com/ThinkR-open/seven31 which does link also to the R FAQ at https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f Of tangential interest only: You mention that it is R 4.5.0 you use on Windows. Would you (or an

Re: [Rd] table() and as.character() performance for logical values

2025-04-14 Thread Martin Maechler
p". It is not true if R_print.na_width > 5 . > The output of > print(c(FALSE, NA), na.print = "**") > is not as it should be. Indeed (and this has been the case "always" in R); I think this itself is an (almost unrelated) inconsistecy to be

Re: [Rd] table() and as.character() performance for logical values

2025-04-10 Thread Martin Maechler
omputing or caching possible results of the C function 'StringFromLogical' allows as.character(L) to be as fast as c("FALSE", "TRUE")[L+1L] in R. For example, 'StringFromLogical' could be changed to > > attribute_hidden SEXP StringFromLogical(int

Re: [Rd] structure(, ...) is sticky: a bug, or should it be an error?

2025-03-21 Thread Martin Maechler
the bug is really there, rather than in >> structure(). >> >> Patches are welcome (via R's Bugzilla or just here). > Thank you Martin. I'll make sure I create a brief BugZilla > report on this, and hopefully a follow with a patch later > on. > One que

Re: [Rd] structure(, ...) is sticky: a bug, or should it be an error?

2025-03-21 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 21 Mar 2025 14:49:16 +0100 writes: >>>>> Henrik Bengtsson >>>>> on Thu, 20 Mar 2025 11:55:05 -0700 writes: >>> I'm pretty convinced we should fix it by

Re: [Rd] structure(, ...) is sticky: a bug, or should it be an error?

2025-03-20 Thread Martin Maechler
lp making it faster ... OTOH, structure() being a pure R function (no direct .Internal(), .Call() ..) is also important I think, as it keeps its code nicely self documenting. I'm pretty convinced we should fix it by checking for primitive functions inside the C code of `attributes<-` : arguably the bug is really there, rather than in structure(). Patches are welcome (via R's Bugzilla or just here). Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] S4: show() method for "MethodDefinition": show non-trivial generic

2025-03-11 Thread Martin Maechler
le (or *.Rout R batch) output. Apart from that, I see really advantages here, and I don't expect the net effect to be problematic. It may affect the many Bioconductor packages using S4, and I'm particularly glad for feedback from "there". With thanks in advance, 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] typo in R-exts.texi

2025-02-07 Thread Martin Maechler
>>>>> Tobias Verbeke >>>>> on Fri, 7 Feb 2025 18:20:50 + writes: > L.S. Please find below a tiny patch for a trivial typo. > Kind regards, Tobias Thank you, Tobias! --> Fixed already. Martin > diff --git a/doc/manual/R-exts

Re: [Rd] Development version of R fails a regression test

2025-01-21 Thread Martin Maechler
e test/check is really *not* working on your platform. To debug and notably fix the issue, I'd be glad if you could send me the console output on that platform of dput( extSoftVersion()[["BLAS"]] ) dput( La_library() ) dput( La_version() ) I definitely will get back to thi

Re: [Rd] as.data.frame() methods for model objects

2025-01-17 Thread Martin Maechler
d usetransFUN = NULL and then if(!is.null(transFUN)) { stopifnot(is.function(transFUN)) cf[, "Estimate"] <- transFUN(cf[, "Estimate"]) ci <- transFUN(ci) } Noting that I'd want "inverse-logit" (*) in some cases, but also

Re: [Rd] binomial()$linkinv no longer accepts integer values

2025-01-09 Thread Martin Maechler
hnically the latter would be more consistent with R, but if someone explicitly passes an integer to the inverse logit function in a real application then chances are it’s not intentional. I agree with Simon, I think we should do the extra step and allow integer (type, not just value) f

Re: [Rd] Possible issue in stats/arima.R package

2025-01-03 Thread Martin Maechler
>>>>> Martin Maechler on Thu, 2 Jan 2025 20:42:58 +0100 writes: >>>>> Duncan Murdoch on Thu, 2 Jan 2025 11:28:45 -0500 writes: >> On 2025-01-02 11:20 a.m., Duncan Murdoch wrote: >>> On 2025-01-02 9:04 a.m., Norbert Kuder wrote: >

Re: [Rd] Possible issue in stats/arima.R package

2025-01-02 Thread Martin Maechler
>>>>> Martin Maechler on Thu, 2 Jan 2025 20:42:58 +0100 writes: >>>>> Duncan Murdoch on Thu, 2 Jan 2025 11:28:45 -0500 writes: >> On 2025-01-02 11:20 a.m., Duncan Murdoch wrote: >>> On 2025-01-02 9:04 a.m., Norbert Kuder wrote: >>>

Re: [Rd] Possible issue in stats/arima.R package

2025-01-02 Thread Martin Maechler
at the mod value isn't being used. > Duncan Murdoch Thank you, Norbert and Duncan. A little bit (unfinished) aRcheology showed that both parts have been in the arima code since Dec 11 2003 (when the code, i.e., the whole package 'ts') was moved / merged into package 'stats'. I'll fix and quickly test the change, and then commit it. Congratulations indeed to Norbert Kuder for finding such (small) blemishes of such an age! ... and Happy New yeaR! to all readers. Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R_CheckUserInterrupt() can be a performance bottleneck within GUIs

2024-12-18 Thread Martin Maechler
## Min. 1st Qu. MedianMean 3rd Qu.Max. ## 0.9060 0.9185 0.9255 0.9524 0.9768 1.0910 ## *PATCHED* R Under development (unstable) (2024-12-17 r87446) -- "Unsuffered Consequences" summary(twRdev) ## Min. 1st Qu. MedianMean 3rd Qu.Max. ## 0.5000 0.5058 0.5075 0.5

[Rd] R_CheckUserInterrupt() can be a performance bottleneck within GUIs

2024-12-17 Thread Martin Becker
d possibly change) the position of R_CheckUserInterrupt() in some base R functions. For example, moving R_CheckUserInterrupt() from cwilcox() to pwilcox() and qwilcox() in src/nmath/wilcox.c may lead to a significant improvement (while still being feasible in terms of response time). Best,

Re: [Rd] Alternative to some recently changed parts of dates.R and datetime.R

2024-11-26 Thread Martin Maechler
R does not contain that any more .. and as you've noticed on Bugzilla, we are still tweaking the behaviour of format.POSIXlt() .. Thank you, very much, Suharto, for the two small improvements above (committed as svn rev 87382) !! Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Disabling S4 primitive dispatch during method resolution affects namespace load actions

2024-09-30 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 27 Sep 2024 18:47:06 +0200 writes: >>>>> Ivan Krylov via R-devel >>>>> on Fri, 27 Sep 2024 13:32:27 +0300 writes: >> Hello, >> This problem originally surfaced as

Re: [Rd] Disabling S4 primitive dispatch during method resolution affects namespace load actions

2024-09-27 Thread Martin Maechler
s short and looks ok. As you mention, speed loss may still be an issue, for S4/methods (including reference classes) - using R code. I was additionally interested to see your 'repro' package ([3]) and try if it does reproduce the problem ... and then if the patch resolves it and

Re: [Rd] findInterval

2024-09-17 Thread Martin Maechler
... |.. .|. ..| |.| .|| ## 2 0 0 1 0 0 1 ## 3 0 0 1 0 0 1 ## 4 0 0 1 0 0 1 ## 5 1 1 1 0 1 1 ## 6 1 1 1 1 1 1 ## 7 1 1 1 1 1 1 ## 8 1 1 1 1 1 1 ## 9 1 1 1 1 1 1 ## 10 2 2 2 1

Re: [Rd] Make factanal accept functions for rotation parameter

2024-08-22 Thread Martin Maechler
stion. unless I'm forgetting something. Can you please provide useful (but *small*) example, which I then also could add to the help page ? 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] 'Fedora' (only!!) -- Certificates are not trusted

2024-08-15 Thread Martin Maechler
ils because of incorrect installation PLEASE !!! Do not spam the R-devel mailing list with things that should've gone to r-sig-fed...@r-project.org { where I *did* CC this (a different msg), a moment ago This E-mail is hopefully the *LAST* one on R-devel with this topic!! } Martin (co-

Re: [Rd] R-devel on Windows temporarily broken?

2024-06-13 Thread Martin Maechler
> Dirk Eddelbuettel > on Thu, 13 Jun 2024 07:20:00 -0500 writes: > I had a very routine CI job fail twice this morning on r-devel on Windows; > the package (in fine standard form) doesn't even install under win-builder > r-devel. Whereas on Linux with r86731 everything is

Re: [Rd] head.ts, tail.ts loses time

2024-06-13 Thread Martin Maechler
>>>>> Spencer Graves >>>>> on Mon, 10 Jun 2024 09:45:46 -0500 writes: > Hi, Martin et al.: > On 6/10/24 9:32 AM, Martin Maechler wrote: >>>>>>> Spencer Graves >>>>>>> on Mon, 10 Jun 2024 07:50

Re: [Rd] head.ts, tail.ts loses time

2024-06-13 Thread Martin Maechler
7;s proposal, are now simple and "robust", I did not want to make such a "strong" change to such a basic class and its `[` operator. (I'm not *against* it either currently, but I'm not convinced it's worth the effort with possible subsequent changes needed in cod

Re: [Rd] head.ts, tail.ts loses time

2024-06-10 Thread Martin Maechler
ad() and tail() are built on `[` very much on purpose. Note that `[` should *not* keep the "ts" property in general, e.g., lynx[c(1:3, 7)] cannot be a regular time series I think I'd consider using windows() for a head.ts() and tail.ts(), but in any case, I am

[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

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

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] 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] `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] `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] 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] 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-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] `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] 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] 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] [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] [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] Should subsetting named vector return named vector including named unmatched elements?

2024-01-18 Thread Steve Martin via R-devel
Jiří, For your first question, the NA names make sense if you think of indexing with a character vector as the same as menu[match(select, names(menu))]. You're not indexing with "beans"; rather, "beans" becomes NA because it's not in the names of menu. (This is how it's documented in ?`[`: "Cha

Re: [Rd] tools::startDynamicHelp(): Randomly prevents R from exiting (on MS Windows)

2024-01-07 Thread Steve Martin via R-devel
Henrik, I was able to reproduce this both with Rscript and interactively using the same version of R you're using (fresh install) and Windows 10.0.22621.2715. It took about a dozen tries. Steve Original Message On Jan 6, 2024, 12:38, Henrik Bengtsson wrote: > ISSUE: On MS Wi

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] [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-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-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-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] 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] [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] 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] 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] 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

[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] 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

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-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] '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 >   

[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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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

[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] 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:

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-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] 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] 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 _

[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] 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

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] 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] 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] 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] 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] 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] 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] [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] 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] 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] 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] 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
>>>>> 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] 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-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] 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] 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] 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] 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] 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] 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] 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

[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] 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

  1   2   3   4   5   6   7   8   9   10   >