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

2024-05-14 Thread Martin Maechler
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: [R] Get a copy of a matrix only for TRUE entries of a matching size boolean matrix?

2024-05-06 Thread Martin Maechler
> DynV Montrealer > on Fri, 3 May 2024 10:39:10 -0400 writes: > It's exactly what I was looking for, thanks. I'm replying > to the whole list so others can skip this question, to not > waste time on it. good. > Bonne fin de journée de Montréal (nous sommes le matin

Re: [R] error when trying to install {rgdal} on Windows

2024-04-30 Thread Martin Maechler
[I have fixed your subject: "text" is really on of the most unuseful subjects we've ever seen on this list ... ] > Farzad Ghooshi on Sun, 28 Apr 2024 12:17:34 +0330 writes: > Hi dear friend I use rgdal package for shape files. > When installing the package, it gives me the following >

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-23 Thread Martin Maechler
> Ben Bolker > on Sun, 21 Apr 2024 10:23:50 -0400 writes: > Also https://cran.r-project.org/package=Oarray (which is older and > hence possibly more stable) also maintained and written by a careful and really good person. I do recommend Oarray as well. Martin BB> On

Re: [R] Building Packages.

2024-03-21 Thread Martin Maechler
> Ben Bolker > on Wed, 20 Mar 2024 13:25:33 -0400 writes: >Hmm, looks platform-specific. Under Linux both RStudio > and external R console return > a0b52513622c41c11e3ef57c7a485767 > for digest::digest(install.packages) Well, platform-specific maybe, notably

Re: [R] Building Packages.

2024-03-21 Thread Martin Maechler
> "Duncan Murdoch on Wed, 20 Mar 2024 13:20:12 -0400 writes: > On 20/03/2024 1:07 p.m., Duncan Murdoch wrote: >> On 20/03/2024 12:37 p.m., Ben Bolker wrote: >>> Ivan, can you give more detail on this? I've heard this >>> issue mentioned, but when I open RStudio and run

Re: [ESS] Error installing on Mac

2024-03-08 Thread Martin Maechler via ESS-help
> Liz Hare via ESS-help > on Thu, 7 Mar 2024 09:49:12 -0500 writes: > Liz Hare via ESS-help > on Thu, 7 Mar 2024 09:49:12 -0500 writes: > Hi all, > I'm updating ESS by installing from source. I uncommented the MacOS related lines from makeconfig, but I get this

Re: [R] converting MATLAB -> R | element-wise operation

2024-03-01 Thread Martin Maechler
> Berwin A Turlach > on Wed, 28 Feb 2024 17:42:27 +0800 writes: > On Tue, 27 Feb 2024 13:51:25 -0800 Jeff Newmiller via > R-help wrote: >> The fundamental data type in Matlab is a matrix... they >> don't have vectors, they have Nx1 matrices and 1xM >> matrices.

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-14 Thread Martin Maechler
> Berwin A Turlach > on Wed, 14 Feb 2024 11:47:41 +0800 writes: > Berwin A Turlach > on Wed, 14 Feb 2024 11:47:41 +0800 writes: > G'day Philipp, > On Tue, 13 Feb 2024 09:59:17 +0100 gernophil--- via R-help > wrote: >> this question is related to this

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Martin Maechler
> Rich Shepard > on Mon, 22 Jan 2024 07:45:31 -0800 (PST) writes: > A statistical question, not specific to R. I'm asking for > a pointer for a source of definitive descriptions of what > types of data are best summarized by the arithmetic, > geometric, and harmonic

Re: [ESS] Following up, success! [was RE: [R-win] Difficulty installing R packages under Windows 11 / Cygwin]

2024-01-05 Thread Martin Maechler via ESS-help
> Robert Lerche via ESS-help > on Wed, 3 Jan 2024 22:58:00 + writes: > Yes and thanks for responding. That is I think exactly what's needed and I have taken a shot at implementing it. [I'm glad my previous attached patch got filtered, I was a bit careless.] Here's a

Re: [R] Convert character date time to R date-time variable.

2023-12-08 Thread Martin Maechler
> Ebert,Timothy Aaron > on Thu, 7 Dec 2023 16:29:09 + writes: > Look at the lubridate package in R. Regards, Tim Absolutely *un*needed here !! - as others mention in this thread. Very simple with base R: > strptime("2020-09-17_00:00:00", format = "%Y-%m-%d_%H:%M:%S")

Re: [ESS] [External] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-02 Thread Martin Maechler via ESS-help
As R core and ESS core I still have never tried to install ESS under Windows. Just last week installed not only R for Windows (binary from CRAN) + Rtools43 (by Tomas, from CRAN) and was able to install my Rmpfr package (C code + external lib) *from source* -- again thanks to Tomas Kalibera's

Re: [ESS] How can one tell rlang not to mess up R session in ESS ?

2023-11-14 Thread Martin Maechler via ESS-help
> Dirk Eddelbuettel via ESS-help > on Mon, 13 Nov 2023 10:00:26 -0600 writes: > Casual searching at the rlang repo doesn't reveal anything so pardon me for > asking here but what is a simple way to tell rlang to NOT do fancy pants > color error backtraces? At least

Re: [R] Dependency errors for package pracma

2023-11-09 Thread Martin Maechler
> Hans W > on Thu, 9 Nov 2023 12:22:52 +0100 writes: > What really interests me: > With all those strict checking procedures, how is it possible that the > new 'Matrix' version got accepted on CRAN? There > 2000 reverse dependencies for Matrix. We have had some (in

Re: [R] Concordance and Kendall's tau in copula

2023-11-07 Thread Martin Maechler
eries book, as it's the only "real" book, I've been a coauthor.. https://copula.r-forge.r-project.org/book/ } -- Martin Maechler ETH Zurich and R Core team __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz

Re: [R] strptime with +03:00 zone designator

2023-11-06 Thread Martin Maechler
> Richard O'Keefe > on Mon, 6 Nov 2023 18:37:34 +1300 writes: > Thanks to all who replied. On Mon, 6 Nov 2023 at 18:37, > Richard O'Keefe wrote: >> OK, so the consensus is (1) One cannot make strptime >> accept ISO8601-compliant zone designators (2) The >>

Re: [R] Dynamically create a (convenience) function in a package

2023-10-30 Thread Martin Maechler
> Iris Simmons > on Mon, 30 Oct 2023 06:37:04 -0400 writes: > If you don't know the name of the attributes in advance, > how can you know the function name to be able to call it? > This seems like a very flawed approach. > Also, I would discourage the use of

Re: [R] The argument 'eps.Pvalue' of `printCoefmat()`

2023-10-30 Thread Martin Maechler
> Duncan Murdoch > on Sun, 29 Oct 2023 04:45:19 -0400 writes: > On 29/10/2023 3:48 a.m., Shu Fai Cheung wrote: >> Hi all, >> >> Just a minor issue that I am not sure whether this is >> considered a "bug." It is about the help page. >> >> In the help page

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread Martin Maechler
> Jin Li > on Mon, 23 Oct 2023 15:42:14 +1100 writes: > If you are interested in other validation methods (e.g., LOO or n-fold) > with more predictive accuracy measures, the function, glmnetcv, in the spm2 > package can be directly used, and some reproducible examples

Re: [R] stopping R emails

2023-10-19 Thread Martin Maechler
copied there before you manage > to unsubscribe. > With condolences, > John Nash >From me, as well. Jim Lemon has been one of the frequent really *friendly* and patient "helpers" to many who have searched for support and help on the R mailing lists (R-help and R-

Re: [R] save() and load(): *prefer* saveRDS() and readRDS()

2023-09-26 Thread Martin Maechler
> Jeff Newmiller via R-help > on Mon, 25 Sep 2023 18:46:02 -0700 writes: > You never created any object in R called irisdataTest. Objects in the global environment have names that are unrelated to the names of files on disk. > The load function modifies an environment to

Re: [R] Regarding error in RStudio

2023-09-06 Thread Martin Maechler
udio, you definitely need to get help from the RStudio community. Hoping that helps some steps further. Best regards, Martin -- Martin Maechler ETH Zurich and R Core team __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.et

Re: [R] Time out error while connecting to Github repository

2023-09-04 Thread Martin Maechler
> siddharth sahasrabudhe via R-help > on Sun, 3 Sep 2023 09:54:28 +0530 writes: > I want to access the .csv file from my github > repository. While connecting to the Github repository I am > getting the following error: > Error in curl::curl_fetch_memory(file) :

Re: [R] [Pkg-Collaboratos] BioShapes Almost-Package

2023-09-04 Thread Martin Maechler
> Duncan Murdoch > on Mon, 4 Sep 2023 04:51:32 -0400 writes: > On 03/09/2023 10:47 p.m., Jeff Newmiller wrote: >> Leonard... the reason roxygen exists is to allow markup >> in source files to be used to automatically generate the >> numerous files required by standard

Re: [R] [Pkg-Collaboratos] BioShapes Almost-Package

2023-09-04 Thread Martin Maechler
> Jeff Newmiller > on Sun, 03 Sep 2023 19:47:32 -0700 writes: > Leonard... the reason roxygen exists is to allow markup in > source files to be used to automatically generate the > numerous files required by standard R packages as > documented in Writing R Extensions.

Re: [R] MASS::mvrnorm() on MKL may produce different numbers even when the seed is the same?

2023-08-18 Thread Martin Maechler
deratum for all scientists and I hope also for all data "wranglers" etc.. Martin -- Martin Maechler ETH Zurich and R Core team > On Wed, Aug 16, 2023 at 8:11 PM Shu Fai Cheung > wrote: >> Hi All, >> >> When addressing an error in one of

Re: [ESS] ESS code-folding?

2023-08-17 Thread Martin Maechler via ESS-help
> Westerland, Maggie via ESS-help > on Thu, 17 Aug 2023 13:15:39 + writes: > Ah, I see how this is working now. This looks like a suitable solution for me! > Thanks all, > Maggie > -- > Maggie Westerland, MA > Statistical Programmer > BUMC, Dept of

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-17 Thread Martin Maechler
> Leonard Mada > on Wed, 16 Aug 2023 20:50:52 +0300 writes: > Dear Iris, > Dear Martin, > Thank you very much for your replies. I add a few comments. > 1.) Correct formula > The formula in the Subject Title was correct. A small glitch swept into > the last

Re: [ESS] New Emacs Modified distributions - now double the pleasure!

2023-08-16 Thread Martin Maechler via ESS-help
> Vincent Goulet via ESS-help > on Tue, 15 Aug 2023 16:24:42 + writes: > Hi folks, > Back in April 2022 [*], I asked here if there was still interest in my distributions of Emacs that ship with ESS and AUCTeX ready to go. Since the response was generally positive, and

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-16 Thread Martin Maechler
> Iris Simmons > on Wed, 16 Aug 2023 02:57:48 -0400 writes: > You might also be able to rewrite > log(1 - cos(x)) > as > log1p(-cos(x)) > On Wed, Aug 16, 2023, 02:51 Iris Simmons wrote: >> You could rewrite >> >> 1 - cos(x) >> >> as

Re: [R] Style guide when using "R" in a title

2023-07-27 Thread Martin Maechler
> Bert Gunter > on Wed, 26 Jul 2023 16:05:32 -0700 writes: > https://www.r-project.org/logo/ > Cheers, Bert Well, I tend to disagree. He did not say he'd want to use the R logo and there is really nobody saying that "you should". Using the letter 'R' as are regular word

Re: [R] change language at console

2023-07-19 Thread Martin Maechler
s" ru "несовместимые размерности" tr "uyumsuz boyutlar" zh_CN "维度不相配" zh_TW "維度不符合" > (nTrans <- length(unique(txts))) [1] 12 > (not_translated <- names(txt

Re: [R] Variable and value labels

2023-07-12 Thread Martin Maechler
> Anupam Tyagi > on Wed, 12 Jul 2023 09:18:55 +0530 writes: > Hello, > is there an easy way to do variable and value labels (for > factor variables) in base-R, without using a package. Yes, there are many. How many help pages (in R , i.e. base-R) did you consult?

Re: [R] printCoefmat() and zap.ind

2023-07-07 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 7 Jul 2023 18:12:24 +0200 writes: >>>>> Shu Fai Cheung >>>>> on Thu, 6 Jul 2023 17:14:27 +0800 writes: >> Hi All, >> I would like to ask two questions about prin

Re: [R] printCoefmat() and zap.ind

2023-07-07 Thread Martin Maechler
> Shu Fai Cheung > on Thu, 6 Jul 2023 17:14:27 +0800 writes: > Hi All, > I would like to ask two questions about printCoefmat(). Good... this function, originally named print.coefmat(), is 25 years old (in R) now:

Re: [ESS] ESS "taking over" {[Rd] New behavior when running script in package directory?}

2023-06-22 Thread Martin Maechler via ESS-help
> Mikael Jagan > on Wed, 21 Jun 2023 12:41:02 -0400 writes: > Surely this behaviour is just a case of ESS being "too clever", sourcing > *.R files in special way when it detects that a file belongs to a package > (loading dependencies automatically, etc.)? > The

Re: [R] warnng to an error....

2023-06-19 Thread Martin Maechler
> akshay kulkarni > on Sat, 17 Jun 2023 18:35:53 + writes: > Dear Bert, Duncan's theory is workingprobably the same > as yours... "theory" .. well *truth*. Note that I wrote a blog post I had hope would be read more ( --> and be cited more .. when helping peopling

Re: [R] error in arfima...

2023-06-09 Thread Martin Maechler
I raise a bug report? If yes, how( I never raised one)? We don't know yet if there is any bug, see above. Martin > THanking you, > Yours sincerely, > AKSHAY M KULKARNI > > From: Martin Maechler > Sent: Monday, Ju

Re: [R] error in arfima...

2023-06-05 Thread Martin Maechler
ypically memory protection/allocation/... bugs] fracdiff itself has also been updated (to 1.5-2) but that was really only a compiler warning, not a bug fix, and I cannot imagine that that makes the difference. I think you should consider let your 'Windows Server' provider update R on that server.

Re: [R] error in arfima...

2023-06-01 Thread Martin Maechler
ords arfima() calls fracdiff::fracdiff() and the error happens there --- for you, but not for me, if I try to use the same data as you. I see that you must have found that too, because you mentioned View(environment(fracdiff)$.fdcov) Maybe you need to update.packages()

[R] Asking about R "Security" ..

2023-05-17 Thread Martin Maechler
> Ivan Krylov > on Wed, 17 May 2023 11:52:27 +0300 writes: > В Tue, 16 May 2023 13:47:19 + > "MAJID, Ayesha \(NHS ENGLAND - X26\) via R-help" [ . ] [ . ] [ .. helpful & useful answers / pointers to public information .. ] [ . ] [

Re: [R] Regex Split?

2023-05-05 Thread Martin Maechler
ot;o" "; " "t" "h" "r" "e" "e" "!" >> gsub(pattern="[[:<:]]", "#", "One, two; three!", perl=TRUE) > [1] "#One, #two; #three!" [...] [...] Maybe this should be continued either

Re: [R] "prob" package alternative

2023-04-06 Thread Martin Maechler
> peter murage > on Tue, 4 Apr 2023 06:24:56 + writes: > Which package in R replaced package prob? Well, if you google that you should quickly be lead to (something I even think makes sense to memorize as "rule" package= ) : https://CRAN.R-project.org/package=prob

Re: [R] Flickering when scrolling in R graphics windows

2023-01-24 Thread Martin Maechler
> Ziyun Tang > on Sat, 21 Jan 2023 15:14:15 -0500 writes: > Hello, I have been experiencing some issues regarding scrolling with > the mouse or trackpad in R graphics windows (from the base graphics > package), which sometimes results in flickering, and wanted to see if

Re: [R] Printing special characters

2023-01-16 Thread Martin Maechler
> Rui Barradas > on Mon, 16 Jan 2023 08:46:43 + writes: > Às 08:31 de 16/01/2023, Jeff Newmiller escreveu: >> Use the Cairo PDF device? >> >> On January 16, 2023 12:18:48 AM PST, Dennis Fisher >> wrote: >>> R 4.2.2 OS X >>> >>> Colleagues

Re: [R] Integer division

2022-12-21 Thread Martin Maechler
ns, I'd say, and I'd guess these would already exist somewhere. Yesterday, I've updated the ?Arithmetic help page which now does mention (more clearly if it was really already derivable from the previous doc) what happens, also mentioning Knuth and the Wikipedia page. --> https://stat.ethz

Re: [R] Integer division

2022-12-19 Thread Martin Maechler
%% uses the "floored" version, as recommended by Donald Knuth and as documented on the above Wikipedia page. Martin > On December 19, 2022 7:15:01 AM PST, "Göran Broström" > wrote: >> >> >> Den 2022-12-19 kl. 15:41, skrev Martin Maechler:

Re: [R] Integer division

2022-12-19 Thread Martin Maechler
> Göran Broström > on Mon, 19 Dec 2022 14:22:00 +0100 writes: > I have a long vector x with five-digit codes where the > first digit of each is of special interest, so I extracted > them through >> y <- x %/% 1 > but to my surprise y contained the value -1

Re: [R] bgroup not rendering properly

2022-12-13 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Tue, 13 Dec 2022 11:02:23 +0100 writes: >>>>> Jinsong Zhao >>>>> on Tue, 13 Dec 2022 17:07:00 +0800 writes: >> I don Jinsong started on top and I did not see his continuation at th

Re: [R] bgroup not rendering properly

2022-12-13 Thread Martin Maechler
> Jinsong Zhao > on Tue, 13 Dec 2022 17:07:00 +0800 writes: > I don > On 2022/12/13 10:13, Derek Ogle wrote: >> bgroup() from plotmath does not render properly for >> me. For example >> >> plot(0,xlim=c(0,1),ylim=c(0,1)) >>

Re: [R] if documentation

2022-12-07 Thread Martin Maechler
> PIKAL Petr > on Wed, 7 Dec 2022 07:04:38 + writes: > Hallo all Not sure if it is appropriate place but as I am > not involved in r-devel list I post here. > Documentation for Control (if, for, while, .) is missing > "if else" command. Although it can be

Re: [R] confusion about dev.prev()

2022-12-06 Thread Martin Maechler
> Peter Langfelder > on Mon, 5 Dec 2022 21:40:13 +0800 writes: > Ah, thanks, got it. Misread the help again... ... I think we all had ... and then known for a while and then forgot again ... If you see how to improve the help page, so this happens less, .. we'd look at it to

Re: [ESS] A discrepancy between elpa version and ubuntu/mint version

2022-11-20 Thread Martin Maechler via ESS-help
On Thu, Nov 17, 2022 at 7:29 PM Ottorino via ESS-help wrote: > > Hi all, > > I think I've found a discrepancy > > in file > > /home/user/.emacs.d/elpa/ess-20221108.1714/ess-r-mode.el > > at lines 264-270 > > I can find the variable > > ess-r-mode-map > > while in > >

Re: [R] Rare behaviour for nlme::reStruct example and question about ?lmeObject

2022-11-18 Thread Martin Maechler
> Iago > on Thu, 17 Nov 2022 11:53:31 +0100 writes: > Thank you Martin, > Regarding my question about `terms`, I meant the `terms` component of > the `lme` output. For example, for > fm1 <- lme(distance ~ age, data = Orthodont) > I can see through str(fm1),

Re: [R] Rare behaviour for nlme::reStruct example and question about ?lmeObject

2022-11-17 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Thu, 17 Nov 2022 09:16:04 +0100 writes: >>>>> Andrew Simmons >>>>> on Tue, 15 Nov 2022 18:01:55 -0500 writes: >> This seems to be a bug. I tried creating this function in th

Re: [R] Rare behaviour for nlme::reStruct example and question about ?lmeObject

2022-11-17 Thread Martin Maechler
> Andrew Simmons > on Tue, 15 Nov 2022 18:01:55 -0500 writes: > This seems to be a bug. I tried creating this function in the global > environment: > str.pdMat <- function (object, ...) > { > if (nlme::isInitialized(object)) { > NextMethod() > }

Re: [ESS] Tab completion for CamelCase

2022-11-08 Thread Martin Maechler via ESS-help
> Naresh Gurbuxani via ESS-help > on Mon, 7 Nov 2022 17:54:58 + writes: > My ess setup on mac works well with tab completion of CamelCase variable names. However, on Windows, tab completes variable names with all lowercase letters. So it does give me complete variable

Re: [R] unexpected 'else' in " else"

2022-10-21 Thread Martin Maechler
than ifelse(Cnd, A, B) whenever it is appropriate, i.e., the condition Cnd is a simple TRUE or FALSE. ifelse() is very much over-used! {For the more sophisticated reader: In R, these both are function calls: `if` is a function of 3 argument with a "peculiar" syntax and the third

Re: [R] Unintended behaviour of stats::time not returning integers for the first cycle

2022-10-19 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Wed, 19 Oct 2022 10:05:31 +0200 writes: >>>>> Andreï V Kostyrka >>>>> on Tue, 18 Oct 2022 16:26:28 +0400 writes: >> Sure, this works, and I was thinking about this solution, but it

Re: [R] Unintended behaviour of stats::time not returning integers for the first cycle

2022-10-19 Thread Martin Maechler
hould only happen when the user asks for it, say by using a new argument 'roundYear = TRUE' (where the default remains roundYear=FALSE). Martin Maechler ETH Zurich and R Core tam > x <- ts(2:252, start = c(2002, 2), freq = 12) > d <- seq.Date(as.Date("2002-02-01")

Re: [R] Error in if (class(networks) == "matrix") from a function

2022-09-22 Thread Martin Maechler
> Eric Berger > on Wed, 21 Sep 2022 22:26:39 +0300 writes: > In R 4.2.0 there is a significant change. When you use an if() statement > with a condition of length > 1 this now reports an error. > e.g. this link mentions it as a change >

Re: [R] Error generated by nlme::gnls

2022-07-28 Thread Martin Maechler
Ben et al. ! This is indeed a very old coding bug triggered by the more strict checks in R 4.2.x. I will indeed try Bill's proposal rather than remaining with deparse by using deparse1(). "Of course", this should hopefully be fixed in the next release of nlme. Martin Maechler ETH Zuric

Re: [R] R_LIBS var needed to be set after upgrade to R 4.2.2

2022-06-02 Thread Martin Maechler
> Ashim Kapoor > on Wed, 1 Jun 2022 14:30:58 +0530 writes: > Dear Sir, >> > I upgraded to R 4.2.2 on Debian 10 today. >> >> Well, I assume you mean R 4.2.0 .. at least that one exists. > My bad, yes I made a typo. I did mean R 4.2.0. >> > The R shell

Re: [R] R_LIBS var needed to be set after upgrade to R 4.2.2

2022-06-01 Thread Martin Maechler
> Ashim Kapoor > on Wed, 1 Jun 2022 11:24:21 +0530 writes: > Dear All, > I upgraded to R 4.2.2 on Debian 10 today. Well, I assume you mean R 4.2.0 .. at least that one exists. > The R shell incantation worked fine and all libraries would load but, > I needed to point

Re: [R] glm with family binomial and link identity

2022-04-28 Thread Martin Maechler
TLDR: No, there was no such change in R 4.2.0 > Ralf Goertz > on Wed, 27 Apr 2022 10:27:33 +0200 writes: > Hi, > I just noticed that (with my version 4.2.0) it is no longer possible to > use glm with family=binomial(link=identity). Why is that? It was > possible

Re: [R] pam() with more general dissimilarity / distance

2022-04-08 Thread Martin Maechler
se the correct distance between your observational units, After that you can use the computed distance / dissimilarity matrix (the `dx`) in you call to pam(): px <- pam(dx, k=., ) I hope this helps you. With best regards, Martin -- Martin Maechler ETH Zurich ‪ ___

Re: [R] [External] Weird behaviour of order() when having multiple ties

2022-01-31 Thread Martin Maechler
> Stefan Fleck > on Sun, 30 Jan 2022 21:07:19 +0100 writes: > it's not about the sort order of the ties, shouldn't all the 1s in > order(c(2,3,4,1,1,1,1,1)) come before 2,3,4? because that's not what > happening aaah.. now we are getting somewhere: It looks you have

Re: [R] function problem: multi selection in one argument

2022-01-25 Thread Martin Maechler
ui Barradas Thank you, Rui! Note that your base R solution can be vastly simplified : > f6 <- function(data, ...) table(data[, unlist(list(...))]) > f6(mtcars, "am", "cyl") cyl am 4 6 8 0 3 4 12 1 8 3 2 > If you started measuring carefully

Re: [R] How to create density ellipses with R

2022-01-14 Thread Martin Maechler
-- Gerrit Also, with Recommended packages 'cluster' and its ellipsoidPoints() function: The result of library(cluster) example(ellipsoidPoints) is the attached plot with a classical and robust (via recommend pkg 'MASS') covariance ellipse drawn. Best, Martin -- Martin Mae

Re: [R] Adding SORT to UNIQUE

2021-12-20 Thread Martin Maechler
> Rui Barradas > on Mon, 20 Dec 2021 17:05:33 + writes: > Hello, > Package stringr has functions str_sort and str_order, both with an > argument 'numeric' that will sort the numbers correctly. > Maybe that's what you are looking for, see the example below.

Re: [R] Bug in list.files(full.names=T)

2021-12-20 Thread Martin Maechler
> Bill Dunlap > on Mon, 20 Dec 2021 08:40:04 -0800 writes: >> >> > Why would one ever *add* a final unneeded path separator, >> > unless one wanted it? >> > Good question, but it is common for Windows installer programs to add a > terminal backslash to PATH

Re: [R] Bug in list.files(full.names=T)

2021-12-20 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 20 Dec 2021 09:46:23 +0100 writes: >>>>> Mario Reutter >>>>> on Sat, 18 Dec 2021 15:55:37 +0100 writes: >> Dear everybody, >> I'm a researcher in the field of psych

[R] Call for proposals to organize useR! 2023 as a hybrid conference

2021-12-20 Thread Martin Maechler
Dear All, The R Foundation Conference Committee invites proposals to organize useR! 2023 as a hybrid conference: https://www.r-project.org/conferences/useR_2023_call.html The call is open to hosts worldwide and the deadline for outline proposals is **Friday 28 January 2022**. Any queries

Re: [R] Bug in list.files(full.names=T)

2021-12-20 Thread Martin Maechler
gt; My question would now be if this warrants a bug report? I don't think so. As I'm saying above, I think this has rather been a bug fix, making R more universal / less platform-dependent. Last but not least: You'd ideally update more than every 2.5 years... Best, Martin Maechler

Re: [R] Forwarding missing arguments to the `[` method

2021-12-09 Thread Martin Maechler
> Ivan Krylov > on Wed, 8 Dec 2021 16:52:00 +0300 writes: I have always learnt a lot about programming when reading other people's code .. notably if those people new what they are doing. In this case, studying R-core's `[.data.frame` and `[<-.data.frame` {or for S4 methods, the

Re: [R] GPL or not (was "(no subject)")

2021-11-10 Thread Martin Maechler
r, pryr, vetr, DPQ, round, ... {I count about 80 CRAN packages} Martin -- Martin Maechler ETH Zurich and R Core team > Le mar. 9 nov. 2021 à 22:51, Duncan Murdoch a écrit : >> >> On 09/11/2021 3:52 p.m., Jeff Newmiller wrote: >> > I understa

Re: [R] extracting a R object from an R image

2021-11-06 Thread Martin Maechler
> Jeff Newmiller > on Fri, 05 Nov 2021 16:45:02 -0700 writes: > IMO you are being a bit too literal. It is absolutely possible to load the file into a dedicated environment and use the $ or [[]] extraction operator to access a specific object in that environment. > ?load

Re: [R] typo in documentation for array // how to report such

2021-11-01 Thread Martin Maechler
know how to efficiently address this. .. and yes, I've added the missing "be" now ... but (of course) not in time for the release of R 4.1.2 which is planned for today. Martin Martin Maechler ETH Zurich and R Core team __ R-help@r-projec

Re: [R] customize the step value

2021-10-29 Thread Martin Maechler
> Duncan Murdoch > on Fri, 29 Oct 2021 09:07:31 -0400 writes: > On 29/10/2021 4:34 a.m., PIKAL Petr wrote: >> Hi >> >> One has to be careful when using fractions in seq step. >> >> Although it works for 0.5 >>> (seq(0,10, .5) - round(seq(0,10,.5),2))==0

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Bert Gunter > on Wed, 27 Oct 2021 10:47:14 -0700 writes: > See ?load, but you may be confused. Strictly speaking, there is no code in > an .Rdata file, only a (typically binary, but possibly ascii) > representation of objects, usually as produced by ?save. Of course,

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Jeff Newmiller > on Wed, 27 Oct 2021 11:43:08 -0700 writes: > Sounds right, though the OP appears to be assuming that the code used to generate the data objects in the file will also be there, and we need to be more definitive about that: it is not. Depending how the code was

Re: [R] KeyboardSimulator mouse.get_cursor() Not Working

2021-10-26 Thread Martin Maechler
6-64" > "JSparks" user effective_user "JSparks" "JSparks" BTW: A package *only* available on Windows What was the answer of maintainer("KeyboardSimulator") when you asked him about the problem? This is *the* approach to take first in such cases...

Re: [R] Do not show a "message d'avis" that qbeta reports

2021-10-20 Thread Martin Maechler
lp, you could contact someone on > that list. > Duncan Murdoch Indeed. Currently, the French team is just one person, and maybe they will be happy to share the workload or to get another pair of eyes to look at it... Martin Maechler > On 20/10/2021 6:47 a.m., Marc Girondot via

Re: [R] Replacing NA s with the average

2021-10-19 Thread Martin Maechler
an imputation' should rarely be used): > citation(package="mice") To cite mice in publications use: Stef van Buuren, Karin Groothuis-Oudshoorn (2011). mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, 45(3), 1-67. URL https://www.jstatsof

[R] Sebastian Meyer joins the R core team

2021-10-14 Thread Martin Maechler
We are very happy to announce that Sebastian Meyer (http://www.imbe.med.uni-erlangen.de/ma/S.Meyer ; Twitter @bastistician; also https://github.com/bastistician/) has joined the R core team yesterday (Oct 13). He has been an active contributor notably in handling and fixing R

Re: [ESS] Advice on setting up ESS to edit and knit Rmarkdown files

2021-09-22 Thread Martin Maechler via ESS-help
> Lionel Henry via ESS-help > on Wed, 22 Sep 2021 15:15:42 +0200 writes: > We'd love to do a release but ESS is not in a good place > right now. Definitely. The reason is that there have been too many bugs introduced with the new features, so we could/should not release.

Re: [R] Windows: start script but keep being in R-shell after finish

2021-09-22 Thread Martin Maechler
> Duncan Murdoch > on Tue, 21 Sep 2021 09:09:40 -0400 writes: > On 21/09/2021 3:12 a.m., c.bu...@posteo.jp wrote: >> Hello together, >> >> I was using R some years ago and I am sorry for asking such a dumb >> question. I found some help instructions about

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread Martin Maechler
> Bert Gunter > on Tue, 24 Aug 2021 10:50:50 -0700 writes: > 1. No Excel attachments made it through. Binary > attachments are generally stripped by the list server for > security reasons. > 2. As you may have already learned, this is the wrong > forum for

Re: [R] Formula compared to call within model call

2021-08-11 Thread Martin Maechler
sor functions: identical(formula(m1), formula(m2)) # TRUE ! ## and indeed, the formula() method for 'lm' does set the environment: stats:::formula.lm -- Martin Maechler ETH Zurich and R Core __ R-help@r-project.org mailing list -- To UNSUBSCRI

Re: [R] density with weights missing values

2021-07-13 Thread Martin Maechler
with weights missing values > Does your copy of R say that the weights must add up to 1? > ?density doesn't say that in mine. But it does check. another small part to could be improved, indeed, thank you, Richard. -- Martin Maechler ETH Zurich and R Core t

Re: [R] Beginner problem - using mod function to print odd numbers

2021-06-09 Thread Martin Maechler
fooverse): Use num[num %% 2 == 1] instead of much slower and ...@#^$ num[ifelse(num %% 2 == 1, TRUE, FALSE)] Martin Maechler ETH Zurich > On Sat, Jun 5, 2021 at 2:05 PM William Michels via R-help > wrote: >> >> > i <- 1L; span <- 1:100; result <-

Re: [R] Solving a quadratically constrained linear program with inital values

2021-05-18 Thread Martin Maechler
e no idea whether your query even makes > mathematical sense.) Indeed, it *does* make sense; at least for the case of positive (semi-)definite \Sigma which we may well assume for the moment. Martin Maechler > Bert Gunter > "The trouble with having an open mind is th

Re: [R] Matrix::solve() with 1-d arrays -- treating "array" as "numeric"?

2021-04-19 Thread Martin Maechler
>>>>> Deepayan Sarkar >>>>> on Mon, 19 Apr 2021 09:56:58 +0530 writes: > On Sat, Apr 17, 2021 at 9:08 PM Martin Maechler > wrote: >> >> >>>>> Deepayan Sarkar >>>>> on Fri, 16 Apr 2021

Re: [R] Matrix::solve() with 1-d arrays -- treating "array" as "numeric"?

2021-04-17 Thread Martin Maechler
> Deepayan Sarkar > on Fri, 16 Apr 2021 11:34:20 +0530 writes: > I get what I initially thought was unexpected behaviour from: > x <- tapply(runif(100), sample(5, 100, TRUE), mean) > solve(Diagonal(5), x) > # Error: not-yet-implemented method for solve(, ). > #

Re: [R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

2021-04-07 Thread Martin Maechler
bit hidden nowadays, (not the least because CRAN still uses frames (würg!!)): https://cloud.r-project.org/bin/linux/debian/ A very nice and useful page, much underrated and underused, probably. Best regards, Martin Maechler ETH Zurich and R Core Team > When I google around for the e

Re: [ESS] ESS M-x R failing in a Windows installation

2021-03-15 Thread Martin Maechler via ESS-help
> Sparapani, Rodney via ESS-help > on Wed, 10 Mar 2021 15:40:05 + writes: > Hi Jeremie: As you say, Windows installs do depend on the > user’s preferences. However, in ancient ESS (circa 2004), > we coded around this by going to the Windows registry. > However, I

Re: [R] quantile from quantile table calculation without original data

2021-03-08 Thread Martin Maechler
> Jeff Newmiller > on Fri, 05 Mar 2021 10:09:41 -0800 writes: > Your example could probably be resolved with approx. If > you want a more robust solution, it looks like the fBasics > package can do spline interpolation. base R's spline package does spline interpolation

Re: [R] readline in function call with space in prompt.

2021-02-09 Thread Martin Maechler
> Jeremie Juste > on Mon, 08 Feb 2021 14:28:33 +0100 writes: > Hello, > I have noticed a behavior that I don't understand. When I call the > following function from the prompt. > test <- function(){ > a <- readline("selection: ") > a > } >> test()

Re: [R] arima/fixed

2021-02-01 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Sat, 30 Jan 2021 12:21:14 +0100 writes: >>>>> Rolf Turner >>>>> on Sat, 30 Jan 2021 16:11:32 +1300 writes: >> On Fri, 29 Jan 2021 12:47:25 + Nasia Petsa >>

  1   2   3   4   5   6   7   8   9   >