Hi > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of condor > Sent: Friday, January 18, 2013 10:17 AM > To: r-help@r-project.org > Subject: Re: [R] plotting from dataframes > > So by hand the command would be > > par(mfrow=c(1,2)) > plot(frames$'1'hour1) > plot(frames$'2'hour1) > > But in my case there are far more than 2 days, so I want to use a loop. > Suppose I have 10 plots > par(mfrow=c(2,5)) > for(i in 1:10){ > plot( /what should be put here??/)
use plot[,i] if you want plot columns 1:10 or put this col.to.plot=c(5,7,9,12,15, 17, 21, 25, 26, 30) in front of cycle and use plot[,col.to.plot[i]] if you want to plot preselected columns Regards Petr > } > > > > -- > View this message in context: http://r.789695.n4.nabble.com/plotting- > from-dataframes-tp4655851p4655931.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.