Re: [R-pkg-devel] using portable simd instructions

2024-03-27 Thread Serguei Sokol
tmp.asm I do find simd instructions in assembler code, e.g.: grep paddd tmp.asm 14a8: 66 0f fe c1 paddd %xmm1,%xmm0 8f7b: 66 0f fe c1 paddd %xmm1,%xmm0 Op wo 27 mrt 2024 om 14:44 schreef Serguei Sokol : Le 26/03/2024 à 15:51, Tomas Kalibera a écrit :

Re: [R-pkg-devel] using portable simd instructions

2024-03-27 Thread Serguei Sokol
Le 26/03/2024 à 15:51, Tomas Kalibera a écrit : On 3/26/24 10:53, jesse koops wrote: Hello R-package-devel, I recently got inspired by the rcppsimdjson package to try out simd registers. It works fantastic on my computer but I struggle to find information on how to make it portable. It

Re: [R-pkg-devel] [External] [External] RcmdrPlugin.HH_1.1-48.tar.gz

2024-03-07 Thread Serguei Sokol
Le 07/03/2024 à 11:08, Duncan Murdoch a écrit : On 07/03/2024 4:16 a.m., Ivan Krylov wrote: On Wed, 6 Mar 2024 13:46:55 -0500 Duncan Murdoch wrote: is this just a more or less harmless error, thinking that the dot needs escaping I think it's this one. You are absolutely right that the dot

Re: [R-pkg-devel] CRAN uses an old version of clang

2024-02-09 Thread Serguei Sokol
Not really responding the question, however another way could be to consider if your code is in Rcpp and calls to bessel and gamma function are not very frequent. These functions are available in base R and as such are callable via Function(): > Rcpp::evalCpp('Function("besselK")(1., 0.2)')

Re: [R-pkg-devel] Native pipe in package examples

2024-01-26 Thread Serguei Sokol
Le 26/01/2024 à 10:44, Serguei Sokol a écrit : Le 26/01/2024 à 10:31, Serguei Sokol a écrit : Le 25/01/2024 à 19:04, Berwin A Turlach a écrit : On Thu, 25 Jan 2024 09:44:26 -0800 Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: G'day Duncon, Uups

Re: [R-pkg-devel] Native pipe in package examples

2024-01-26 Thread Serguei Sokol
Le 26/01/2024 à 10:31, Serguei Sokol a écrit : Le 25/01/2024 à 19:04, Berwin A Turlach a écrit : On Thu, 25 Jan 2024 09:44:26 -0800 Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: G'day Duncon, Uups, apologies for the misspelling of your name Duncan

Re: [R-pkg-devel] Native pipe in package examples

2024-01-26 Thread Serguei Sokol
Le 25/01/2024 à 19:04, Berwin A Turlach a écrit : On Thu, 25 Jan 2024 09:44:26 -0800 Henrik Bengtsson wrote: On Thu, Jan 25, 2024 at 9:23 AM Berwin A Turlach wrote: G'day Duncon, Uups, apologies for the misspelling of your name Duncan. Fingers were too fast. :) [...] But you could

Re: [R-pkg-devel] How to debug segfault when running build -> document in Rstudio that includes TMB module

2024-01-24 Thread Serguei Sokol
Le 24/01/2024 à 04:22, Carl Schwarz a écrit : I'm trying to update my SPAS package to respond to a CRAN check. Before starting the changes, I tried to rebuild my package, but now get a segfault when I try to do a devtools::document() or devtools::check(args = c('--as-cran')). See below for

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

Re: [R-pkg-devel] Check warning around sprintf: Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system

