[R] plot and subsets

Erich Neuwirth erich.neuwirth at univie.ac.at
Tue Nov 27 19:06:40 CET 2001


when i need to plot the same variables
(size and weight e.g.)
for different groups (male and female)
in one scatterplot,
i seem have to use plot() for the first group and
points() for the second group.

is there a plotting function somewhere which would use a factor variable
automatically to represent the different groups
by different symbols and/or colors.

i know it is not too difficult
to write such a function for oneself,
the question is if this should be part of a standard toolkit already.

or am i just plainly overlooking something which is already there.


by(data,factor,plot)

could be a "role model".
and this seems not to work.


 

--
Erich Neuwirth, Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-38624 Fax: +43-1-4277-9386
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list