Skip to content
Back to formatted view

Raw Message

Message-ID: <20050805085808.87956.qmail@web26606.mail.ukl.yahoo.com>
Date: 2005-08-05T08:58:08Z
From: alessandro carletti
Subject: using "for" loop

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