[R] vector in filename
[Ricardo Rodriguez] Your XEN ICT Team
webmaster at xen.net
Fri Apr 18 09:59:52 CEST 2008
Hi,
Simon Blomberg wrote:
> How about this:
>
> x <- 1
> y <- 1
> mmax <- 10
>
> my.files <- paste("foo", x:mmax, ".png", sep="")
>
> for (i in my.files) {
> png(filename=i, pointsize=20, width=600, height=600, units="px",
> bg="#eaedd5")
> plot(x, y)
> dev.off()
> x <- x+1
> y <- y+1
> }
>
It does the trick! Thanks.
> Normally I would avoid for loops, but I think this application is a
> legitimate use.
Please, why do you avoid looping normally? Thanks again.
Greetings,
Ricardo
--
Ricardo Rodríguez
Your XEN ICT Team
More information about the R-help
mailing list