[R] list genes w/n a genomic fragment

2008-07-07 Thread runner
Hi, is there any package/function in Bioconductor that can do this: if given the chromosome positions of a fragment, find out all genes within, and with the information about which strand is the sense strand. And vice versa. Thanks a lot. - Appreciate your time & attention! -- View this mes

[R] a quick question about "format()"

2007-09-18 Thread runner
In the documentation of 'pairs'(package:graphics), within the last example, it reads: format(c(r, 0.123456789), digits=3)[1] Why not simple use: format(r, digits=3)? What is the difference? Thanks. -- View this message in context: http://www.nabble.com/a-quick-question-about-%22format%28%29%

[R] use 'lapply' to creat 2 new columns based on old ones in a data frame

2007-10-12 Thread runner
There is a dataset 'm', which has 3 columns: 'index', 'old1' and 'old2'; I want to create 2 new columns: 'new1' and 'new2' on this condition: if 'index'==i, then 'new1'='old1'+add[i]. 'add' is a vector of numbers to be added to old columns, e.g. add=c(10,20,30 ...) Like this: index old1