Skip to content
Prev 374683 / 398513 Next

Loop Function to Create Multiple Scatterplots

Hi Steven,
Sad to say that your CSV file didn't make it to the list and I can't
access the data via your Dropbox account. Therefore we don't know the
structure of "mydata". If you are able to plot the data as in your
example, this might help:

genexp<-matrix(runif(360,1,2),ncol=18)
colnames(genexp)<-paste("GluA.",1:18,"GRIA",1:18,"..Expression",sep="")
mydata<-cbind(Age..weeks.post.conception=20:38,genexp)
for(genecol in colnames(mydata)[2:19]) {
 png(paste0(genecol,".png"))
 plot(mydata$Age..weeks.post.conception,mydata$genecol)
}

Jim
On Mon, May 21, 2018 at 9:05 AM, STEVEN MANCINI <mancinsj at mcmaster.ca> wrote: