Stuart Lee

Results 42 comments of Stuart Lee

One slight issue with this approach is making sure the right generic dispatches on the `List` object, the tests were failing in https://github.com/sa-lee/plyranges/commit/9df6fba2989b9893f72bc660b38fdd2c8a0490ca because the wrong generic was dispatched base::mean...

Ok adding in dplyr for comparison, which is much faster than us (due to method dispatch?) ``` library(microbenchmark) library(magrittr) make_rand_gr % plyranges::as_granges() } # 10 grps set.seed(2018 - 5 -...

It's also more than likely that the way I'm constructing the indexes for `group_by` is slow - I think `dplyr` pushes this all way down until the `summarise`

It's probably worth looking at how dplyr achieves grouping too: See the following links to their cpp header files GroupedDataFrame class: https://github.com/tidyverse/dplyr/blob/master/inst/include/tools/SlicingIndex.h (lazy indexing) https://github.com/tidyverse/dplyr/blob/master/inst/include/dplyr/GroupedDataFrame.h And evalauting an expression over...

Hi Alex, Yep I know this is still an issue, especially when there are a lot of groups (mutate actually does an lapply at the back, so isn't optimised like...

Hi Miguel, So `stretch()` has no knowledge that there's an additional column called `blocks` in your `GRanges`. How are you expecting blocks to be updated? Are you expecting the total...

Here's a few ways you could do this: ``` r suppressPackageStartupMessages(library(plyranges)) test_path [1] chr7 127471197-127472373 + | Pos1 0 #FF0000 #> [2] chr7 127472364-127473540 + | Pos2 2 #FF0000 #>...

Let me know if that's what you had in mind, and I'll close the issue.

Ok that makes way more sense! So I think if this is urgent, you could modify the `last_block_stretch` function I made above. Thinking about an interface to this, the easiest...

Cool it's something that I've been interested in for a while and would be keen to work on. I guess the part of the dplyr API that will be the...