[Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
What is going on here? In the lines ending in the inputs and outputs are identical yet one gives a warning and the other does not. a1 <- `rownames<-`(anscombe[1:3, ], NULL) a2 <- anscombe[1:3, ] ix <- 5:8 # input arguments to are identical in both cases identical(stack(a1[ix]), sta

Re: [Rd] data.frame weirdness

2023-11-14 Thread Deepayan Sarkar
They differ in whether the row names are "automatic": > .row_names_info(a1) [1] -3 > .row_names_info(a2) [1] 3 Best, -Deepayan On Tue, 14 Nov 2023 at 08:23, Gabor Grothendieck wrote: > > What is going on here? In the lines ending in the inputs and outputs > are identical yet one gives a w

Re: [Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
In that case identical should be FALSE but it is TRUE identical(a1, a2) ## [1] TRUE On Tue, Nov 14, 2023 at 8:58 AM Deepayan Sarkar wrote: > > They differ in whether the row names are "automatic": > > > .row_names_info(a1) > [1] -3 > > .row_names_info(a2) > [1] 3 > > Best, > -Deepayan > > On T

Re: [Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
Also why should that difference result in different behavior? On Tue, Nov 14, 2023 at 9:38 AM Gabor Grothendieck wrote: > > In that case identical should be FALSE but it is TRUE > > identical(a1, a2) > ## [1] TRUE > > > On Tue, Nov 14, 2023 at 8:58 AM Deepayan Sarkar > wrote: > > > > They diffe

Re: [Rd] data.frame weirdness

2023-11-14 Thread Deepayan Sarkar
On Tue, 14 Nov 2023 at 09:41, Gabor Grothendieck wrote: > > Also why should that difference result in different behavior? That's justifiable, I think; consider: > d1 = data.frame(a = 1:4) > d2 = d3 = data.frame(b = 1:2) > row.names(d3) = c("a", "b") > data.frame(d1, d2) a b 1 1 1 2 2 2 3 3 1 4

Re: [Rd] data.frame weirdness

2023-11-14 Thread Gabor Grothendieck
Seems like a leaky abstraction. If both representations are supposed to be outwardly the same to the user then they should act the same and if not then identical should not be TRUE. On Tue, Nov 14, 2023 at 9:56 AM Deepayan Sarkar wrote: > > On Tue, 14 Nov 2023 at 09:41, Gabor Grothendieck > wro

Re: [Rd] Segmentation fault early in compilation of revision 85514

2023-11-14 Thread Joshua Ulrich
On Mon, Nov 13, 2023 at 12:45 PM Avraham Adler wrote: > > On Mon, Nov 13, 2023 at 1:13 AM Dirk Eddelbuettel wrote: > > > > > > Avi, > > > > Might be toolchain-dependent, might be options-dependent--it built fine > > here. > > Easier for you to vary option two so maybe try that? > > > > Dirk > >

Re: [Rd] Segmentation fault early in compilation of revision 85514

2023-11-14 Thread Tomas Kalibera
On 11/14/23 19:19, Joshua Ulrich wrote: On Mon, Nov 13, 2023 at 12:45 PM Avraham Adler wrote: On Mon, Nov 13, 2023 at 1:13 AM Dirk Eddelbuettel wrote: Avi, Might be toolchain-dependent, might be options-dependent--it built fine here. Easier for you to vary option two so maybe try that? D