by (
data.df, data.df$category, function(x)
plot (x$var1, x$var2) )
Should
work, but this is the kind of plotting for which Trellis is
designed.
xyplot( var2 ~ var1|category,
data="">
Dear S-News Readers,
Is there a simple way to obtain
multiple plots of 2 variables from a single dataframe according to a category
variable. For example,
by (
data.df, data.df$category, summary)
gives a summary for each category
but
by ( data.df,
data.df$category, plot (data.df$var1, data.df$var2)
)
just produces a single plot for all
categories.
Any help would be
appreciated.
Andrew Scott
The information
contained in this email and any attached files is strictly confidential and may
contain legally privileged information. This email should be read by the
intended addressee only. If the recipient of this message is not the intended
addressee, please advise ICF (Australia) Pty Ltd on +61 2 8853 9100
or icfteam@icfrith.com.au and promptly delete this email and any attachments.
The intended recipient of this email may only use, reproduce, disclose or
distribute the information contained in this email and any attached files with
ICF (Australia) Pty Ltd's permission. If
you are not the intended addressee, you are strictly prohibited from using,
reproducing, disclosing or distributing the information contained in this email
and any attached files. Although ICF (Australia) Pty Ltd believes this e-mail
and any attachments to be free of any virus or other defect which may effect
your computer, it is the responsibility of the recipient to ensure that it is
virus free and ICF (Australia) Pty Ltd does not accept any responsibility for
any loss or damage arising in any way from its use. We maintain a database of
clients' contact details. If you do not wish to receive electronic messages from
us in future please email icfteam@icfrith.com.au. Finally, you should be aware
ICF (Australia) Pty Ltd reserves the right
and intends to intercept and monitor incoming and outgoing e-mail
correspondence, so you should not expect any e-mail communication to be private
in nature. ICF (Australia) Pty Ltd ABN 75 115 419 853
AFSL No:291260