Re: [R] Testing optimization solvers with equality constraints

2021-05-22 Thread Abby Spurdle
Sorry, missed the top line of code. library (barsurf) __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

Re: [R] Testing optimization solvers with equality constraints

2021-05-22 Thread Abby Spurdle
For a start, there's two local minima. Add to that floating point errors. And possible assumptions by the package authors. begin code f <- function (x, y, sign) { unsign.z <- sqrt (1 - x^2 - y^2) 2 * (x^2 - sign * y * unsign.z) } north.f <- function (x, y) f (x, y, +1) south.f <-

Re: [R] Pipe precedence

2021-05-22 Thread Jeff Newmiller
R 4.1.0 was released this week with a new pipe operator and a new anonymous function shorthand (\(x) x^2). The pipe operator is not quite as flexible as the magrittr pipe, but it is faster (not that the magrittr pipe is noticably slow) and built-in. On May 22, 2021 8:07:27 PM PDT, Caitlin

Re: [R] Pipe precedence

2021-05-22 Thread Eric Berger
This is part of the R-4.1.0 release which came out a few days ago. See 1. https://stat.ethz.ch/pipermail/r-announce/2021/000670.html 2. https://www.jumpingrivers.com/blog/new-features-r410-pipe-anonymous-functions/ 3.

Re: [R] Pipe precedence

2021-05-22 Thread Caitlin Gibbons
I didn’t know R had a new pipe operator, but I have seen “|>” (without quotes) used in the Elixir language though. Are there now two? “%>%” from the magrittr package and “|>” which is built-in? > On May 22, 2021, at 5:26 PM, Jeff Newmiller wrote: > > What is the precedence of the new |> pipe

[R] Pipe precedence

2021-05-22 Thread Jeff Newmiller
What is the precedence of the new |> pipe operator? I don't see it mentioned in ?Syntax, nor does it come up when I search the R Language Definition document. -- Sent from my phone. Please excuse my brevity. __ R-help@r-project.org mailing list -- To

Re: [R] Help in modifying code to extract data from url

2021-05-22 Thread David Winsemius
Several authors hav addressed this problem with names that resemble "rbindfill". In my machine I find four instances: ??rbindfill Help pages: ffbase::ffdfrbind.fill        rbind for ffdf where missing columns are added if not available in one of the ffdf objects plyr::rbind.fill       

Re: [R] Ubuntu hirsute unable to receive the key to add the repository

2021-05-22 Thread Eric Berger
Hi Victor, This issue has been raised in earlier entries in this list. I have not dug into it myself but the following link was posted as being helpful. https://askubuntu.com/questions/1286545/what-commands-exactly-should-replace-the-deprecated-apt-key/1307181#1307181 HTH, Eric On Sat, May 22,

Re: [R] Help in modifying code to extract data from url

2021-05-22 Thread Richard O'Keefe
The source being a URL is not important. The important things are - what the structure of the JSON data is - what the MEANING of the JSON data is - what that meaning says about what SHOULD appear in the data from in these cases. Arguably this isn't even an R question at all. It's a question

[R] Ubuntu hirsute unable to receive the key to add the repository

2021-05-22 Thread Victor
I followed the procedure indicated in https://cran.mirror.garr.it/CRAN/ step by step to� install R under ubuntu 21.04 hirsute but� the apt-key command failed: vr@ubuntu:~$ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 Warning: apt-key is

Re: [R] Testing optimization solvers with equality constraints

2021-05-22 Thread Hans W
Yes. "*on* the unit sphere" means on the surface, as you can guess from the equality constraint. And 'auglag()' does find the minimum, so no need for a special approach. I was/am interested in why all these other good solvers get stuck, i.e., do not move away from the starting point. And how to

Re: [R] Testing optimization solvers with equality constraints

2021-05-22 Thread Abby Spurdle
Sorry, this might sound like a poor question: But by "on the unit sphere", do you mean on the ***surface*** of the sphere? In which case, can't the surface of a sphere be projected onto a pair of circles? Where the cost function is reformulated as a function of two (rather than three) variables.