[Rd] Speed-up/Cache loadNamespace()

2020-07-19 Thread Mario Annau
Dear all, in our current setting we have our packages stored on a (rather slow) network drive and need to invoke short R scripts (using RScript) in a timely manner. Most of the script's runtime is spent with package loading using library() (or loadNamespace to be precise). Is there a way to cache

Re: [Rd] Speed-up/Cache loadNamespace()

2020-07-19 Thread Mario Annau
exhaustive. > > On Mon, 20 Jul 2020 at 1:50 am, Mario Annau wrote: > >> Dear all, >> >> in our current setting we have our packages stored on a (rather slow) >> network drive and need to invoke short R scripts (using RScript) in a >> timely manner. M

[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

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

2020-11-21 Thread Mario Annau
ly 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 < > r-devel@r-project.org> wrote: > > > > > >> On Nov 21, 2020, at 10:55 AM, Mario Annau >

[Rd] Proper way to define cbind, rbind for s4 classes in package

2015-01-24 Thread Mario Annau
Hi all, this question has already been posted on stackoverflow, however without success, see also http://stackoverflow.com/questions/27886535/proper-way-to-use-cbind-rbind-with-s4-classes-in-package. I have written a package using S4 classes and would like to use the functions rbind, cbind with th

Re: [Rd] Proper way to define cbind, rbind for s4 classes in package

2015-01-24 Thread Mario Annau
>> I have written a package using S4 classes and would like to use the >> functions rbind, cbind with these defined classes. >> >> Since it does not seem to be possible to define rbind and cbind directly >> as S4 methods (see ?cBind) I defined rbind2 and cbind2 instead: >> > > This needs some clar

Re: [Rd] Proper way to define cbind, rbind for s4 classes in package

2015-02-09 Thread Mario Annau
a++ 10 10 10 10 >. 1 . . > > rbind(1:4, c = 2, "a++" = 10, dd, deparse.level = 2) # 4 rownames > 4 x 4 sparse Matrix of class "dgCMatrix" > > deparse.level 1 2 3 4 > c 2 2 2 2 > a++

Re: [Rd] Proper way to define cbind, rbind for s4 classes in package

2015-02-11 Thread Mario Annau
you able to create a reproducible example, somehow? > > Thanks, > Michael > > On Mon, Feb 9, 2015 at 2:28 PM, Mario Annau <mailto:mario.an...@gmail.com>> wrote: > > Hi Michael, > I've tested your change in r67699 (using r67773) and the function now >

Re: [Rd] Proper way to define cbind, rbind for s4 classes in package

2015-02-21 Thread Mario Annau
Thank you very much for your effort! I can confirm that *bind S4 method dispatching now works for my use cases as expected (tested using r67856). Cheers, mario Am 20/02/15 um 12:40 schrieb Martin Maechler: >>>>>> Mario Annau >>>>>> on Wed, 11 Feb 2015 20: