Re: [R] Ploting two datasets

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Thu 25 May 2006 - 16:16:03 EST


Hi

On 25 May 2006 at 0:25, Anderson de Rezende Rocha wrote:

Date sent:      	Thu, 25 May 2006 00:25:46 -0300 (ART)
From:           	Anderson de Rezende Rocha <phiberoptic_br@yahoo.com.br>
To:             	r-help@stat.math.ethz.ch
Subject:        	[R] Ploting two datasets

> Dears,
>
> I need your help. I have two sets A and B each one containing
> n lines and being composed by the atributes x and y.

Well do you really mean attributes? Maybe they are data frames.

>
> Three questions:
> 1) How can I plot A and B both on the same graphic? I need to show
> that the classes A and B are separable. In this way, I need
> to plot the points of A as "*", and the points of B as "+", for
> example. This would result two clouds.

A<-data.frame(x=1:10, y=rnorm(10)
B<-data.frame(x=1:10, y=rnorm(10)*10

plot(A$x, A$y, ylim=range(A$y, B$y), pch=8) points(B$x, B$y, ylim=range(A$y, B$y), pch=3)

or maybe you could use Rgobi (Ggobi).

>
> 2) How can I plot the result of question one using multi-levels, that
> is, a set of ellipsis that start on the mean of A and on the
> mean of B?

see package elipse or make your own function which takes means and draws an ellipse with some setted axes

>
> 3) How can I trace an hiperplane separating the classes A and B just
> depicted in question 1?
>
> I appreciate any help. Thanks for all.
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal@precheza.cz



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 25 16:26:59 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 25 May 2006 - 18:10:32 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.