Please keep this on the list.
Assuming A is a data.frame
tmp = lapply(1:10, function(i) {
chr = paste("chr", i, sep = "")
A.sub = subset(A, chr == chr)
cbind(A.sub, seq = as.character(Views(Mmusculus[[i]], start = A.sub
$start, end = A.sub$end)))
})
A.new = do.call(rbind, tmp)
Kasper
On May 28, 2009, at 11:04 , Ivan Gregoretti wrote:
Thanks Kasper.
If you have several chromosomes, you will need something like an
lapply over
the chromosomes
That's the problem. Every time I try to loop over each chromosome, R
complains saying that Mmusculus is a non subsetable S4 object.
Ivan
_______________________________________________
Bioc-sig-sequencing mailing list
Bioc-sig-sequencing@r-project.org
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing