Displaying 4 results from an estimated 4 matches for "l418".
Did you mean:
418
2023 Nov 07
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
....<newtype>(.) (or coerceVector() in C).
So I tracked down the source (which admittedly has been this way for much
longer than the present discussion) to see what exactly c() is doing in
this case:
https://github.com/r-devel/r-svn/blob/71e7480b07767f3b7d5c45a4247959aa4d83d910/src/main/bind.c#L418-L425
And indeed! It's not "coercion" in the sense I just described... there's a
branch for the 'x == NA_LOGICAL' case to _convert_ to NA_complex_.
On Mon, Nov 6, 2023 at 3:08?AM Martin Maechler <maechler at stat.math.ethz.ch>
wrote:
> >>>>> Micha...
2023 Nov 08
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
...I tracked down the source (which admittedly has been this way for much
> > longer than the present discussion) to see what exactly c() is doing in
> > this case:
>
> >https://github.com/r-devel/r-svn/blob/71e7480b07767f3b7d5c45a4247959aa4d83d910/src/main/bind.c#L418-L425
>
> > And indeed! It's not "coercion" in the sense I just described... there's a
> > branch for the 'x == NA_LOGICAL' case to_convert_ to NA_complex_.
>
> Yes; "of course" ... still, I did not answer your main question,
>...
2023 Nov 09
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
...he source (which admittedly has been this way for much
>> > longer than the present discussion) to see what exactly c() is doing in
>> > this case:
>>
>> >https://github.com/r-devel/r-svn/blob/71e7480b07767f3b7d5c45a4247959aa4d83d910/src/main/bind.c#L418-L425
>>
>> > And indeed! It's not "coercion" in the sense I just described... there's a
>> > branch for the 'x == NA_LOGICAL' case to_convert_ to NA_complex_.
>>
>> Yes; "of course" ... still, I did not a...
2023 Nov 06
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
>>>>> Michael Chirico
>>>>> on Sun, 5 Nov 2023 09:41:42 -0800 writes:
> This is another follow-up to the thread from September
> "Recent changes to as.complex(NA_real_)".
> A test in data.table was broken by the changes for NA
> coercion to complex; the breakage essentially comes from
> c(NA, 0+1i)
> # vs