[R] Creating object referant from argument name

2009-10-13 Thread showa
Hi all. I'd like to define an object within a function based on an argument to that function. Specifically, I've got: do.something<-function(input){ id<-substring(input,3,3) j<-list1 if(id==2)j<-list2 if(id==3)j<-list3 if(id==4)j<-list4 ...} Instead of all these if() arguments, I was hoping to u

[R] Multiple plots of multiple plots

2009-10-08 Thread showa
I'd like to generate on a single device multiple plots, each of which contains two plots. Essentially, I've got sub-plots which consist of two tracks, the upper one displaying gene expression data, and the lower one showing gene position along the chromosome. I'd like to display four of these sub-