2023-11-20 Thread Serguei Sokol
Le 19/11/2023 à 02:07, Iris Simmons a écrit : Yes, the reason for the error is the use of sprintf. You can instead use snprintf where n is the maximum number of bytes to write, including the terminating nul character. For example: char msg[8191]; snprintf(msg, 8191, "criteria: error (%d) ->

Re: [R-pkg-devel] Virtual C++ functions

2023-11-15 Thread Serguei Sokol
Le 15/11/2023 à 10:37, Michael Meyer via R-package-devel a écrit : Greetings, Suppose I wanted to develop a package with C++ code that contains virtual functions which the package user should define.It's assumed that evaluation is expensive so we do not want to define these in R and then call

Re: [R-pkg-devel] Rmarkdown fails if (quote) r (space) is used

2023-11-03 Thread Serguei Sokol
Le 03/11/2023 à 15:54, J C Nash a écrit : I've spent a couple of hours with an Rmarkdown document where I was describing some spherical coordinates made up of a radius r and some angles. I wanted to fix the radius at 1. In my Rmarkdown text I wrote    Thus we have `r = 1` ... To avoid a

Re: [R-pkg-devel] Link to MKL instead of RBLAS on CRAN

2023-09-27 Thread Serguei Sokol
Le 27/09/2023 à 14:11, Sameh Abdulah a écrit : Hi, Is it possible to link with MKL instead of RBLAS when submitting my package to CRAN? Usually, it's not the business of a package to choose a BLAS to link to. Many options exists for this on the user's side. For example, at installation of R

Re: [R-pkg-devel] [EXTERNAL] Re: Warning: a function declaration without a prototype is deprecated in all versions of C

2023-09-26 Thread Serguei Sokol
Le 26/09/2023 à 10:50, Iñaki Ucar a écrit : On Tue, 26 Sept 2023 at 10:29, Sameh Abdulah wrote: Thanks for replying! The main problem that this warning from a C library that I am relying on, I have no control to fix the warning there. So, I am still getting this warning from R, when

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

2023-09-19 Thread Serguei Sokol via R-devel
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 strange in the way knitr is handling this; can anyone else?  My

Re: [R-pkg-devel] Check package without suggests

2023-07-18 Thread Serguei Sokol
Is it possible that you have complicated the task unnecessarily? Normally, you can just do if (requireNamespace("", quietly=TRUE)) { # do the tests involving } Wasn't that enough? Best, Serguei. Le 18/07/2023 à 16:37, John Harrold a écrit : Howdy Folks, I recent had a package start

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

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

2023-06-26 Thread Serguei Sokol via R-devel
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-devel

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: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Serguei Sokol
Le 16/05/2023 à 18:07, Jarrett Phillips a écrit : Hi All, I'm trying to generate a `tar.gz` file on a Mac for R package submission to CRAN but am having issues. I'm using `devtools`, specifically `build()` and `install()`. My package relies on compiled code via `Rcpp/RcppArmadillo`.

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

2023-05-04 Thread Serguei Sokol via R-devel
thz.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 mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __

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,

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

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

2023-03-06 Thread Serguei Sokol via R-devel
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/listinfo/

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

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

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

2023-01-10 Thread Serguei Sokol via R-devel
hance 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. CRAN fedora-

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

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

2021-11-05 Thread Serguei Sokol
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 __ R-devel@r-project.org mailing

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: [R-pkg-devel] Error in CHECK caused by dev.off()

2020-07-22 Thread Serguei Sokol
Le 22/07/2020 à 14:36, Helmut Schütz a écrit : Dear all, I have two variables, foo and bar. The first is TRUE if a png should be created and the second is TRUE if an already existing one should be overwritten. At the end of the plot I had if (foo | (foo & bar)) dev.off() This worked as

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

2020-07-20 Thread Serguei Sokol
ion 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/mailman/listinfo/r-devel -- Serguei Sokol Ingenieur de rec

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

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/options.html I

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

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 test

Re: [R-pkg-devel] seeking help regarding the valgrind error

2020-01-14 Thread Serguei Sokol
Hi Yang, Le 14/01/2020 à 17:29, Yang Feng a écrit : Hi All, Happy new year! I just joined this mailing list and would like to post my first question. I received a message earlier this month regarding an error in my R package RAMP https://cran.r-project.org/web/packages/RAMP/index.html I need

[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

Re: [R-pkg-devel] suggestion: conda for third-party software

2020-01-08 Thread Serguei Sokol
Le 08/01/2020 à 08:50, Ivan Krylov a écrit : On Tue, 7 Jan 2020 15:49:45 +0100 Serguei Sokol wrote: Currently, many R packages include TPS as part of them thus bloating their sizes and often duplicating files on a given system.  And even when TPS is not included in an R package but is just

[R-pkg-devel] suggestion: conda for third-party software

2020-01-07 Thread Serguei Sokol
Best wishes for 2020! I would like to suggest a new feature for R package management. Its aim is to enable package developers and end-users to rely on conda ( https://docs.conda.io/en/latest/ ) for managing third-party software (TPS) on major platforms: linux64, win64 and osx64. Currently,

Re: [R-pkg-devel] r2sundials submission failure

2019-12-16 Thread Serguei Sokol
the default size for index type: SUNDIALS_INDEX_TYPE int64_t while I defined it to int32_t. It shows that it's hard to satisfy all the tastes in the wild with only one library distrubution ;) Best, Serguei. Satya On Mon, 16 Dec 2019 at 03:54, Serguei Sokol <mailto:serguei.so...@gmail.

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.

[R-pkg-devel] r2sundials submission failure

2019-12-11 Thread Serguei Sokol
Hi, I have tried to submit my new package https://github.com/sgsokol/r2sundials to CRAN but submission seems to be dismissed. The package needs a third part software https://computing.llnl.gov/projects/sundials/cvodes so it cannot be built on CRAN automatically. I explained this (and how the

Re: [R-pkg-devel] No answer from win-builder R-devel. Is it down?

2019-11-26 Thread Serguei Sokol
Le 26/11/2019 à 11:31, NURIA PEREZ ZANON a écrit : Dear, Before submitting my package to CRAN, yesterday I sent it (25th November) to win-builder R-devel version. Almost 19 hours later, I haven't received any email from win-builder with the link to the binaries and the log files. (The email

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 ?

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 fun

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

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

Re: [R-pkg-devel] please help understand an error in openMP statements

2019-09-13 Thread Serguei Sokol
On 12/09/2019 23:12, Marcin Jurek wrote: Hello everyone, I'm submitting a package to CRAN which I tested locally, on Travis CI, R-hub and win builder. It worked no problem in all these environments. However, after submission, I keep getting the error described here:

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

Re: [R-pkg-devel] set pkg_config for 3rd party software

2019-09-05 Thread Serguei Sokol
On 05/09/2019 12:26, Martin Maechler wrote: Sameh M Abdulah on Fri, 30 Aug 2019 18:50:55 + writes: > Hi, > I recently asked some questions about my R package which were well responded by Dirk. > I have another question related to pkg_config path, > I am using

Re: [R-pkg-devel] third part software dependency

2019-08-30 Thread Serguei Sokol
On 30/08/2019 15:58, Dirk Eddelbuettel wrote: On 30 August 2019 at 07:24, Dirk Eddelbuettel wrote: | | On 30 August 2019 at 11:10, Serguei Sokol wrote: | | I am preparing a new package r2sundials for submission to cran. It | | depends on third part software | | (https://computing.llnl.gov

Re: [R-pkg-devel] third part software dependency

2019-08-30 Thread Serguei Sokol
Hi Ralf, On 30/08/2019 16:04, Ralf Stubner wrote: On Fri, Aug 30, 2019 at 11:10 AM Serguei Sokol wrote: I am preparing a new package r2sundials for submission to cran. It depends on third part software (https://computing.llnl.gov/projects/sundials). Are you aware of the sundialr package

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: [R-pkg-devel] .Rd, LaTeX and Unicode

2019-06-19 Thread Serguei Sokol
e your \usepackage[mathletters]{ucs} would not be needed either. HOWEVER: After losing at least half an hour now, trying many variants I found that the only version that works correctly for me (with a teTeX / TeXlive version of 2018) is the version Serguei Sokol proposes (below), including t

[R-pkg-devel] .Rd, LaTeX and Unicode

2019-06-18 Thread Serguei Sokol
Hi, I am preparing a package where I would like to use UTF characters in .Rd files. When the LaTeX comes to play, I got well known errors e.g.: ! Package inputenc Error: Unicode character ∂ (U+2202) (inputenc)    not set up for use with LaTeX. It is coherent with what is said on

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

Re: [R-pkg-devel] try() in R CMD check --as-cran

2019-06-07 Thread Serguei Sokol
On 07/06/2019 16:47, Duncan Murdoch wrote: On 07/06/2019 9:46 a.m., J C Nash wrote: Should try() not stop those checks from forcing an error? try(stop("msg"))  will print the error message, but won't stop execution.  Presumably the printed message is what is causing you problems.  If you

Re: [R-pkg-devel] try() in R CMD check --as-cran

2019-06-07 Thread Serguei Sokol
glance. I read it as 'any(v1 || v2)'. My bad. On June 7, 2019 6:51:29 AM PDT, Serguei Sokol wrote: On 07/06/2019 15:31, Sebastian Meyer wrote: The failure stated in the R CMD check failure report is: --- failure: length > 1 in coercion to logical --- This comes from --as-cran perform

Re: [R-pkg-devel] try() in R CMD check --as-cran

2019-06-07 Thread Serguei Sokol
On 07/06/2019 15:31, Sebastian Meyer wrote: The failure stated in the R CMD check failure report is: --- failure: length > 1 in coercion to logical --- This comes from --as-cran performing useful extra checks via setting the environment variable _R_CHECK_LENGTH_1_LOGIC2_, which means:

Re: [R-pkg-devel] try() in R CMD check --as-cran

2019-06-07 Thread Serguei Sokol
On 07/06/2019 14:53, J C Nash wrote: Sorry reply not quicker. For some reason I'm not getting anything in the thread I started! I found the responses in the archives. Perhaps cc: nas...@uottawa.ca please. I have prepared a tiny (2.8K) package at

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, ",

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

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 Poi

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
[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...@insa-toulouse.

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

2018-11-27 Thread Serguei Sokol
-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://stat.

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

2018-11-22 Thread Serguei Sokol
__ 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 Sok

Re: [Rd] compairing doubles

2018-08-31 Thread Serguei Sokol
.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.ethz.ch/mailman/listinfo/r-devel -- Iña

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

[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,                     , sdec); by     tmp = EncodeElement2(VECTOR_ELT(x, (R_xlen_t)i + j*nr), 0, quote_col[j], qmethod

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

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

Re: [Rd] Inconsistent rank in qr()

2018-01-23 Thread Serguei Sokol
Le 23/01/2018 à 08:47, Martin Maechler a écrit : Serguei Sokol <so...@insa-toulouse.fr> 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? >> &g

Re: [Rd] Inconsistent rank in qr()

2018-01-22 Thread Serguei Sokol
ck 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 <so...@insa-toulouse.fr> wrote: Hi, I have noticed different rank

[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

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)  

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
724613L, 86756002L, 86768593L, 86772411L, 86781516L, 86794389L, 86805854L, 86814600L, 86835092L, 86874179L, 86876466L, 86901193L, 86987847L, 86988080L)*10 random_values = sapply(seeds, function(x) { set.seed(x) y = runif(1, 17, 26) return(y) }) summary(random_values) I really rea

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

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

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, Serguei

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 wo

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

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

2017-07-05 Thread Serguei Sokol
t.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/mailman/listinfo/r-devel -- S

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

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 <so...@insa-toulouse.fr> 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

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

2017-05-31 Thread Serguei Sokol
heers Joris On Wed, May 31, 2017 at 4:03 PM, Serguei Sokol <so...@insa-toulouse.fr <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., ty

  1   2   >