[R] using "for" loop

alessandro carletti alxmilton at yahoo.it
Fri Aug 5 10:58:08 CEST 2005


Hi everybody,
how can I create a loop for plotting parameters for
each level of a variable, for example:

NAME   temperature  depth
aaa      23           -1
aaa      22           -2
aaa      24           -1
bbb      23           -4
bbb      23           -1 
aaa      22           -1
bbb      22            0

I mean, I would like R to plot temperature vs depth
for aaa, then another plot for bbb, and so on.

Is it for loop ok?
Thanks




More information about the R-help mailing list