Re: [R] re store pictures in an automatically named files using loops

From: Bin Yue <leffgh_at_163.com>
Date: Mon, 17 Dec 2007 04:20:11 -0800 (PST)

 I put bmp() before the plot() syntax ,
 then the code worked.

Bin Yue wrote:
>
> Dear all:
> I hope that the file in which the picture is stored has the same name
> as the " main" title of the picture . But it turns out that , the name of
> the file is :names(spl.sp)[i].bmp,while the main title of the picture is
> names(spl.sp)[i+1]
> It seems that the problem is related to the "device". But I am finding it
> very difficult to understand .
> Do you have any idea about that?
>
> Here is my function:
>
> sp.drawK<-function(spl.sp){
> env<-list()
> for(i in 1:length(spl.sp)){
> if(spl.sp[[i]]$n==1) next
> else{
> env[[i]]<-envelope(spl.sp[[i]],Kest)
> plot(env[[i]],main=names(spl.sp)[i])
> legend("topleft",lty=1:4,col=1:4,legend=c("obs","theo","hi","lo"))
> text(2,500,cex=0.8, paste("n=",spl.sp[[i]]$n,sep=""))
> bmp(paste(names(spl.sp)[i],".bmp",sep=""))
>
> }
> }
> }
>
> Best wishes,
> Bin Yue
>
>



Best regards,
Bin Yue

student for a Master program in South Botanical Garden , CAS
-- 
View this message in context: http://www.nabble.com/restore--pictures-in-an-automatically-named-files-using-loops-tp14370153p14370262.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.
Received on Mon 17 Dec 2007 - 12:30:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Dec 2007 - 21:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.