Skip to content
Prev 314581 / 398502 Next

Index out SNP position

Assuming I understand what you want, which I'm not certain of, here's
one way; there are more (probably some more elegant).

I'm not sure how you'd put them in a vector, since there are different
numbers of values for each row of A, so instead I've made a list.
unlist(SNP) will turn it into a vector.

It's also not consistent which column of A has the higher and lower values.

SNP <- lapply(seq_len(nrow(A)), function(x)B[B >= min(A[x,]) & B <= max(A[x,])])
[[1]]
[1] 36003918 35838399 35838589

[[2]]
[1] 35838589

[[3]]
numeric(0)

[[4]]
[1] 36003918

[[5]]
numeric(0)
On Thu, Jan 3, 2013 at 4:54 PM, JiangZhengyu <zhyjiang2006 at hotmail.com> wrote:
--
Sarah Goslee
http://www.functionaldiversity.org