It definitely makes sense to have a generic for mclapply that dispatches on
Vector. Perhaps also for some of the other apply functions in the parallel
package.

Michael

On Mon, Sep 24, 2012 at 3:58 AM, Hahne, Florian
<florian.hahne@novartis.com>wrote:

> Would it be possible to make mclapply aware of the Vector class?
> Currently, the following line causes them to be coerced into a regular
> list which could be rather expensive for instance in the case of
> GrangesLists:
> if (!is.vector(X) || is.object(X))
>         X <- as.list(X)
>
>
> I guess something like
> if ((!is.vector(X) && !is(X, "Vector")) || is.object(X))
>         X <- as.list(X)
> would do the trick.
>
> Or am I missing something obvious here?
> Cheers,
> Florian
>
> _______________________________________________
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

	[[alternative HTML version deleted]]

