Re: [Rd] Add to Documentation of atan2.

2021-05-18 Thread Stefan Evert
> On 18 May 2021, at 20:30, Ben Bolker wrote: > > On my system (Ubuntu), 'man 3 catan' gives documentation on the function, > and says "The real part of y is chosen in the interval [-pi/2,pi/2]" - but > that _could_ be system-dependent. My copy of "C in a Nutshell" suggests that this requi

Re: [Rd] Add to Documentation of atan2.

2021-05-18 Thread Ben Bolker
Can you dig through into the code, see what's going on, and suggest a documentation patch? To get you started, the code for the complex version of atan2 is in https://svn.r-project.org/R/trunk/src/main/complex.c z_atan2 is at line 669 (the first argument is a pointer to the result, args 2

Re: [Rd] base R pipe documentation

2021-05-18 Thread Bill Dunlap
It would be nice to have "|>" listed in the precedence table in help(Syntax). I think it has the same precedence as "%any%" and both are left-associative. > quote( a |> f1() %any% f2()) f1(a) %any% f2() > quote( a %any% f1() |> f2()) f2(a %any% f1()) help(`|>`) does mention magrittr's pip

[Rd] Add to Documentation of atan2.

2021-05-18 Thread Jorgen Harmse via R-devel
The current documentation says that atan2(y,x) is the angle between the x-axis and the vector from the origin to (x,y), but what does this mean when x & y are complex? The function seems to pick theta with Re(theta) between -pi and pi and with tan(theta) (approximately) equal to y/x, but that le

Re: [Rd] `mode`

2021-05-18 Thread Martin Maechler
> Dmichael Parrish via R-devel > on Tue, 18 May 2021 02:05:04 + (UTC) writes: > Hello, Kindly revise the documentation for `mode` to > reflect foo <- function () {} typeof(foo) # [1] "closure" > mode(foo)# [1] "function" > `help(mode)` states: Modes have the same