Instead of creating separate objects for each one, why not just a list to
hold the data. Instead of having mp1.lm ... mp10.lm, you would have mp.lm[[1]]
... mp.lm[[10]] and therefore your loop could look like:
for( i in 1:10){
x11()
plot( mp[[i]]$experimental_response, fitted( mp[[i]]) ); abline(0,1)
}
If you really want to use separate variable, look at 'get'.
On 3/30/06, klebyn <[EMAIL PROTECTED]> wrote:
>
>
> Hello
>
> How to create plots dynamically with results of several analysis ?
>
> I got many outputs from lm fuction like:
>
> mp1.lm mp2.lm mp3.lm mp4.lm mp5.lm ...
>
> I'd like to make experimental versus predicted response plots of all
> analysis
> in a 'for loop':
>
> for( i in 1:10){
> x11()
>
> plot( mp*i*$experimental_response, fitted( mp*i* ) ); abline(0,1)
>
> }
>
> I tried: paste( 'mp', i, sep=''), but it don't work.
>
>
> How to make this reference?
>
>
> Regards
>
> Cleber
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390 (Cell)
+1 513 247 0281 (Home)
What the problem you are trying to solve?
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html