Re: [Rd] [External] Non-API updates

2024-06-25 Thread J C Nash
It is probably important to note that the WRE with the new section on C API compliance is in the R-Devel docs, not the current ones. JN On 2024-06-25 12:10, luke-tierney--- via R-devel wrote: On Tue, 25 Jun 2024, Josiah Parry wrote: Hey folks, I'm sure many of you all woke to the same messa

Re: [Rd] [External] Non-API updates

2024-06-25 Thread J C Nash
On 2024-06-25 12:25, Josiah Parry wrote: "Stop using them" is pithy advice but far easier said than done! With respect to NOTES and WARN on CRAN, these do not result in any package maintainer notifications. The only notification that the developers receive is the threatening one that states t

Re: [Rd] Advice debugging M1Mac check errors

2024-02-06 Thread J C Nash
t, getting the indicated result of 0 for (sum(vv1) - 1.0e0), with non-zero on my Ryzen 7 laptop. JN # FPExtendedTest.R J C Nash loopsum <- function(vec){ n <- length(vec) vsum<-0.0 for (i in 1:n) { vsum <- vsum + vec[i]} vsum } small<-.Machine$double.eps/4 # 1/4 of the

Re: [Rd] Advice debugging M1Mac check errors

2024-02-04 Thread J C Nash
build R with --disable-long-double to get closer to the arm64 results if that is your worry. Cheers, Simon On 04/02/2024 4:47 p.m., J C Nash wrote: Slightly tangential: I had some woes with some vignettes in my optimx and nlsr packages (actually in examples comparing to OTHER packages) bec

Re: [Rd] Advice debugging M1Mac check errors

2024-02-04 Thread J C Nash
och On 04/02/2024 4:47 p.m., J C Nash wrote: Slightly tangential: I had some woes with some vignettes in my optimx and nlsr packages (actually in examples comparing to OTHER packages) because the M? processors don't have 80 bit registers of the old IEEE 754 arithmetic, so some existing "

Re: [Rd] Advice debugging M1Mac check errors

2024-02-04 Thread J C Nash
Slightly tangential: I had some woes with some vignettes in my optimx and nlsr packages (actually in examples comparing to OTHER packages) because the M? processors don't have 80 bit registers of the old IEEE 754 arithmetic, so some existing "tolerances" are too small when looking to see if is sma

Re: [Rd] ADA Compliance

2024-01-15 Thread J C Nash
Slightly tangential, but about two decades ago I was researching how multimedia databases might be reasonably structured. To have a concrete test case, I built a database of English Country (Playford) dances, which I called Playford's Progeny. (Ben B. will be aware of this, too.) This proved rathe

Re: [Rd] feature request: optim() iteration of functions that return multiple values

2023-08-08 Thread J C Nash
But why time methods that the author (me!) has been telling the community for years have updates? Especially as optimx::optimr() uses same syntax as optim() and gives access to a number of solvers, both production and didactic. This set of solvers is being improved or added to regularly, with a ma

Re: [Rd] Concerns with SVD

2023-07-16 Thread J C Nash
Better check your definitions of SVD -- there are several forms, but all I am aware of (and I wrote a couple of the codes in the early 1970s for the SVD) have positive singular values. JN On 2023-07-16 02:01, Durga Prasad G me14d059 wrote: Respected Development Team, This is Durga Prasad reac

Re: [Rd] Query: Could documentation include modernized references?

2023-03-31 Thread J C Nash
Thanks Martin. Following Duncan's advice as well as some textual input, I have put a proposed Rd file for optim on a fork of the R code at https://github.com/nashjc/r/blob/master/src/library/stats/man/optim.Rd This has the diffs given below from the github master. The suggested changes primaril

[Rd] Query: Could documentation include modernized references?

2023-03-26 Thread J C Nash
A tangential email discussion with Simon U. has highlighted a long-standing matter that some tools in the base R distribution are outdated, but that so many examples and other tools may use them that they cannot be deprecated. The examples that I am most familiar with concern optimization and non

Re: [Rd] uniroot violates bounds?

