Re: [R] overlap two graph

2009-08-10 Thread Hemavathi Ramulu
Hi everyone,
I'm stuck again, need you all help.

I managed to  plot the diagram using

allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha =
60))
plot(allPoints)

But now I want to have different color for each ellipsepoint(the diagram)
such as
ellipsePoints(2,5, alpha = 30) is red in color and ellipsePoints(2,5, alpha
= 60) is green in color.

I tried this

allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha =
60))
plot(allPoints, col=2)

This will has same color for all the points.

Help me.

Thanks alot.




On Thu, Aug 6, 2009 at 11:37 PM, Scott Sherrill-Mix <
shesc...@mail.med.upenn.edu> wrote:

> It really sounds like you want to use points(). Maybe I'm missing the
> true question but ellipsePoints returns a 2 column matrix of point
> coordinates so passing it's output to points() should plot those
> points on whatever plot you currently have open (in this case the plot
> of the previous ellipse). If you're looking for an alternative way to
> do it, you could rbind the outputs together and then plot the whole
> thing:
> allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha =
> 60))
> plot(allPoints)
>
> Scott
>
> Scott Sherrill-Mix
> Department of Microbiology
> University of Pennsylvania
> 402B Johnson Pavilion
> 3610 Hamilton Walk
> Philadelphia, PA  19104-6076
>
>
>
> On Thu, Aug 6, 2009 at 3:15 AM, Hemavathi Ramulu
> wrote:
> > Hi,
> > actually there are coding before
> > plot(ellipsePoints(2,5, alpha = 30), asp=1) which i got it from this
> website
> > http://www.biostat.wustl.edu/archives/html/s-news/2002-10/msg00186.html
> >
> > It only can draw one ellipse,
> > Now I want to know how to add more ellipse in same diagram?
> > thank you.
> > On Wed, Aug 5, 2009 at 9:53 PM, Scott Sherrill-Mix
> >  wrote:
> >>
> >> Did you try already try:
> >> plot(ellipsePoints(2,5, alpha = 30), asp=1)
> >> points(ellipsePoints(2,5, alpha = 60), asp=1,col='red')
> >> ?
> >>
> >> Scott
> >>
> >>
> >>
> >>
> >> Scott Sherrill-Mix
> >> Department of Microbiology
> >> University of Pennsylvania
> >> 402B Johnson Pavilion
> >> 3610 Hamilton Walk
> >> Philadelphia, PA  19104-6076
> >>
> >>
> >>
> >>
> >> On Wed, Aug 5, 2009 at 5:46 AM, Hemavathi Ramulu
> >> wrote:
> >> > Hi everyone,I need you all help.
> >> > I want to create few image in same diagram.
> >> >
> >> > For example, I wan draw two ellipse in same diagram.
> >> >
> >> >  plot(ellipsePoints(2,5, alpha = 60), asp=1)
> >> > and
> >> > plot(ellipsePoints(2,5, alpha = 30), asp=1)
> >> >
> >> > How to display both ellipse together? both is different in angle.
> >> >
> >> > Thank you.
> >> > --
> >> > Hemavathi Ramulu
> >> >
> >> >[[alternative HTML version deleted]]
> >> >
> >> > __
> >> > R-help@r-project.org mailing list
> >> > https://stat.ethz.ch/mailman/listinfo/r-help
> >> > PLEASE do read the posting guide
> >> > http://www.R-project.org/posting-guide.html
> >> > and provide commented, minimal, self-contained, reproducible code.
> >> >
> >
> >
> >
> > --
> > Hemavathi Ramulu
> >
>



-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] overlap two graph

2009-08-11 Thread Hemavathi Ramulu
thanks Zhiliang. It's helped me to go further on it.

On Tue, Aug 11, 2009 at 2:13 PM, Zhiliang Ma  wrote:

> plot(allPoints, col=c(rep(2,201), rep(3,201)))
>
> On Mon, Aug 10, 2009 at 9:54 PM, Hemavathi Ramulu
> wrote:
> > Hi everyone,
> > I'm stuck again, need you all help.
> >
> > I managed to  plot the diagram using
> >
> > allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha
> =
> > 60))
> > plot(allPoints)
> >
> > But now I want to have different color for each ellipsepoint(the diagram)
> > such as
> > ellipsePoints(2,5, alpha = 30) is red in color and ellipsePoints(2,5,
> alpha
> > = 60) is green in color.
> >
> > I tried this
> >
> > allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha
> =
> > 60))
> > plot(allPoints, col=2)
> >
> > This will has same color for all the points.
> >
> > Help me.
> >
> > Thanks alot.
> >
> >
> >
> >
> > On Thu, Aug 6, 2009 at 11:37 PM, Scott Sherrill-Mix <
> > shesc...@mail.med.upenn.edu> wrote:
> >
> >> It really sounds like you want to use points(). Maybe I'm missing the
> >> true question but ellipsePoints returns a 2 column matrix of point
> >> coordinates so passing it's output to points() should plot those
> >> points on whatever plot you currently have open (in this case the plot
> >> of the previous ellipse). If you're looking for an alternative way to
> >> do it, you could rbind the outputs together and then plot the whole
> >> thing:
> >> allPoints<-rbind(ellipsePoints(2,5, alpha = 30),ellipsePoints(2,5, alpha
> =
> >> 60))
> >> plot(allPoints)
> >>
> >> Scott
> >>
> >> Scott Sherrill-Mix
> >> Department of Microbiology
> >> University of Pennsylvania
> >> 402B Johnson Pavilion
> >> 3610 Hamilton Walk
> >> Philadelphia, PA  19104-6076
> >>
> >>
> >>
> >> On Thu, Aug 6, 2009 at 3:15 AM, Hemavathi Ramulu
> >> wrote:
> >> > Hi,
> >> > actually there are coding before
> >> > plot(ellipsePoints(2,5, alpha = 30), asp=1) which i got it from this
> >> website
> >> >
> http://www.biostat.wustl.edu/archives/html/s-news/2002-10/msg00186.html
> >> >
> >> > It only can draw one ellipse,
> >> > Now I want to know how to add more ellipse in same diagram?
> >> > thank you.
> >> > On Wed, Aug 5, 2009 at 9:53 PM, Scott Sherrill-Mix
> >> >  wrote:
> >> >>
> >> >> Did you try already try:
> >> >> plot(ellipsePoints(2,5, alpha = 30), asp=1)
> >> >> points(ellipsePoints(2,5, alpha = 60), asp=1,col='red')
> >> >> ?
> >> >>
> >> >> Scott
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Scott Sherrill-Mix
> >> >> Department of Microbiology
> >> >> University of Pennsylvania
> >> >> 402B Johnson Pavilion
> >> >> 3610 Hamilton Walk
> >> >> Philadelphia, PA  19104-6076
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Wed, Aug 5, 2009 at 5:46 AM, Hemavathi Ramulu<
> hema.ram...@gmail.com>
> >> >> wrote:
> >> >> > Hi everyone,I need you all help.
> >> >> > I want to create few image in same diagram.
> >> >> >
> >> >> > For example, I wan draw two ellipse in same diagram.
> >> >> >
> >> >> >  plot(ellipsePoints(2,5, alpha = 60), asp=1)
> >> >> > and
> >> >> > plot(ellipsePoints(2,5, alpha = 30), asp=1)
> >> >> >
> >> >> > How to display both ellipse together? both is different in angle.
> >> >> >
> >> >> > Thank you.
> >> >> > --
> >> >> > Hemavathi Ramulu
> >> >> >
> >> >> >[[alternative HTML version deleted]]
> >> >> >
> >> >> > __
> >> >> > R-help@r-project.org mailing list
> >> >> > https://stat.ethz.ch/mailman/listinfo/r-help
> >> >> > PLEASE do read the posting guide
> >> >> > http://www.R-project.org/posting-guide.html
> >> >> > and provide commented, minimal, self-contained, reproducible code.
> >> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Hemavathi Ramulu
> >> >
> >>
> >
> >
> >
> > --
> > Hemavathi Ramulu
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>



-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to draw pentagon?

2009-08-18 Thread Hemavathi Ramulu
Hi everyone,
I want you all help me to give an idea, how to draw pentagon with points?
Maybe can use function, but I'm stuck.

Yhank you.

-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to draw pentagon?

2009-08-21 Thread Hemavathi Ramulu
hi,
Thanks alot for the idea. I managed to draw few diagrams.

On Tue, Aug 18, 2009 at 9:02 PM, Petr PIKAL  wrote:

> Hi
>
> r-help-boun...@r-project.org napsal dne 18.08.2009 06:13:09:
>
> > Hi everyone,
> > I want you all help me to give an idea, how to draw pentagon with
> points?
> > Maybe can use function, but I'm stuck.
>
> Maybe. Maybe you can use a pencil, instead.
>
> Basically this
>
> plot(1:10, type="n")
> polygon(c(2,3,5,6,4), c(5,3,3,5,7))
> points(c(2,3,5,6,4), c(5,3,3,5,7))
>
> will draw one of infinite number of pentagons.
>
> If you can establish a function for drawing any pentagon in any display
> with any range it would be more complicated and you probably need to study
> ?grDevices and ?par more thoroughly
>
> Regards
> Petr
>
> >
> > Yhank you.
> >
> > --
> > Hemavathi Ramulu
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
>


-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to generate more triangles in sequences?

2009-08-23 Thread Hemavathi Ramulu
Hi everyone,
I want to plot some pattern. For example, I have some coding as below,

plot(0:11,type="n")
polygon(c(6,8,10), c(7,3,5),bor=6)
polygon(c(2,4,6), c(5,3,7),bor=6)
polygon(c(6,10,8), c(7,9,11),bor=6)
polygon(c(2,6,4), c(9,7,11),bor=6)

This coding will give me four triangles, but how to generate more triangles
in sequences so
that not need to mention the coordinate for each triangle?

Thank you.

-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to do rotation for polygon?

2009-09-02 Thread Hemavathi Ramulu
Hi everyone,
I have coding for repeating pentagon as below:

plot(0:11,type="n")
for (i in 1:10 )polygon(rep(c(4,5,7,8,6)), i*c(.5,.3,.3,.5,.7), bor=2)

which are increasing vertically.

Now, I want to know how to rotate the pentagon, so that I will get pattern
like flower.
Basicly, repeating pentagon in circle.

Thanks alot for helping me to solve this problem.
-- 
Hemavathi

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to do rotation for polygon?

2009-09-10 Thread Hemavathi Ramulu
Hi everyone,
I still couldn't get the diagram as I mentioned before. I try Grey and
Milton suggestion but
it confusing.
I hope anyone helped me.

Thanks in advance.

Regards,
Hema.

On Thu, Sep 3, 2009 at 11:39 PM, Greg Snow  wrote:

> The my.symbols and ms.polygon functions in the TeachingDemos package may
> help.
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.s...@imail.org
> 801.408.8111
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> > project.org] On Behalf Of Hemavathi Ramulu
> > Sent: Wednesday, September 02, 2009 11:05 PM
> > To: r-help@r-project.org
> > Subject: [R] How to do rotation for polygon?
> >
> > Hi everyone,
> > I have coding for repeating pentagon as below:
> >
> > plot(0:11,type="n")
> > for (i in 1:10 )polygon(rep(c(4,5,7,8,6)), i*c(.5,.3,.3,.5,.7), bor=2)
> >
> > which are increasing vertically.
> >
> > Now, I want to know how to rotate the pentagon, so that I will get
> > pattern
> > like flower.
> > Basicly, repeating pentagon in circle.
> >
> > Thanks alot for helping me to solve this problem.
> > --
> > Hemavathi
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-
> > guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>



-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to do rotation for polygon?

2009-09-17 Thread Hemavathi Ramulu
hi everyone,
Its really helped, it almost as what I wanted.

Thanks alot.

On Sat, Sep 12, 2009 at 4:30 AM, Greg Snow  wrote:

>  Does this do what you want?
>
>
>
> library(TeachingDemos)
>
> ms.pent <- function(ang=0,...) {
>
> theta <- seq(ang, length.out=6, by=2*pi/5)
>
> cbind( cumsum(cos(theta)/2), cumsum(sin(theta)/2) )
>
> }
>
>
>
> par(xpd=NA)
>
> my.symbols( rep(1,5), rep(1,5), ms.pent, ang=seq(0, by=2*pi/5,
> length.out=5),
>
> add=FALSE, col=2:6 )
>
>
>
>
>
> --
>
> Gregory (Greg) L. Snow Ph.D.
>
> Statistical Data Center
>
> Intermountain Healthcare
>
> greg.s...@imail.org
>
> 801.408.8111
>
>
>
> *From:* Hemavathi Ramulu [mailto:hema.ram...@gmail.com]
> *Sent:* Thursday, September 10, 2009 2:44 AM
> *To:* Greg Snow
> *Cc:* r-help@r-project.org
> *Subject:* Re: [R] How to do rotation for polygon?
>
>
>
> Hi everyone,
>
>
>
> I still couldn't get the diagram as I mentioned before. I try Grey and
> Milton suggestion but
>
> it confusing.
>
> I hope anyone helped me.
>
>
>
> Thanks in advance.
>
>
>
> Regards,
>
> Hema.
>
> On Thu, Sep 3, 2009 at 11:39 PM, Greg Snow  wrote:
>
> The my.symbols and ms.polygon functions in the TeachingDemos package may
> help.
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.s...@imail.org
> 801.408.8111
>
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> > project.org] On Behalf Of Hemavathi Ramulu
> > Sent: Wednesday, September 02, 2009 11:05 PM
> > To: r-help@r-project.org
> > Subject: [R] How to do rotation for polygon?
> >
> > Hi everyone,
> > I have coding for repeating pentagon as below:
> >
> > plot(0:11,type="n")
> > for (i in 1:10 )polygon(rep(c(4,5,7,8,6)), i*c(.5,.3,.3,.5,.7), bor=2)
> >
> > which are increasing vertically.
> >
> > Now, I want to know how to rotate the pentagon, so that I will get
> > pattern
> > like flower.
> > Basicly, repeating pentagon in circle.
> >
> > Thanks alot for helping me to solve this problem.
> > --
> > Hemavathi
> >
>
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-
> > guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
>
>
>
> --
> Hemavathi Ramulu
>



-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to separate the string?

2009-07-07 Thread Hemavathi Ramulu
Hi everyone,
Hi want to separate the string(column1) for example

column1 column2 column3 column4 column5 column6
bear   b   e a  r
cat c   a  t
tigert   i   g  e   r

I know how to do this in excel where using MID function.
Now I want to solve it using R. The list of strings is in text file. I
looked up the help but did not find it.
Can someone help me here?

Thank you very much.

Regards,
Hema

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to separate the string?

2009-07-07 Thread Hemavathi Ramulu
Hi Petr,
The data in text file and not csv format.
The word "separate " which I mean in this content is like split/separate the
string to each alphabet
where each alphabet will be in different column.

thanks alot.

regards,
Hema.

On Tue, Jul 7, 2009 at 4:12 PM, Petr PIKAL  wrote:

