hi I have list of matrix of lenggth 61 containg the mean values..I want to make a boxplot for each of the matrix. I used a for loop but i cant figure out the way to save in the boxplots> all.the.mean[[1]] mean 0.5 o.6 0.8 [[2]] 0.6 0.6 0.9 now i want the boxplot for each of the matrix in a seperate window.my code for(i in 1:length(all.the.mean) { windows() boxplot(all.the.mean[[i]] } this prints in all the boxplots but it cant be saved i dont know to save those plz help me on this -- View this message in context: http://www.nabble.com/boxplot-help-tp18782749p18782749.html Sent from the R help mailing list archive at Nabble.com.
Save them to a file in your favorite format (I like PDF):
pdf('yourfile.pdf')
for(i in 1:length(all.the.mean)
{
boxplot(all.the.mean[[i]]
}
dev.off()
On Fri, Aug 1, 2008 at 5:16 PM, Rajasekaramya <ramya.victory at gmail.com>
wrote:>
> hi
>
> I have list of matrix of lenggth 61 containg the mean values..I want to
make
> a boxplot for each of the matrix.
> I used a for loop but i cant figure out the way to save in the boxplots
>
>> all.the.mean
> [[1]]
> mean
> 0.5
> o.6
> 0.8
> [[2]]
> 0.6
> 0.6
> 0.9
> now i want the boxplot for each of the matrix in a seperate window.my code
> for(i in 1:length(all.the.mean)
> {
> windows()
> boxplot(all.the.mean[[i]]
> }
> this prints in all the boxplots but it cant be saved i dont know to save
> those
> plz help me on this
>
>
>
> --
> View this message in context:
http://www.nabble.com/boxplot-help-tp18782749p18782749.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?
Em Sex, 2008-08-01 ?s 14:16 -0700, Rajasekaramya escreveu:> hi > > I have list of matrix of lenggth 61 containg the mean values..I wantto make> a boxplot for each of the matrix. > I used a for loop but i cant figure out the way to save in theboxplots> > > all.the.mean > [[1]] > mean > 0.5 > o.6 > 0.8 > [[2]] > 0.6 > 0.6 > 0.9 > now i want the boxplot for each of the matrix in a seperate window.mycode> for(i in 1:length(all.the.mean) > { > windows() > boxplot(all.the.mean[[i]] > } > this prints in all the boxplots but it cant be saved i dont know tosave> those > plz help me on thisRajasekaramya, Have 2 forms to save a plot using savePlot ou using device like: jpeg(), png() or pdf() in you case for(i in 1:length(all.the.mean){ windows() boxplot(all.the.mean[[i]] title<-paste("Mean",i,sep="-") savePlot(filename = title,type = c("png")) } OR for(i in 1:length(all.the.mean){ windows() title<-paste(i,"png",sep=".") png(filename =tilte) boxplot(all.the.mean[[i]] dev.off() } -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil