Re: [Rd] request for discussion on lonely doc patch suggestion

2025-03-25 Thread Serguei Sokol via R-devel
R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Serguei Sokol Ingenieur de recherche INRAE Cellule Mathématiques TBI, INSA/INRAE UMR 79

Re: [Rd] Depends: R (>= 4.1) for packages that use |> and \(...)

2025-03-05 Thread Serguei Sokol via R-devel
ase from the installed copy of the package? -- Best regards, Ivan __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Serguei Sokol Ingenieur de recherche INRAE Cellule Mathématiques TBI, INSA/INRAE UMR 792, INSA/CNRS UMR 5504 135 Avenue de Rangueil

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
_ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel [[alternative HTML version deleted]] ___

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

2023-09-19 Thread Serguei Sokol via R-devel
'? Best, Serguei. (which is what the default value would be).  In the latter case, I also see   Browse[2]> list(...)   $vlign   [1] "" i.e. vlign remains part of the ... list, it wasn't bound to the argument named vlign. I can't spot anything particularly stra

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?  

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

2023-06-26 Thread Serguei Sokol via R-devel
ed to directory in base R, like `dir.exists(..., symlink_ok = TRUE)`? What about : dir.exists(Sys.readlink("your_link")) ? Best, Serguei. Thanks, Dipterix __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

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
R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailin

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

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
0) this becomes c(1,2,NA,3) |> freplace(is.na, 0) and looks quite acceptable for me. Best, Serguei. Any thoughts? Pavel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/list

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
any chance that I can get a deeper log of what happened ? > > Best regards, > > Yann > > -Message d'origine- > De : Serguei Sokol > Envoyé : mardi 10 janvier 2023 11:41 > À : RICHET Yann;R-devel@r-project.org > Cc : Pascal Havé > Objet : Re: [Rd] rhub vs. CR

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

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

2023-01-10 Thread Serguei Sokol via R-devel
adiological Protection and Nuclear Safety (https://www.irsn.fr), Department of Characterization of Natural Unexpected Events and Sites Office : +33 1 58 35 88 84 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

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

2022-12-19 Thread Serguei Sokol via R-devel
CMD build removes the temp directory and does not give any other errors how can I find out what the build problem is? Is there a way to disable the temp directory removal? Best Regards Witek -- Witold Eryk Wolski __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] gettext(msgid, domain="R") doesn't work for some 'msgid':s

2021-11-05 Thread Serguei Sokol
- " #: src/main/main.c:1078 msgid "During startup - " msgstr "Beim Start - " which has not "\n" at the end. Just a testimony with a hope it helps. Best, Serguei. Is this meant to work, and if so, how do I get it to work, or is it a bug? Thanks, Henrik __

Re: [Rd] dgTMatrix Segmentation Fault

2021-06-09 Thread Serguei Sokol
Le 08/06/2021 à 18:32, Martin Maechler a écrit : Dario Strbenac on Tue, 8 Jun 2021 09:00:04 + writes: > Good day, Indeed, changing the logical test is a > workaround to the problem. However, a segmentation fault > means that the software tried to access an invalid memory

Re: [Rd] Speed-up/Cache loadNamespace()

2020-07-20 Thread Serguei Sokol
case. Cheers, Mario [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailma

[Rd] dimnames incoherence?

2020-02-19 Thread Serguei Sokol
Hi, I was bitten by a little incoherence in dimnames assignment or may be I missed some point. Here is the case. If I assign row names via dimnames(a)[[1]], when nrow(a)=1 then an error is thrown. But if I do the same when nrow(a) > 1 it's OK. Is one of this case works unexpectedly? Both? Neit

Re: [Rd] NA in doc for options(matprod="default")

2020-02-17 Thread Serguei Sokol
Le 17/02/2020 à 17:50, Tomas Kalibera a écrit : On 2/17/20 5:36 PM, Serguei Sokol wrote: Hi, A colleague of mine has spotted me a passage of the doc ?option talking about Inf and NaN check in 'matprod=default' section: https://stat.ethz.ch/R-manual/R-devel/library/base/html/optio

[Rd] NA in doc for options(matprod="default")

2020-02-17 Thread Serguei Sokol
Hi, A colleague of mine has spotted me a passage of the doc ?option talking about Inf and NaN check in 'matprod=default' section: https://stat.ethz.ch/R-manual/R-devel/library/base/html/options.html I am wondering if NA should be mentioned too as the check seems to include this "value" too. N

Re: [Rd] possible bug in win R-devel in check/test environment

2020-01-15 Thread Serguei Sokol
Hi Dirk, Thanks for sharing your thoughts on the subject.  I have few notes next to it. Le 14/01/2020 à 15:59, Dirk Eddelbuettel a écrit : Hi Serguei, Nice analysis! On 14 January 2020 at 11:00, Serguei Sokol wrote: | During my recent r2sundials development, I've came across a strange

[Rd] possible bug in win R-devel in check/test environment

2020-01-14 Thread Serguei Sokol
Hi, During my recent r2sundials development, I've came across a strange test failing during 'R CMD check' exclusively on win R-devel which I could reproduce with a minimal example that I present here. The toy packages testarma1 [1] and testarma2 [2] are minimal modifications of a skeleton pack

Re: [Rd] Build failure on powerpc64

2019-12-13 Thread Serguei Sokol
Le 13/12/2019 à 17:06, Tom Callaway a écrit : arithmetic.c: static LDOUBLE q_1_eps = 1 / LDBL_EPSILON; Just a thought: can it be that it's "1" which is at the origin of compiler complaint? In this case, would the syntax "1.L" be sufficient to keep it calm? Serguei. ___

Re: [Rd] Why is matrix product slower when matrix has very small values?

2019-11-20 Thread Serguei Sokol
Le 20/11/2019 à 09:56, Hilmar Berger a écrit : Hi Florian, just a guess, but couldn't it be that the multiplication of very small values leads to FP underflow exceptions which have to be handled by BLAS in a less efficient way than "normal" multiplications handled by SIMD instructions ? Anoth

Re: [Rd] Is missingness always passed on?

2019-10-01 Thread Serguei Sokol
Le 01/10/2019 à 10:58, Serguei Sokol a écrit : Le 30/09/2019 à 16:17, Duncan Murdoch a écrit : There's a StackOverflow question https://stackoverflow.com/q/22024082/2554330 that references this text from ?missing: "Currently missing can only be used in the immediate body of the

Re: [Rd] Is missingness always passed on?

2019-10-01 Thread Serguei Sokol
Le 30/09/2019 à 16:17, Duncan Murdoch a écrit : There's a StackOverflow question https://stackoverflow.com/q/22024082/2554330 that references this text from ?missing: "Currently missing can only be used in the immediate body of the function that defines the argument, not in the body of a ne

Re: [Rd] What is the best way to loop over an ALTREP vector?

2019-09-24 Thread Serguei Sokol
Le 24/09/2019 à 07:48, Gabriel Becker a écrit : Also, a small nitpick, R's internal mean function doesn't hit Dataptr, it hits either INTEGER_ELT (which really should probably be a ITERATE_BY_REGION) or ITERATE_BY_REGION. Even if it is not the main point of this thread, I was wondering if mean(

Re: [Rd] Fw: Calling a LAPACK subroutine from R

2019-09-13 Thread Serguei Sokol
On 12/09/2019 11:07, Berend Hasselman wrote: On 12 Sep 2019, at 10:36, Serguei Sokol wrote: On 11/09/2019 21:38, Berend Hasselman wrote: The Lapack library is loaded automatically by R itself when it needs it for doing some calculation. You can force it to do that with a (dummy) solve for

Re: [Rd] Fw: Calling a LAPACK subroutine from R

2019-09-12 Thread Serguei Sokol
On 11/09/2019 21:38, Berend Hasselman wrote: The Lapack library is loaded automatically by R itself when it needs it for doing some calculation. You can force it to do that with a (dummy) solve for example. Put this at start of your script: # dummy code to get LAPACK library loaded X1 <- diag

Re: [Rd] Calculation of e^{z^2/2} for a normal deviate z

2019-06-24 Thread Serguei Sokol
On 22/06/2019 00:58, jing hua zhao wrote: Hi Peter, Rui, Chrstophe and Gabriel, Thanks for your inputs -- the use of qnorm(., log=TRUE) is a good point Another approach could be simply to note that a function defined as f(p)=exp(-z(p)^2/2) is regular around p=0 with f(0)=0. It has roughly the

Re: [Rd] [R] Open a file which name contains a tilde

2019-06-14 Thread Serguei Sokol
On 14/06/2019 14:43, Frank Schwidom wrote: Hi John, First, the unix and linux filesystem allows the use of any nonzero character in its filesystem filenames Well, even it's not the central point of the discussion let make this assertion more correct. It depends on file system. E.g. JFS (https

Re: [Rd] R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments

2019-05-06 Thread Serguei Sokol
On 06/05/2019 18:21, Thomas Petzoldt wrote: It seems that it's an old bug that was found in some other packages, but at that time not optim: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=15958 I think that the bug description is a little bit misleading. The bug is not in fact that "<<-"

Re: [Rd] R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments

2019-05-03 Thread Serguei Sokol
On 03/05/2019 10:31, Serguei Sokol wrote: On 02/05/2019 21:35, Florian Gerber wrote: Dear all, when using optim() for a function that uses the parent environment, I see the following unexpected behavior: makeFn <- function(){ xx <- ret <- NA fn <- function(x){    

Re: [Rd] R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments

2019-05-03 Thread Serguei Sokol
On 02/05/2019 21:35, Florian Gerber wrote: Dear all, when using optim() for a function that uses the parent environment, I see the following unexpected behavior: makeFn <- function(){     xx <- ret <- NA     fn <- function(x){    if(!is.na(xx) && x==xx){    cat("x=", xx, ", ret=

Re: [Rd] Intermittent crashes with inset `[<-` command

2019-02-27 Thread Serguei Sokol
On 26/02/2019 05:18, Brian Montgomery via R-devel wrote: The following code crashes after about 300 iterations on my x86_64-w64-mingw32  machine on R 3.5.2 --vanilla. Others have duplicated this (see  https://github.com/tidyverse/magrittr/issues/190 if necessary), but I don't know how machine/OS

Re: [Rd] Bug report: Function ppois(0:20, lambda=0.9) does not generate a non-decreasing result.

2018-12-05 Thread Serguei Sokol
Le 04/12/2018 à 19:12, Martin Maechler a écrit : Serguei Sokol on Tue, 4 Dec 2018 11:46:32 +0100 writes: > Le 04/12/2018 à 11:27, Iñaki Ucar a écrit : >> On Tue, 4 Dec 2018 at 11:12, wrote: >>> function ppois is a function calculate the CDF of Poisson

Re: [Rd] Bug report: Function ppois(0:20, lambda=0.9) does not generate a non-decreasing result.

2018-12-04 Thread Serguei Sokol
/stat.ethz.ch/mailman/listinfo/r-devel -- Serguei Sokol Ingenieur de recherche INRA Cellule mathématiques LISBP, INSA/INRA UMR 792, INSA/CNRS UMR 5504 135 Avenue de Rangueil 31077 Toulouse Cedex 04 tel: +33 5 62 25 01 27 email: so...@insa-toulouse.fr http://www.lisbp.fr __

Re: [Rd] Subsetting row in single column matrix drops names in resulting vector

2018-11-27 Thread Serguei Sokol
appen only if a[1,_] attaches a column name, not a row name, when a has only one column. Radford Neal -- Serguei Sokol Ingenieur de recherche INRA Cellule mathématiques LISBP, INSA/INRA UMR 792, INSA/CNRS UMR 5504 135 Avenue de Rangueil 31077 Toulouse Cedex 04 tel: +33 5 62 25 01 27 email: so...

Re: [Rd] Subsetting row in single column matrix drops names in resulting vector

2018-11-27 Thread Serguei Sokol
rsion-of-pqr/ That was written when most of these features where introduced, though getting your specific example right relies on another change introduced in the most recent version. Radford Neal __ R-devel@r-project.org mailing list https://

Re: [Rd] Subsetting row in single column matrix drops names in resulting vector

2018-11-22 Thread Serguei Sokol
-- Regards Dmitriy Selivanov [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] compairing doubles

2018-08-31 Thread Serguei Sokol
.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Iñaki Ucar __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.et

Re: [Rd] access an element with empty name

2018-05-14 Thread Serguei Sokol
Le 14/05/2018 à 15:55, Kurt Hornik a écrit : Serguei Sokol writes: Hi, I came across a case where I cannot access a list element by its empty name. Minimal example can be constructed as     x=list("A", 1)     names(x)=c("a", "")     x[["a"]]

[Rd] access an element with empty name

2018-05-14 Thread Serguei Sokol
Hi, I came across a case where I cannot access a list element by its empty name. Minimal example can be constructed as     x=list("A", 1)     names(x)=c("a", "")     x[["a"]]     #[1]  "A"     x[[""]]     #NULL     x$`a`     #[1]  "A"     x$``     # Error: attempt to use zero-length variable nam

[Rd] mean(x) for ALTREP

2018-04-26 Thread Serguei Sokol
Hi, By looking at a doc about ALTREP https://svn.r-project.org/R/branches/ALTREP/ALTREP.html (by the way congratulations for that and for R-3.5.0 in general), I was a little bit surprised by the following example: > x <- 1:1e10 > system.time(print(mean(x))) [1] 5e+09    user  system elapsed

Re: [Rd] R Bug: write.table for matrix of more than 2, 147, 483, 648 elements

2018-04-19 Thread Serguei Sokol
Le 19/04/2018 à 12:15, Tomas Kalibera a écrit : On 04/19/2018 11:47 AM, Serguei Sokol wrote: replace     tmp = EncodeElement2(x, i + j*nr, quote_col[j], qmethod,                     &strBuf, sdec); by     tmp = EncodeElement2(VECTOR_ELT(x, (R_xlen_t)i + j*nr), 0, quote_col[j], qme

Re: [Rd] R Bug: write.table for matrix of more than 2, 147, 483, 648 elements

2018-04-19 Thread Serguei Sokol
Le 19/04/2018 à 09:30, Tomas Kalibera a écrit : On 04/19/2018 02:06 AM, Duncan Murdoch wrote: On 18/04/2018 5:08 PM, Tousey, Colton wrote: Hello, I want to report a bug in R that is limiting my capabilities to export a matrix with write.csv or write.table with over 2,147,483,648 elements (C'

Re: [Rd] cat(fill=N)

2018-03-16 Thread Serguei Sokol
Le 16/03/2018 à 17:10, David Hugh-Jones a écrit : Hi all, I expect I'm getting something wrong, but cat("foo bar baz foo bar baz foo bar baz", fill = 10) should be broken into lines of width 10, whereas I get: cat("foo bar baz foo bar baz foo bar baz", fill = 10) foo bar baz foo bar baz foo

Re: [Rd] Inconsistent rank in qr()

2018-01-23 Thread Serguei Sokol
Le 23/01/2018 à 08:47, Martin Maechler a écrit : Serguei Sokol on Mon, 22 Jan 2018 17:57:47 +0100 writes: > Le 22/01/2018 à 17:40, Keith O'Hara a écrit : >> This behavior is noted in the qr documentation, no? >> >> rank - the rank of x as com

Re: [Rd] Inconsistent rank in qr()

2018-01-22 Thread Serguei Sokol
o stick with commonly admitted rank definition (i.e. the number of linearly independent columns in A) is so easy. Why to discard lapack case from it (even properly documented)? On Jan 22, 2018, at 11:21 AM, Serguei Sokol wrote: Hi, I have noticed different rank values calculated by qr() depend

[Rd] Inconsistent rank in qr()

2018-01-22 Thread Serguei Sokol
Hi, I have noticed different rank values calculated by qr() depending on LAPACK parameter. When it is FALSE (default) a true rank is estimated and returned. Unfortunately, when LAPACK is set to TRUE, the min(nrow(A), ncol(A)) is returned which is only occasionally a true rank. Would not it be m

Re: [Rd] wrong matrix dimension in sparseQR

2018-01-19 Thread Serguei Sokol
   2017 month  11 day    30 svn rev    73796 language   R version.string R version 3.4.3 (2017-11-30) nickname   Kite-Eating Tree -- Serguei Sokol Ingenieur de recherche INRA Cellule mathématique LISBP, INSA/INRA UMR 792, INSA/CNRS UMR 5504 135 Avenue de Rangueil

[Rd] wrong matrix dimension in sparseQR

2018-01-18 Thread Serguei Sokol
Hi, I came across a case when the dimensions of matrices returned by qr() operated on a sparse matrix does not coincide with the initial matrix. Here is a spinet code that should produce an example (one of many that I could provide):  m=205  n=199  set.seed(7);  a=matrix(rnorm(m*n), m, n)  a[s

Re: [Rd] Extreme bunching of random values from runif with Mersenne-Twister seed

2017-11-06 Thread Serguei Sokol
Le 05/11/2017 à 15:17, Duncan Murdoch a écrit : On 04/11/2017 10:20 PM, Daniel Nordlund wrote: Tirthankar, "random number generators" do not produce random numbers.  Any given generator produces a fixed sequence of numbers that appear to meet various tests of randomness.  By picking a seed you

Re: [Rd] Extreme bunching of random values from runif with Mersenne-Twister seed

2017-11-03 Thread Serguei Sokol
x27;seed' argument of set.seed() Note that multiplying the reported set of seeds by 10, results in expected output, so not clear if there is a sweet spot that bugs out the Mersenne-Twister algorithm: seeds = c(86548915L, 86551615L, 86566163L, 86577411L, 86584144L, 86584272L, 86620568L,

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Serguei Sokol
Le 10/07/2017 à 13:13, Duncan Murdoch a écrit : On 10/07/2017 5:34 AM, Serguei Sokol wrote: Le 10/07/2017 à 11:19, Duncan Murdoch a écrit : On 10/07/2017 4:54 AM, Serguei Sokol wrote: Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now committed changes to R-devel (rev 72898) that

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Serguei Sokol
Le 10/07/2017 à 11:19, Duncan Murdoch a écrit : On 10/07/2017 4:54 AM, Serguei Sokol wrote: Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now committed changes to R-devel (rev 72898) that seem to catch large and small errors. They only give a warning if the error happens when the

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Serguei Sokol
: I didn't want to mess up some later unrelated computation that triggered garbage collection. I will wait a while before porting these to R-patched, because there may still be some problems to clean up. Duncan Murdoch On 07/07/2017 11:42 AM, Duncan Murdoch wrote: On 07/07/2017 11:13 AM

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-07 Thread Serguei Sokol
Le 07/07/2017 à 16:52, Duncan Murdoch a écrit : On 07/07/2017 9:54 AM, Serguei Sokol wrote: Le 07/07/2017 à 01:09, Duncan Murdoch a écrit : On 06/07/2017 6:44 PM, Sokol Serguei wrote: Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-07 Thread Serguei Sokol
Le 07/07/2017 à 01:09, Duncan Murdoch a écrit : On 06/07/2017 6:44 PM, Sokol Serguei wrote: Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I propose the following patch against the current R-devel/src/main/connection.c (cf. attached

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-06 Thread Serguei Sokol
stem call failure on writing > close(fc) Serguei. Le 05/07/2017 à 15:33, Serguei Sokol a écrit : Le 05/07/2017 à 14:46, Serguei Sokol a écrit : Le 05/07/2017 à 13:09, Duncan Murdoch a écrit : On 05/07/2017 5:26 AM, January W. wrote: I tried the newest patch, but it does not seem to work

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-05 Thread Serguei Sokol
Le 05/07/2017 à 14:46, Serguei Sokol a écrit : Le 05/07/2017 à 13:09, Duncan Murdoch a écrit : On 05/07/2017 5:26 AM, January W. wrote: I tried the newest patch, but it does not seem to work for me (on Linux). Despite the check in Rconn_printf, the write.csv happily writes to /dev/full and

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-05 Thread Serguei Sokol
mailing list https://stat.ethz.ch/mailman/listinfo/r-devel <https://stat.ethz.ch/mailman/listinfo/r-devel> -- January Weiner -- __ R-devel@r-project.org mailing list https://stat.ethz.ch/m

Re: [Rd] R history: Why 'L; in suffix character ‘L’ for integer constants?

2017-06-16 Thread Serguei Sokol
Le 16/06/2017 à 17:54, Henrik Bengtsson a écrit : I'm just curious (no complaints), what was the reason for choosing the letter 'L' as a suffix for integer constants? Does it stand for something (literal?), is it because it visually stands out, ..., or no specific reason at all? My guess is tha

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Serguei Sokol
Le 14/06/2017 à 12:58, Andreas Kersting a écrit : Hi, I would really like to have a way to split long string literals across multiple lines in R. ... An alternative approach could be to have something like ("aaa " "bbb") This is C-style and if the core-team decides to implement it, it could

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-06-01 Thread Serguei Sokol
Le 31/05/2017 à 22:00, Martin Maechler a écrit : Serguei Sokol on Wed, 31 May 2017 18:46:34 +0200 writes: > Le 31/05/2017 à 17:30, Serguei Sokol a écrit : >> >> More thorough reading revealed that I have overlooked this phrase in the >> line&#

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
Le 31/05/2017 à 17:30, Serguei Sokol a écrit : More thorough reading revealed that I have overlooked this phrase in the line's doc: "left and right /thirds/ of the data" (emphasis is mine). Oops. I have read the first ref returned by google and it happened to be tibco's

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
7;s spreadsheet department. Cheers Joris On Wed, May 31, 2017 at 4:03 PM, Serguei Sokol mailto:so...@insa-toulouse.fr>> wrote: Le 31/05/2017 à 15:40, Joris Meys a écrit : OTOH, > sapply(1:9, function(i){ + sum(dfr$time <= quantile(dfr$time, 1./3.,

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
Le 31/05/2017 à 15:40, Joris Meys a écrit : OTOH, > sapply(1:9, function(i){ + sum(dfr$time <= quantile(dfr$time, 1./3., type = i)) + }) [1] 8 8 6 6 6 6 8 6 6 Only the default (type = 7) and the first two types give the result lines() gives now. I think there is plenty of reasons to give why

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-31 Thread Serguei Sokol
Le 30/05/2017 à 18:51, Martin Maechler a écrit : Serguei Sokol on Tue, 30 May 2017 16:01:17 +0200 writes: > Le 30/05/2017 à 09:33, Martin Maechler a écrit : ... >> However, even after the patch, The example from the SO >> post differs from the result of

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-30 Thread Serguei Sokol
Le 30/05/2017 à 09:33, Martin Maechler a écrit : ... However, even after the patch, The example from the SO post differs from the result of Richie Cotton's function... The explanation is quite simple. In SO function, the first 1/3 quantile of used example counts 6 points (of 19 in total), while

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-29 Thread Serguei Sokol
Sorry, I have seen it too late that we had different tab width in the original file and my editor. Here is the patch with all white spaces instead of mixing tabs and white spaces. Serguei. Le 29/05/2017 à 15:13, Serguei Sokol a écrit : Here is an attached patch. Best, Serguei. Le 29/05/2017

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-29 Thread Serguei Sokol
Here is an attached patch. Best, Serguei. Le 29/05/2017 à 12:21, Serguei Sokol a écrit : The problem or actual R implementation relies on an assumption that median(x[i] | x[i] <= quantile(x, 1/3)) == quantile(x, 1/6) which reveals not to be true despite very trustful appearance. If

Re: [Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3

2017-05-29 Thread Serguei Sokol
that's not a bug. Or maybe R is wrong. Duncan Murdoch [[alternative HTML version deleted]] __________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Serguei Sokol Ingenieur de recherche INRA Metabolisme Integre et Dynamique des

[Rd] tweaking Sys.timezone()

2017-05-16 Thread Serguei Sokol
Hi, On my system (Linux, Mageia 5) Sys.timezone() returns NA but with a minor tweak it could work as expected, i.e. returning "Europe/Paris". Here is the problem. At some moment it does lt <- normalizePath("/etc/localtime") On my system /etc/localtime is a symlink pointing to /usr/share/zonei

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-16 Thread Serguei Sokol
Le 15/05/2017 à 19:41, luke-tier...@uiowa.edu a écrit : This is getting pretty convoluted. The current behavior is consistent with the description at the top of the help page -- it does not promise to stop evaluation once the first non-TRUE is found. Hm... we can read in the man page : ‘stopifn

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
Le 15/05/2017 à 17:44, Martin Maechler a écrit : ... So this needs even more sophistication, using withCallingHandlers(.) and maybe that really get's too sophisticated and no more "readable" to 99.9% of the R users ... ? I'd say the current version is of minimal sophistication to reach both the

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
Le 15/05/2017 à 15:37, Martin Maechler a écrit : Serguei Sokol on Mon, 15 May 2017 13:14:34 +0200 writes: > I see in the archives that the attachment cannot pass. > So, here is the code: [... MM: I needed to reformat etc to match closely to the current

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
Dparse(cl.i[[2]]), Dparse(cl.i[[3]]), abbrev(r)) else sprintf(ngettext(length(r), "%s is not TRUE", "%s are not all TRUE"), Dparse(cl.i)) stop(msg, call. = FALSE, domain = NA) } } invisible() } 8< Best, Sergu

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
Hello, I am a new on this list, so I introduce myself very briefly: my background is applied mathematics, more precisely scientific calculus applied for modeling metabolic systems, I am author/maintainer of few packages (Deriv, rmumps, arrApply). Now, on the subject of this discussion, I must sa