Re: [Rd] [External] Two ALTREP questions

2020-11-21 Thread Jiefei Wang
Thank Dirk and Luke for the answers! (That's C code. The confusion here is partly our fault. When Romain and I > extended the inline package with 'cxxfunction' to support the then-young > but > active Rcpp package, we picked C++. Strictly speaking that isn't required; > you are only in C++ here be

Re: [Rd] [External] Two ALTREP questions

2020-11-21 Thread luke-tierney
On Sat, 21 Nov 2020, Jiefei Wang wrote: Hello, I have two related ALTREP questions. It seems like there is no way to assign attributes to an ALTREP vector without using C++ code. To be more specifically, I want to make an ALTREP matrix, I have tried the following R code but none of them work. `

Re: [Rd] .Internal(quit(...)): system call failed: Cannot allocate memory

2020-11-21 Thread Duncan Murdoch
On 21/11/2020 12:51 p.m., Jan Gorecki wrote: Dear R-developers, Some of the more fat scripts (50+ GB mem used by R) that I am running, when they finish they do quit with q("no", status=0) Quite often it happens that there is an extra stderr output produced at the very end which looks like this:

[Rd] .Internal(quit(...)): system call failed: Cannot allocate memory

2020-11-21 Thread Jan Gorecki
Dear R-developers, Some of the more fat scripts (50+ GB mem used by R) that I am running, when they finish they do quit with q("no", status=0) Quite often it happens that there is an extra stderr output produced at the very end which looks like this: Warning message: In .Internal(quit(save, statu

Re: [Rd] Error in unsplit() with tibbles

2020-11-21 Thread Marc Schwartz via R-devel
Hi, Peter, thanks for the clarification. Mario, I was not looking to debate the pros and cons of each environment, simply to point out that expecting mutually compatible functionality is not generalizable, especially when third party authors can make structural changes to their objects over t

Re: [Rd] Error in unsplit() with tibbles

2020-11-21 Thread Mario Annau
Cool - thank you Peter! @Marc: This is really not a tidyverse vs base-R debate and I personally think that they should both work together for most parts. The common environment is still R. But just to give you the full picture I also filed a bug for tibbles (https://github.com/tidyverse/tibble/iss

Re: [Rd] Error in unsplit() with tibbles

2020-11-21 Thread Peter Dalgaard
I get the sentiment, but this is really just bad coding (on my own part, I suspect), so we might as well just fix it... -pd > On 21 Nov 2020, at 17:42 , Marc Schwartz via R-devel > wrote: > > >> On Nov 21, 2020, at 10:55 AM, Mario Annau wrote: >> >> Hello, >> >> using the `unsplit()` func

Re: [Rd] Error in unsplit() with tibbles

2020-11-21 Thread Peter Dalgaard
Yes. Nevermind tibbles, the [rep(NA, len),] construction only happens to work because len will always be >= the number of rows in value[[1L]], witness > (1:10)[rep(NA, 20)] [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA > (1:20)[rep(NA, 10)] [1] NA NA NA NA NA NA NA NA NA NA N

Re: [Rd] Error in unsplit() with tibbles

2020-11-21 Thread Marc Schwartz via R-devel
> On Nov 21, 2020, at 10:55 AM, Mario Annau wrote: > > Hello, > > using the `unsplit()` function with tibbles currently leads to the > following error: > >> mtcars_tb <- as_tibble(mtcars, rownames = NULL) >> s <- split(mtcars_tb, mtcars_tb$gear) >> unsplit(s, mtcars_tb$gear) > Error: Must sub

[Rd] Error in unsplit() with tibbles

2020-11-21 Thread Mario Annau
Hello, using the `unsplit()` function with tibbles currently leads to the following error: > mtcars_tb <- as_tibble(mtcars, rownames = NULL) > s <- split(mtcars_tb, mtcars_tb$gear) > unsplit(s, mtcars_tb$gear) Error: Must subset rows with a valid subscript vector. ℹ Logical subscripts must match

[Rd] Two ALTREP questions

2020-11-21 Thread Jiefei Wang
Hello, I have two related ALTREP questions. It seems like there is no way to assign attributes to an ALTREP vector without using C++ code. To be more specifically, I want to make an ALTREP matrix, I have tried the following R code but none of them work. ``` .Internal(inspect(1:6)) .Internal(inspec