On Wed, Jan 22, 2014 at 1:29 PM, Hervé Pagès <hpa...@fhcrc.org> wrote:

> Hi Michael,
>
>
> On 01/12/2014 05:16 AM, Michael Lawrence wrote:
>
>> Hi,
>>
>>
>> It may be time to deprecate the seq*apply family of functions, including
>> seqapply, mseqapply, tseqapply, seqby and seqsplit. These are ancient
>> functions named in referece to the "Sequence" class, now called "Vector".
>> It would seem better for the user to write: asList(lapply(...)) instead of
>> coming up with an alias for that. For readability, we should probably
>> export asList() as an alias for as(x, "List"), which I just cleaned up.
>>
>
> Sounds good to me.
>
>
>
>> There is one caveat though: mseqapply has been particularly useful,
>> because
>> it delegates to mapply_List, which is smart enough to handle any vector
>> argument in "...". The mapply,List method of course restricts everything
>> to
>> List. We should probably export mapply_List, probably with a better name.
>> Suggestions?
>>
>
> Why do we need all this?
>

Neat. Presumably due to this patch:

commit 42139699d91a34c401eedd36db62716a607d0b06
Author: maechler <maechler@00db46b3-68df-0310-9c12-caf00c1e9a41>
Date:   Wed Nov 28 10:31:42 2012 +0000

    mapply(F, <S4>) now works thanks to a version of Herve's patch

We should do away with mapply_List now that this is part of released R.



>
>   x <- RleList(11:14, 3:1)
>
> Then:
>
>   > IRanges:::mapply_List(function(a, b) {a+b}, x, 10)
>   [[1]]
>   numeric-Rle of length 4 with 4 runs
>     Lengths:  1  1  1  1
>     Values : 21 22 23 24
>
>   [[2]]
>   numeric-Rle of length 3 with 3 runs
>     Lengths:  1  1  1
>     Values : 13 12 11
>
> But also:
>
>   > base::mapply(function(a, b) {a+b}, x, 10)
>   [[1]]
>   numeric-Rle of length 4 with 4 runs
>     Lengths:  1  1  1  1
>     Values : 21 22 23 24
>
>   [[2]]
>   numeric-Rle of length 3 with 3 runs
>     Lengths:  1  1  1
>     Values : 13 12 11
>
> What am I missing?
>
> Thanks,
> H.
>
>
>> Michael
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioc-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>>
> --
> Hervé Pagès
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M1-B514
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpa...@fhcrc.org
> Phone:  (206) 667-5791
> Fax:    (206) 667-1319
>

        [[alternative HTML version deleted]]

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to