2023-02-18 Thread J C Nash
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(f, c(1e-6, 1)) library(Rmpfr) unirootR(f, c

Re: [Rd] Potential bug in fitted.nls

2023-01-26 Thread J C Nash
nls() actually uses different modeling formulas depending on the 'algorithm', and there is, in my view as a long time nonlinear modeling person, an unfortunate structural issue that likely cannot be resolved simply. This is because for nonlinear modeling programs we really should be using explic

Re: [Rd] Potential bug in fitted.nls

2023-01-26 Thread J C Nash
FWIW, nlsr::nlxb() gives same answers. JN On 2023-01-25 09:59, Dave Armstrong wrote: Dear Colleagues, I recently answered [this question]() on StackOverflow that identified what seems to be unusual behaviour with `stats:::nls.fitted()`. In particular, a null model returns a single fitted value

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

2022-12-23 Thread J C Nash
Extreme scaling quite often ruins optimization calculations. If you think available methods are capable of doing this, there's a bridge I can sell you in NYC. I've been trying for some years to develop a good check on scaling so I can tell users who provide functions like this to send (lots of)

Re: [Rd] Seeking opinions on possible change to nls() code

2021-08-20 Thread J C Nash
concept of inference can be when applied to parameters in such models. JN On 2021-08-20 11:35 a.m., Martin Maechler wrote: >>>>>> J C Nash >>>>>> on Fri, 20 Aug 2021 11:06:25 -0400 writes: > > > In our work on a Google Summer of Code proje

[Rd] Seeking opinions on possible change to nls() code

2021-08-20 Thread J C Nash
In our work on a Google Summer of Code project "Improvements to nls()", the code has proved sufficiently entangled that we have found (so far!) few straightforward changes that would not break legacy behaviour. One issue that might be fixable is that nls() returns no result if it encounters some co

[Rd] subset argument in nls() and possibly other functions

2021-07-13 Thread J C Nash
In mentoring and participating in a Google Summer of Code project "Improvements to nls()", I've not found examples of use of the "subset" argument in the call to nls(). Moreover, in searching through the source code for the various functions related to nls(), I can't seem to find where subset is

[Rd] GSoC project "Improvement to nls()"

2021-05-26 Thread J C Nash
This message is to let R developers know that the project in the Subject is now a Google Summer of Code project. Our aim in this project is to find simplifications and corrections to the nls() code, which has become heavily patched. Moreover, it has some deficiencies in that there is no Marquardt

[Rd] Google Summer of Code for R projects / mentors needed

2021-01-16 Thread J C Nash
One of the mechanisms by which R has been extended and improved has been through the efforts of students and mentors in the Google Summer of Code initiatives. This year Toby Hocking (along with others) has continued to lead this effort. This year, Google has changed the format somewhat so that th

Re: [Rd] URL checks

2021-01-12 Thread J C Nash
Sorry, Martin, but I've NOT commented on this matter, unless someone has been impersonating me. Someone else? JN On 2021-01-11 4:51 a.m., Martin Maechler wrote: >> Viechtbauer, Wolfgang (SP) >> on Fri, 8 Jan 2021 13:50:14 + writes: > > > Instead of a separate file to sto

Re: [Rd] URL checks

2021-01-09 Thread J C Nash
Is this a topic for Google Summer of Code? See https://github.com/rstats-gsoc/gsoc2021/wiki On 2021-01-09 12:34 p.m., Dirk Eddelbuettel wrote: > > The idea of 'white lists' to prevent known (and 'tolerated') issues, note, > warnings, ... from needlessly reappearing is very powerful and general,

Re: [Rd] New URL redirect checks

2020-09-23 Thread J C Nash
Does this issue fit in the more general one of centralized vs partitioned checks? I've suggested before that the CRAN team seems (and I'll be honest and admit I don't have a good knowledge of how they work) to favour an all-in-one checking, whereas it might be helpful to developers and also widen t

Re: [Rd] Help useRs to use R's own Time/Date objects more efficiently

2020-04-04 Thread J C Nash
As with many areas of R usage, my view is that the concern is one of making it easier to find appropriate information quickly. The difficulty is that different users have different needs. So if one wants to know (most of) what is available, the Time Series Task View is helpful. If one is a novice,

Re: [Rd] unstable corner of parameter space for qbeta?

2020-03-26 Thread J C Nash
chler wrote: >>>>>> J C Nash >>>>>> on Thu, 26 Mar 2020 09:29:53 -0400 writes: > > > Given that a number of us are housebound, it might be a good time to > try to > > improve the approximation. It's not an area where I have muc

Re: [Rd] unstable corner of parameter space for qbeta?

2020-03-26 Thread J C Nash
Given that a number of us are housebound, it might be a good time to try to improve the approximation. It's not an area where I have much expertise, but in looking at the qbeta.c code I see a lot of root-finding, where I do have some background. However, I'm very reluctant to work alone on this, an

Re: [Rd] Bug in the "reformulate" function in stats package

2019-03-29 Thread J C Nash
The main thing is to post the "small reproducible example". My (rather long term experience) can be written if (exists("reproducible example") ) { DeveloperFixHappens() } else { NULL } JN On 2019-03-29 11:38 a.m., Saren Tasciyan wrote: > Well, first I can't sign in bugzilla myse

[Rd] Fwd: Package inclusion in R core implementation

2019-03-04 Thread J C Nash
Rereading my post below, I realize scope for misinterpretation. As I have said earlier, I recognize the workload in doing any streamlining, and also the immense service to us all by r-core. The issue is how to manage the workload efficiently while maintaining and modernizing the capability. That

Re: [Rd] Package inclusion in R core implementation

2019-03-04 Thread J C Nash
by folk outside the core. JN On 2019-03-04 9:12 a.m., Avraham Adler wrote: > On Mon, Mar 4, 2019 at 5:01 PM J C Nash <mailto:profjcn...@gmail.com>> wrote: > > As the original coder (in mid 1970s) of BFGS, CG and Nelder-Mead in > optim(), I've > been pu

Re: [Rd] Package inclusion in R core implementation

2019-03-04 Thread J C Nash
As the original coder (in mid 1970s) of BFGS, CG and Nelder-Mead in optim(), I've been pushing for some time for their deprecation. They aren't "bad", but we have better tools, and they are in CRAN packages. Similarly, I believe other optimization tools in the core (optim::L-BFGS-B, nlm, nlminb)

Re: [Rd] trace in uniroot() ?

2018-08-13 Thread J C Nash
10.  0.06783655 >  [4]  5.03391827  0.49004503  2.76198165 >  [7]  1.09760394  1.92979280  1.34802525 > [10]  1.38677998  1.38628970  1.38635074 > [13]  1.38628970 > > This will not tell you why the objective function is being called (e.g. in a > line search >

[Rd] typo in Ubuntu download page

2018-08-04 Thread J C Nash
In https://cran.r-project.org/bin/linux/ubuntu/ Administration and Maintances of R Packages ^^ Minor stuff, but if someone who can edit is on the page, perhaps it can be changed to "Maintenance" Best, JN __ R-devel@r-project

[Rd] trace in uniroot() ?

2018-07-30 Thread J C Nash
In looking at rootfinding for the histoRicalg project (see gitlab.com/nashjc/histoRicalg), I thought I would check how uniroot() solves some problems. The following short example ff <- function(x){ exp(0.5*x) - 2 } ff(2) ff(1) uniroot(ff, 0, 10) uniroot(ff, c(0, 10), trace=1) uniroot(ff, c(0, 10

[Rd] histoRicalg -- project to document older methods used by R and transfer knowledge

2018-06-05 Thread J C Nash
After some thought, I decided r-devel was probably the best of the R lists for this item. Do feel free to share, as the purpose is to improve documentation and identify potential issues. John Nash The R Consortium has awarded some modest funding for "histoRicalg", a project to document and tran

[Rd] Minor glitch in optim()

2018-04-17 Thread J C Nash
Having worked with optim() and related programs for years, it surprised me that I haven't noticed this before, but optim() is inconsistent in how it deals with bounds constraints specified at infinity. Here's an example: # optim-glitch-Ex.R x0<-c(1,2,3,4) fnt <- function(x, fscale=10){ yy <- len

Re: [Rd] Title case in DESCRIPTION for package where a word is a function namei

2015-04-25 Thread Prof J C Nash (U30A)
a bug, but it is asking for trouble. JN On 15-04-25 07:57 AM, peter dalgaard wrote: > >> On 25 Apr 2015, at 13:11 , Prof J C Nash (U30A) wrote: >> >> Hendrik pointed out it was the parentheses that gave the complaint. >> Single quotes and no parentheses seem to satisfy R

Re: [Rd] Title case in DESCRIPTION for package where a word is a function name

2015-04-25 Thread Prof J C Nash (U30A)
. Is this something CRAN should be thinking about? I would argue greater benefit to users than title case. JN On 15-04-24 06:17 PM, Uwe Ligges wrote: > > > On 24.04.2015 22:44, Ben Bolker wrote: >> Prof J C Nash (U30A uottawa.ca> writes: >> >>> >>> I

[Rd] Title case in DESCRIPTION for package where a word is a function name

2015-04-24 Thread Prof J C Nash (U30A)
I was preparing a fix for a minor glitch in my optimx package and R CMD check gave an error that the title was not in title case. It is A Replacement and Extension of the optim() Function R CMD check suggests the incorrect form A Replacement and Extension of the Optim() Function 'Writing R Exte

Re: [Rd] nls

2015-03-19 Thread Prof J C Nash (U30A)
nls() is using 1) only a Gauss-Newton code which is prone to some glitches 2) approximate derivatives Package nlmrt uses symbolic derivatives for expressions (you have to provide Jacobian code for R functions) and an aggressive Marquardt method to try to reduce the sum of squares. It does return m

Re: [Rd] Requirement for pandoc 1.12.3 in R 3.1.3

2015-03-12 Thread Prof J C Nash (U30A)
//www.ubuntu.com/"; >> SUPPORT_URL="http://help.ubuntu.com/"; >> BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"; >> >> john@john-J6-2015 ~/current/nls14work $ cat /etc/linuxmint/info >> RELEASE=17.1 >> CODENAME=rebecca >> EDIT

[Rd] Requirement for pandoc 1.12.3 in R 3.1.3

2015-03-12 Thread Prof J C Nash (U30A)
Are other developers finding R 3.1.3 problematic because vignette building requires pandoc 1.12.3, while Linux Mint 17 / Ubuntu 14.04 have 1.12.2.1? R 3.1.2 seems to work fine. I'd very much like to avoid having to build as large a Linux package as pandoc, which has given me issues outside of R (i

Re: [Rd] Help finding source of warnings

2015-01-18 Thread Prof J C Nash (U30A)
ink I need to do some more digging to narrow down where this issue is lurking. It may be some local matter, as with the r-recommended links failing. Best, JN On 15-01-18 09:27 AM, Kurt Hornik wrote: Prof J C Nash (U30A) writes: I've been implementing a wrapper to the 2011 Fortran ve

[Rd] Help finding source of warnings

2015-01-18 Thread Prof J C Nash (U30A)
I've been implementing a wrapper to the 2011 Fortran version of L-BFGS-B. In optim(), R uses a C translation of a Fortran version (the version number does not appear to be documented by the original authors). The authors of the original Fortran code have updated it and published the reasons in

[Rd] How can I use R-function in My C++ project ? (using optim)

2014-10-22 Thread Prof J C Nash (U30A)
As the author of 3 of the 5 methods in optim, I think you may be wasting your time if this is for performance. My reasons are given in http://www.jstatsoft.org/v60/i02 Note that most of the speed benefits of compilation are found in the objective and gradient function, with generally more minor i

Re: [Rd] lbfgsb from C/C++

2014-09-08 Thread Prof J C Nash (U30A)
I won't comment on the C/C++ option, as I'm not expert in that. However, R users and developers should know that Nocedal et al. who developed L-BFGS-B released an update to correct a fault in 2011. It was important enough that an ACM TOMS article was used for the announcement. I recently implement

[Rd] a question about optim.R and optim.c in R

2014-07-08 Thread Prof J C Nash (U30A)
As you dig deeper you will find vmmin.c, cgmin.c and (I think) nmmin.c etc. Those were, as I understand, converted by p2c from my Pascal codes that you can find in the pascal library on netlib.org. These can be run with the Free Pascal compiler. Given how long ago these were developed (>30 years i

Re: [Rd] R CMD check for the R code from vignettes -- thread fraying?

2014-06-02 Thread Prof J C Nash (U30A)
I noted Duncan's comment that an answer had been provided, and went to the archives to find his earlier comment, which I am fairly sure I saw a day or two ago. However, neither May nor June archives show Duncan in the thread except for the msg below (edited for space). Possibly tech failures are ca

Re: [Rd] cat with backspace and newline characters

2013-11-07 Thread Prof J C Nash (U30A)
Over the years, this has been useful to me (not just in R) for many nonlinear optimization tasks. The alternatives often clutter the screen. > On 13-11-06 06:00 AM, r-devel-requ...@r-project.org wrote: > People do sometimes use this pattern for displaying progress (e.g. iteration > counts). >>

Re: [Rd] Byte code compile (not) helpful in R3.0.2 -- Fixed.

2013-11-03 Thread Prof J C Nash (U30A)
t; cmpfun(tfor) >> cmpfun(twhile) >> timforc<-microbenchmark(tfor(n)) >> timwhilec<-microbenchmark(twhile(n)) >> timforc >> timwhilec >> looptimes<-data.frame(timfor$time, timforc$time, timwhile$time, >> timwhilec$time) >> colMeans(looptimes) &

Re: [Rd] Byte code compile not helpful in R3.0.2

2013-11-03 Thread Prof J C Nash (U30A)
ooted that partition for quite a while. Here is the for-while test code: # forwhiletime.R library(microbenchmark) require(compiler) tfor <- function(n){ for (i in 1:n) { xx<-exp(sin(cos(as.double(i } xx } twhile <- function(n){ i<-0 while (i On 13-11-03

[Rd] Byte code compile not helpful in R3.0.2

2013-11-03 Thread Prof J C Nash (U30A)
I had a bunch of examples of byte code compiles in something I was writing. Changed to 3.0.2 and the advantage of compiler disappears. I've looked in the NEWS file but do not see anything that suggests that the compile is now built-in. Possibly I've just happened on a bunch of examples where it doe

Re: [Rd] Version of L-BFGS-B used in optim etc

2013-10-10 Thread Prof J C Nash (U30A)
This issue has been known for some time and I've had "why don't you fix this?" queries. However, I'm not one of the R-core folk who could do so, and don't code in C. Moreover, as far as I can tell, the version of L-BFGS-B in R is not one of the standard releases from Morales and Nocedal. As m

Re: [Rd] What algorithm is R using to calculate mean?

2013-07-27 Thread Prof J C Nash (U30A)
There is quite a literature on related methods for variance. If anyone is interested, I did some work (and even published the code in the magazine Interface Age in 1981) on some of these. I could probably put together scans of relevant materials, some of which are not easily available. It would

Re: [Rd] R 3.0, Rtools3.0,l Windows7 64-bit, and permission agony

2013-04-21 Thread Prof J C Nash (U30A)
While as a Linux user who has not so far been banished to Winland I have not experienced this problem, it seems to be the type of issue where a "how to", for example, on the R Wiki, would be helpful. Moreover, surely this is a name conflict on different platforms, so possibly a list of these

[Rd] Lessons from LibreOffice project

2013-03-06 Thread Prof J C Nash (U30A)
The message below came to me from the Getting Open Source Logic INto Government list. I'm passing it on to the devel list as the infoworld article may have some ideas of relevance to the R project, mainly concerning build and test issues and tracking changes in the code base. While the LibreOff

Re: [Rd] Speeding up R (was Using multicores in R)

2012-12-04 Thread Prof J C Nash (U30A)
For info, I put a little study I did about the byte code compiler and other speedup approaches (but not multicore) on the Rwiki at http://rwiki.sciviews.org/doku.php?id=tips:rqcasestudy which looks at a specific problem, so may not be relevant to everyone. However, one of my reasons for doing i

Re: [Rd] if(!CRAN()){...} / Repository policies

2012-11-02 Thread U30A J C Nash
If CRAN were a passive repository, the discussion about its policies would not be relevant to this list e.g., SourceForge. However, the development of R and its packages are very intimately connected to the CRAN repository policy. I doubt any of the players in building our current R ecosystem

[Rd] Model forecasts with new factor levels - predict.warn

2005-08-24 Thread Prof J C Nash
und in estimation levels of factor ", nn[i]) dostop = TRUE } } } # end loop over names } # end part where we DO have new data return(dostop) # TRUE if we should stop } # end of predict.warn code Test example: