Re: [Rd] clarifying and adjusting the C API for R

2024-06-07 Thread Steven Dirkse
Thanks for sharing this overview of an interesting and much-needed project. You mention that R exports about 1500 symbols (on platforms supporting visibility) but this subject isn't mentioned explicitly again in your note, so I'm wondering how things tie together. Un-exported symbols cannot be pa

Re: [Rd] Bug in optim for specific orders of magnitude

2022-12-23 Thread Steven Dirkse
Thanks, > Collin Erickson > > [[alternative HTML version deleted]] > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Steven Dirkse, Ph.D. GAMS Development Corp. office: 202.342.0180 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] dput()

2020-02-29 Thread Steven Dirkse
-4.440892e-16 > >>> > >>> x==1 > >> [1] FALSE > >>> > >> > >> So, dput(x) gives 1, but x is not equal to 1. Can anyone advise? > >> > >> __ > >> R-devel@r-project.org mailing list > >> https://stat.et

Re: [Rd] round(x, dig) [was "Development version of R fails tests .."]

2020-02-17 Thread Steven Dirkse
decimal digits is not at all > trivial and why and how I ended (*) improving R's > round(x, digits) algorithm in R-devel. > > The CRAN version of the package > https://cran.r-project.org/package=round > > install.packages("round") > > is not quite

Re: [Rd] Discrepancy: R sum() VS C or Fortran sum

2018-03-16 Thread Steven Dirkse
n), sx1, sx2 > sx1 = sum(x) > sx2 = 0.0d0 > do i=1,n > sx2 = sx2+x(i) > end do > end > > void sumc(double *x, int *n, double *sum) > { > int i; > double sum1 = 0.0; > for (i=0; i< *n; i++) { > sum1 += x[i]; >

[Rd] reducing a too-large matrix obtained with allocMatrix()

2011-11-01 Thread Steven Dirkse
Hello, I have some C code (for a shared lib called via .External) that uses PROTECT(w= allocMatrix(REALSXP, m, n)); mostly successfully. In rare cases, though, the row count m will be an overestimate. Is there a way to reallocate the matrix in-place, something like reAllocMatrix (w,m-excess,