[Bioc-devel] mclapply and Vector objects

Hahne, Florian florian.hahne at novartis.com
Mon Sep 24 12:58:44 CEST 2012


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



More information about the Bioc-devel mailing list