Mostly to Herve:

Sometimes we want to pluck the first 1, or 10, or whatever elements from
each element of a list. If I had a list 'x', I thought I could do this with:

x[IntegerList(1:5)]

But it only gives elements 1:5 from x[[1]], not each element of 'x'. In
other words, I thought the index would be repped out. Instead, 'x' is
subset to the length of 'i', and I'm not sure if that makes sense?

But maybe what we really want are pluckHead/Tail, which would be robust to
the case that < n elements are in an element. And of course a more general
pluck(x, i) to select 'i' from each element, but I wanted the line above to
do that.

Michael

        [[alternative HTML version deleted]]

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

Reply via email to