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

2023-12-18 Thread Serguei Sokol via R-devel
Le 18/12/2023 à 11:24, Martin Maechler a écrit : Serguei Sokol via R-devel on Mon, 18 Dec 2023 10:29:02 +0100 writes: > Le 17/12/2023 à 18:26, Barry Rowlingson a écrit : >> I think what's been missed is that zapsmall works relative to the absolute >>

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

2023-12-18 Thread Serguei Sokol via R-devel
Le 17/12/2023 à 18:26, Barry Rowlingson a écrit : I think what's been missed is that zapsmall works relative to the absolute largest value in the vector. Hence if there's only one item in the vector, it is the largest, so its not zapped. The function's raison d'etre isn't to replace absolutely sm

Re: [Rd] Strange behaviour of do.call()

2023-09-19 Thread Serguei Sokol via R-devel
Le 19/09/2023 à 16:44, Duncan Murdoch a écrit : The knitr::kable() function does some internal setup, including determining the target format, and then calls an internal function using   do.call(paste("kable", format, sep = "_"), list(x = x,     caption = caption, escape = escape, ...)) I

Re: [Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Serguei Sokol via R-devel
Le 26/06/2023 à 17:17, Serguei Sokol a écrit : Le 26/06/2023 à 16:26, Dipterix Wang a écrit : I hope I'm not asking a stupid question... Many think that there is no such thing as "stupid question". However, this one looks more appropriate for r-help list, does not it?   If I symlink a directo

Re: [Rd] dir.exists returns FALSE on Symlink directory

2023-06-26 Thread Serguei Sokol via R-devel
Le 26/06/2023 à 16:26, Dipterix Wang a écrit : I hope I'm not asking a stupid question... Many think that there is no such thing as "stupid question". However, this one looks more appropriate for r-help list, does not it? If I symlink a directory, is symlink considered as directory in R? If

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

2023-06-07 Thread Serguei Sokol via R-devel
Le 03/06/2023 à 17:50, Mikael Jagan a écrit : In a package, I define a method for not-yet-generic function 'qr.X' like so:     > setOldClass("qr")     > setMethod("qr.X", signature(qr = "qr"), function(qr, complete, ncol) NULL) The formals of the newly generic 'qr.X' are inherited from the

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

2023-05-04 Thread Serguei Sokol via R-devel
Le 03/05/2023 à 01:25, Henrik Bengtsson a écrit : Along the lines of calling R_CheckUserInterrupt() only onces in a while: OTOH, in the past we have had to *disable* R_CheckUserInterrupt() in parts of R's code because it was too expensive, {see current src/main/{seq.c,unique.c} for a series o

Re: [Rd] xyTable(x,y) versus table(x,y) with NAs

2023-04-25 Thread Serguei Sokol via R-devel
Le 25/04/2023 à 17:39, Bill Dunlap a écrit : x <- c(1, 1, 2, 2, 2, 3) y <- c(1, 2, 1, 3, NA, 3) str(xyTable(x,y)) List of 3 $ x : num [1:6] 1 1 2 2 NA 3 $ y : num [1:6] 1 2 1 3 NA 3 $ number: int [1:6] 1 1 1 NA NA 1 How many (2,3)s do we have? At least one, the third entry, bu

Re: [Rd] xyTable(x,y) versus table(x,y) with NAs

2023-04-25 Thread Serguei Sokol via R-devel
I correct myself. Obviously, the line first[is.na(first) | isFALSE(first)] <- FALSE should read first[is.na(first)] <- FALSE Serguei. Le 25/04/2023 à 11:30, Serguei Sokol a écrit : Le 25/04/2023 à 10:24, Viechtbauer, Wolfgang (NP) a écrit : Hi all, Posted this many years ago (https://stat

Re: [Rd] xyTable(x,y) versus table(x,y) with NAs

2023-04-25 Thread Serguei Sokol via R-devel
Le 25/04/2023 à 10:24, Viechtbauer, Wolfgang (NP) a écrit : Hi all, Posted this many years ago (https://stat.ethz.ch/pipermail/r-devel/2017-December/075224.html), but either this slipped under the radar or my feeble mind is unable to understand what xyTable() is doing here and nobody bothered

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

2023-03-06 Thread Serguei Sokol via R-devel
Le 04/03/2023 à 01:21, Pavel Krivitsky a écrit : Dear All, Currently, list= in base::replace(x, list, value) has to be an index vector. For me, at least, the most common use case is for list= to be some simple property of elements of x, e.g., x <- c(1,2,NA,3) replace(x, is.na(x), 0) Particular

Re: [Rd] uniroot violates bounds?

2023-02-20 Thread Serguei Sokol via R-devel
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. The following extends Ben's example, but adds the unirootR with trace output. c1 <- 4469.822 c2 <- 572.3413 f <- function(x) { c1/x - c2/(1-x) }; uniroot(f, c(1e-6, 1)) uniroot(

Re: [Rd] Combinations and Permutations

2023-01-13 Thread Serguei Sokol via R-devel
Le 13/01/2023 à 09:00, Dario Strbenac via R-devel a écrit : Good day, In utils, there is a function named combn. It would seem complementary for utils to also offer permutations because of how closely mathematically related they are to each other. Could permutations be added to save on a packa

Re: [Rd] rhub vs. CRAN fedora-*-devel, using armadillo & slapack

2023-01-10 Thread Serguei Sokol via R-devel
Looks like there is a kind of misunderstanding... Le 10/01/2023 à 17:27, RICHET Yann a écrit : > Thank you for your answer. > In facts, 10 threads are asked by armadillo for some LinAlg, which backs to > two threads as warned. But I cannot imagine this costs so much time just for > that... Exces

Re: [Rd] rhub vs. CRAN fedora-*-devel, using armadillo & slapack

2023-01-10 Thread Serguei Sokol via R-devel
Le 10/01/2023 à 11:37, Serguei Sokol a écrit : Le 10/01/2023 à 10:44, RICHET Yann a écrit : Dear R-devel people, We are working to submit a package which is mainly a binding over a C++ lib (https://github.com/libKriging) using armadillo. It is _not_ a standard RcppArmadillo package, because we

Re: [Rd] rhub vs. CRAN fedora-*-devel, using armadillo & slapack

2023-01-10 Thread Serguei Sokol via R-devel
Le 10/01/2023 à 10:44, RICHET Yann a écrit : Dear R-devel people, We are working to submit a package which is mainly a binding over a C++ lib (https://github.com/libKriging) using armadillo. It is _not_ a standard RcppArmadillo package, because we also had to provide a python binding... so the

Re: [Rd] [R] I do not want that R CMD build removes temp directory

2022-12-19 Thread Serguei Sokol via R-devel
Le 19/12/2022 à 10:52, Witold E Wolski a écrit : Dear Uwe, Unfortunately there isn't much of an output. This is all what I have: $ R CMD INSTALL --log prolfqua Warning: unknown option '--log' * installing to library 'C:/Users/witoldwolski/AppData/Local/R/win-library/4.2' * installing *source* p