> Hi
>
> r-help-boun...@r-project.org napsal dne 07.07.2009 09:54:30:
>
> > Hi everyone,
> > Hi want to separate the string(column1) for example
>
> Well, how did you get the data in R? Are they in separated columns of
> data.frame? What do you mean by "separate"?
>
> >
> > column1 column2 column3 column4 column5 column6
> > bear   b   e a  r
> > cat c   a  t
> > tigert   i   g  e   r
> >
> > I know how to do this in excel where using MID function.
>
> As Microsoft is more user friendly and uses translated functions in
> language specific versions of Excel I do not have function MID. I suspect
> it takes values from middle of string set by some identifiers. If it is
> the case see
>
> ?substr
>
> However I would start with
>
> ?read.table
>
> and related read.* functions to get the data into R in appropriate shape.
>
> Regards
> Petr
>
>
> > Now I want to solve it using R. The list of strings is in text file. I
> > looked up the help but did not find it.
> > Can someone help me here?
> >
> > Thank you very much.
> >
> > Regards,
> > Hema
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to separate the string?

2009-07-08 Thread Hemavathi Ramulu
Hi everyone,
Thanks alot. Its work with help of you all.

regards,
Hema

On Tue, Jul 7, 2009 at 5:00 PM, Petr PIKAL  wrote:

> Hi
>
> If you have data frame like this
>
> test=data.frame(x=c("abcd", "abc", "abcde"))
> than
> strsplit(as.matrix(test), "")
>
> makes a list with splitted character vectors. If you want them in data
> frame you would need to combine vectors of unequal length.
>
> However I would try reading your text file with
>
> read.fwf(file, 1)
>
> Regards
> Petr
>
>
> Hemavathi Ramulu  napsal dne 07.07.2009 10:36:40:
>
> > Hi Petr,
> >
> > The data in text file and not csv format.
> > The word "separate " which I mean in this content is like split/separate
> the
> > string to each alphabet
> > where each alphabet will be in different column.
> >
> > thanks alot.
> >
> > regards,
> > Hema.
>
> > On Tue, Jul 7, 2009 at 4:12 PM, Petr PIKAL 
> wrote:
> > Hi
> >
> > r-help-boun...@r-project.org napsal dne 07.07.2009 09:54:30:
> >
> > > Hi everyone,
> > > Hi want to separate the string(column1) for example
>
> > Well, how did you get the data in R? Are they in separated columns of
> > data.frame? What do you mean by "separate"?
> >
> > >
> > > column1 column2 column3 column4 column5 column6
> > > bear   b   e a  r
> > > cat c   a  t
> > > tigert   i   g  e   r
> > >
> > > I know how to do this in excel where using MID function.
>
> > As Microsoft is more user friendly and uses translated functions in
> > language specific versions of Excel I do not have function MID. I
> suspect
> > it takes values from middle of string set by some identifiers. If it is
> > the case see
> >
> > ?substr
> >
> > However I would start with
> >
> > ?read.table
> >
> > and related read.* functions to get the data into R in appropriate
> shape.
> >
> > Regards
> > Petr
> >
> >
> > > Now I want to solve it using R. The list of strings is in text file. I
> > > looked up the help but did not find it.
> > > Can someone help me here?
> > >
> > > Thank you very much.
> > >
> > > Regards,
> > > Hema
> > >
> > >[[alternative HTML version deleted]]
> > >
> > > __
> > > R-help@r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > > and provide commented, minimal, self-contained, reproducible code.
>
> >
> >
> >
>
>


-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] overlap two graph

2009-08-05 Thread Hemavathi Ramulu
Hi everyone,I need you all help.
I want to create few image in same diagram.

For example, I wan draw two ellipse in same diagram.

 plot(ellipsePoints(2,5, alpha = 60), asp=1)
and
plot(ellipsePoints(2,5, alpha = 30), asp=1)

How to display both ellipse together? both is different in angle.

Thank you.
-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] overlap two graph

2009-08-06 Thread Hemavathi Ramulu
Hi, actually there are coding before
plot(ellipsePoints(2,5, alpha = 30), asp=1) which i got it from this website
http://www.biostat.wustl.edu/archives/html/s-news/2002-10/msg00186.html


It only can draw one ellipse,

Now I want to know how to add more ellipse in same diagram?

thank you.

On Wed, Aug 5, 2009 at 9:53 PM, Scott Sherrill-Mix <
shesc...@mail.med.upenn.edu> wrote:

> Did you try already try:
> plot(ellipsePoints(2,5, alpha = 30), asp=1)
> points(ellipsePoints(2,5, alpha = 60), asp=1,col='red')
> ?
>
> Scott
>
>
>
>
> Scott Sherrill-Mix
> Department of Microbiology
> University of Pennsylvania
> 402B Johnson Pavilion
> 3610 Hamilton Walk
> Philadelphia, PA  19104-6076
>
>
>
>
> On Wed, Aug 5, 2009 at 5:46 AM, Hemavathi Ramulu
> wrote:
> > Hi everyone,I need you all help.
> > I want to create few image in same diagram.
> >
> > For example, I wan draw two ellipse in same diagram.
> >
> >  plot(ellipsePoints(2,5, alpha = 60), asp=1)
> > and
> > plot(ellipsePoints(2,5, alpha = 30), asp=1)
> >
> > How to display both ellipse together? both is different in angle.
> >
> > Thank you.
> > --
> > Hemavathi Ramulu
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>



-- 
Hemavathi Ramulu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to sort and group the data?

2009-04-02 Thread Hemavathi Ramulu
HI,
I need help..
How to sort and group the data below:-
USER NAME
12 admin
12 admin
10 admin
10 advertising
61 process
17snapshot
61ticket
61ticket
30snapshot
10advertising
10advertising
10advertising
10advertising

I want to plot graph using this data.

thank you.

regards,
Hema.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to sort and plot data?

2009-04-02 Thread Hemavathi Ramulu
hi,
Previously my email very simple and less information. Let say I have raw
data as below:-

user_id  website  time
20google0930
21yahoo0935
20facebook1000
25facebook1015
61google0940
60yahoo1050
40friendster1115
61google1200
40friendster1215
25google1030
28youtube  0830
30facebook0945

This data described about particular website viewed by particular ID  in one
day.

My problem is how to sort the data? So that, I can get information about one
user_id viewed how many website perday?

secondly, I want to plotted above data where x-axis (user_id) and
y-axis(website).

Actually, im new to R-project and still in learning process. So, I really
want you all help.
Thank you and I really appreciate everyone feedback.

regards,
Hema.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to sort and plot data?

2009-04-05 Thread Hemavathi Ramulu
hi Erin,
Thanks for your reply to my problems. I tried and it works, but it sorted
all the column. In my case, I want it to sort d user_id column and  another
information in other column will follow it. Now, after I sorted, the
information which website viewed by user was wrong. I want to as how we can
sort or filter in excel.

Thank you.

regards,
hema

On Fri, Apr 3, 2009 at 4:44 PM, Umesh Srinivasan  wrote:

> Hi,
> There is definitely a more elegant way of doing this which I don't know
> about (without a for loop), but try this:
>
> mat <- matrix(NA, nrow = max(user_id), ncol = 2)
> mat[,1] <- 1:max(user_id) # 1st column of matrix is the user ID
>
> for (i in 1:max(user_id)){
> temp1 <- subset(data, user_id = i)
> temp2 <- unique(temp1$website)
> mat[2,i] <- length(temp2)
> }
>
> The matrix will give you user id and number of sites visited, provided user
> id ranges from 1 to the number of users. There must be a way to do this
> using table, but I cant figure it out.
>
> Cheers,
> Umesh
>
> On Fri, Apr 3, 2009 at 1:42 PM, Dieter Menne
> wrote:
>
> >
> >
> >
> > Hem wrote:
> > >
> > > user_id  website  time
> > > 20google0930
> > > 21yahoo0935
> > > 20facebook1000
> > > 25facebook1015
> > > 61google0940
> > > ...
> > > My problem is how to sort the data? So that, I can get information
> about
> > > one
> > > user_id viewed how many website perday?
> > >
> > >
> >
> > Maybe you were looking at the wrong item, because what you want is not
> > sorting, but a table.
> >
> > Check the documentation of table or ftable.
> >
> > Dieter
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/how-to-sort-and-plot-data--tp22861661p22863918.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.