Re: [R] data.frame with a column containing an array

2023-05-29 Thread Georg Kindermann
se do.call("[",c(list(xj,i), rep(list(bquote()), length(dim(xj))-1L), list(drop = FALSE))) Would this be possible and work? Thanks! Georg   Gesendet: Freitag, 26. Mai 2023 um 21:05 Uhr Von: "Bert Gunter" An: "Georg Kindermann" Cc: "Rui Barradas" ,

Re: [R] data.frame with a column containing an array

2023-05-27 Thread Georg Kindermann
variables: # $ id: int 1 2 # $ ar: int 1 2 3 4 5 6 7 8 Kind regards, Georg Gesendet: Donnerstag, 25. Mai 2023 um 19:15 Uhr Von: "Bert Gunter" An: "Georg Kindermann" Cc: "Rui Barradas" , r-help@r-project.org Betreff: Re: Re: [R] data.frame with a column containing

Re: [R] data.frame with a column containing an array

2023-05-25 Thread Georg Kindermann
So is this an expected behavior or is it a bug which should be reported somewhere else? Thanks! Georg      Gesendet: Dienstag, 09. Mai 2023 um 19:28 Uhr Von: "Bert Gunter" An: "Georg Kindermann" Cc: "Rui Barradas" , r-help@r-project.org Betreff: Re: [R] data.fra

Re: [R] data.frame with a column containing an array

2023-05-09 Thread Georg Kindermann
[1, 1:2, 1:2] 1 3 5 7 But it would be nice if something similar would also work with data.frame. Georg       Gesendet: Dienstag, 09. Mai 2023 um 16:56 Uhr Von: "Bert Gunter" An: "Georg Kindermann" Cc: "Rui Barradas" , r-help@r-project.org Betreff: Re: [R] data.f

Re: [R] data.frame with a column containing an array

2023-05-09 Thread Georg Kindermann
09. Mai 2023 um 09:32 Uhr Von: "Rui Barradas" An: "Georg Kindermann" , r-help@r-project.org Betreff: Re: [R] data.frame with a column containing an array Às 11:52 de 08/05/2023, Georg Kindermann escreveu: > Dear list members, > > when I create a data.frame con

[R] data.frame with a column containing an array

2023-05-08 Thread Georg Kindermann
Dear list members, when I create a data.frame containing an array I had expected, that I get a similar result, when subsetting it, like having a matrix in a data.frame. But instead I get only the first element and not all values of the remaining dimensions. Differences are already when creating

[R] Why is R making a copy-on-modification after using str?

2020-11-30 Thread Georg Kindermann
Dear list members, I was wondering why R is making a copy-on-modification after using str. m <- matrix(1:12, 3) tracemem(m) #[1] "<0x559df861af28>" dim(m) <- 4:3 m[1,1] <- 0L m[] <- 12:1 str(m) # int [1:4, 1:3] 12 11 10 9 8 7 6 5 4 3 ... dim(m) <- 3:4 #Here after str a copy is made #tracemem[0x5