Re: [R] Warning msg after reinstall?

2021-11-07 Thread Ivan Krylov
On Sun, 7 Nov 2021 17:07:20 -0500 Brian Lunergan wrote: > I run R on Linux Mint 19.3. If my advice below doesn't help, let's continue this in the other mailing list, r-sig-deb...@r-project.org . > Warning messages: > 1: In readLines(file, skip

Re: [R] Warning msg after reinstall?

2021-11-07 Thread Brian Lunergan
On 2021-11-07 5:17 p.m., Jeff Newmiller wrote: > The topic here is R language, not operating system surgery. You probably > shouldn't hold your breath for a solution to this here. > > That said, compiling and running without installing for access by the whole > system is always an option if you

Re: [R] Warning msg after reinstall?

2021-11-07 Thread Jeff Newmiller
The topic here is R language, not operating system surgery. You probably shouldn't hold your breath for a solution to this here. That said, compiling and running without installing for access by the whole system is always an option if you can fix the support libraries. On November 7, 2021 2:07:

[R] Warning msg after reinstall?

2021-11-07 Thread Brian Lunergan
Evening gents: First to quickly try and set the scene. I run R on Linux Mint 19.3. I had version 3.5 installed, but wanted to try and upgrade to 4.1. So... I deleted all R stuff I could find, setup the software sources file, and tried to install. Didn't work. I suppose it needs a more recent edit

Re: [R] Environmental oddity.

2021-11-07 Thread Rolf Turner
On Sun, 7 Nov 2021 13:11:10 -0500 Duncan Murdoch wrote: > I've submitted a bug report and patch: > > https://bugs.r-project.org/show_bug.cgi?id=18232 Thanks Duncan. It's good to know that the anomaly wasn't just a result of my doing something stupid. cheers, Rolf -- Honorary Research Fe

Re: [R] Environmental oddity.

2021-11-07 Thread Duncan Murdoch
I've submitted a bug report and patch: https://bugs.r-project.org/show_bug.cgi?id=18232 Duncan Murdoch On 07/11/2021 12:20 p.m., Duncan Murdoch wrote: Here's how to construct a similar deparsing error: # e1 and e2 are obviously different expressions e1 <- quote(5 * if (TRUE) 2 else 3/4) e2 <

Re: [R] Environmental oddity.

2021-11-07 Thread Duncan Murdoch
Here's how to construct a similar deparsing error: # e1 and e2 are obviously different expressions e1 <- quote(5 * if (TRUE) 2 else 3/4) e2 <- quote(5 * (if (TRUE) 2 else 3)/4) # and they evaluate differently eval(e1) #> [1] 10 eval(e2) #> [1] 2.5 # We can make an equivalent version of e2 by mes

Re: [R] Environmental oddity.

2021-11-07 Thread Duncan Murdoch
On 06/11/2021 11:32 p.m., Deepayan Sarkar wrote: On Sun, Nov 7, 2021 at 6:05 AM Rolf Turner wrote: I have two functions which appear to differ only in their environments. They look like: d1 function (x, mean = 0, sd = 1, log = FALSE) (((x - mean)/sd)^2 - 1) * if (log) 1 else dnorm(x, mean,

Re: [R] Environmental oddity --- reproducible example.

2021-11-07 Thread Berwin A Turlach
G'day Rolf, On Sun, 7 Nov 2021 19:33:40 +1300 Rolf Turner wrote: > library(Deriv) > d1 <- Deriv(dnorm,"sd") > source("d2.txt") # d2.txt is attached > > d1(1,0,3,TRUE) # [1] -0.2962963 > d2(1,0,3,TRUE) # [1] -0.889 Fascinating: R> pryr::call_tree(body(d1)) R> pryr::call_tree(body(d2)) cle

Re: [R] Environmental oddity.

2021-11-07 Thread Ivan Krylov
On Sun, 7 Nov 2021 09:02:36 +0530 Deepayan Sarkar wrote: > This sounds like a difference in precedence. The expression > > if (log) 1 else dnorm(x, mean, sd) / sd > > is apparently being interpreted differently as > > d1: (if (log) 1 else dnorm(x, mean, sd)) / sd > d2: if (log) 1 else (dnorm(x