plot graph by first letter

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

plot graph by first letter

imnew
Hi all, may i know is it possible to plot a graph by first letter?
for example:

Name:                      Age:
Angel                        20
Amelia                      20
Bernard                   19
Stephanie               20
Vanessa                   22
Angeline                  23
Camel                       21

If I want to plot the name started with letter 'A' and their Angel, how is it possible to plot it?
Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: plot graph by first letter

Sarah Goslee
This looks a bit like homework, and makes no attempt whatsoever to follow
the posting guide or present previous work. But still, I'd start with
?grepl, and move on to use rseek.org to look for functions for whatever
kind of plot you need to make. The R Graph Gallery is also a good resource.
And even ?plot might be helpful, though I know it's boring to have to read
the help files yourself.

Sarah

On Thursday, July 12, 2012, imnew wrote:

> Hi all, may i know is it possible to plot a graph by first letter?
> for example:
>
> Name:                      Age:
> Angel                        20
> Amelia                      20
> Bernard                   19
> Stephanie               20
> Vanessa                   22
> Angeline                  23
> Camel                       21
>
> If I want to plot the name started with letter 'A' and their Angel, how is
> it possible to plot it?
> Thanks.
>


--
Sarah Goslee
http://www.stringpage.com
http://www.sarahgoslee.com
http://www.functionaldiversity.org

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: plot graph by first letter

John Kane
In reply to this post by imnew
I really am not sure of the question but perhaps ?order for a start?

John Kane
Kingston ON Canada


> -----Original Message-----
> From: [hidden email]
> Sent: Thu, 12 Jul 2012 01:15:26 -0700 (PDT)
> To: [hidden email]
> Subject: [R] plot graph by first letter
>
> Hi all, may i know is it possible to plot a graph by first letter?
> for example:
>
> Name:                      Age:
> Angel                        20
> Amelia                      20
> Bernard                   19
> Stephanie               20
> Vanessa                   22
> Angeline                  23
> Camel                       21
>
> If I want to plot the name started with letter 'A' and their Angel, how
> is
> it possible to plot it?
> Thanks.
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/plot-graph-by-first-letter-tp4636266.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: plot graph by first letter

arun kirshna
In reply to this post by imnew
Hi,

Try this:
dat1<-read.table(text="
 Name                      Age
 Angel                        20
 Amelia                      20
 Bernard                  19
 Stephanie              20
 Vanessa                  22
 Angeline                  23
 Camel                      21
 ",sep="",header=TRUE)
 dat2<-dat1[grepl("[A].*",dat1$Name),]
 dat2
      Name Age
1    Angel  20
2   Amelia  20
6 Angeline  23

rownames(dat2)<-1:nrow(dat2)
#Now you might be okay to plot.

?plot()
A.K.



----- Original Message -----
From: imnew <[hidden email]>
To: [hidden email]
Cc:
Sent: Thursday, July 12, 2012 4:15 AM
Subject: [R] plot graph by first letter

Hi all, may i know is it possible to plot a graph by first letter?
for example:

Name:                      Age:
Angel                        20
Amelia                      20
Bernard                   19
Stephanie               20
Vanessa                   22
Angeline                  23
Camel                       21

If I want to plot the name started with letter 'A' and their Angel, how is
it possible to plot it?
Thanks.

--
View this message in context: http://r.789695.n4.nabble.com/plot-graph-by-first-letter-tp4636266.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.


______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

RE: plot graph by first letter

imnew
Hi, for my dataset is actually retrieve from a access file not a textfile.
thanks


Date: Thu, 12 Jul 2012 11:58:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: plot graph by first letter

Hi,

Try this:
dat1<-read.table(text="
 Name                      Age
 Angel                        20
 Amelia                      20
 Bernard                  19
 Stephanie              20
 Vanessa                  22
 Angeline                  23
 Camel                      21
 ",sep="",header=TRUE)
 dat2<-dat1[grepl("[A].*",dat1$Name),]
 dat2
      Name Age
1    Angel  20
2   Amelia  20
6 Angeline  23

rownames(dat2)<-1:nrow(dat2)
#Now you might be okay to plot.

?plot()
A.K.



----- Original Message -----
From: imnew <[hidden email]>
To: [hidden email]
Cc:
Sent: Thursday, July 12, 2012 4:15 AM
Subject: [R] plot graph by first letter

Hi all, may i know is it possible to plot a graph by first letter?
for example:

Name:                      Age:
Angel                        20
Amelia                      20
Bernard                   19
Stephanie               20
Vanessa                   22
Angeline                  23
Camel                       21

If I want to plot the name started with letter 'A' and their Angel, how is
it possible to plot it?
Thanks.

--
View this message in context: http://r.789695.n4.nabble.com/plot-graph-by-first-letter-tp4636266.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] 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.


______________________________________________
[hidden email] 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.



If you reply to this email, your message will be added to the discussion below:
http://r.789695.n4.nabble.com/plot-graph-by-first-letter-tp4636266p4636343.html
To unsubscribe from plot graph by first letter, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: plot graph by first letter

arun kirshna


Hello,

This information is new.  Are you able to import data from access?

A.K.

----- Original Message -----
From: imnew <[hidden email]>
To: [hidden email]
Cc:
Sent: Thursday, July 12, 2012 9:52 PM
Subject: Re: [R] plot graph by first letter


Hi, for my dataset is actually retrieve from a access file not a textfile.thanks

Date: Thu, 12 Jul 2012 11:58:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: plot graph by first letter



    Hi,


Try this:

dat1<-read.table(text="

Name                      Age

Angel                        20

Amelia                      20

Bernard                  19

Stephanie              20

Vanessa                  22

Angeline                  23

Camel                      21

",sep="",header=TRUE)

dat2<-dat1[grepl("[A].*",dat1$Name),]

dat2

      Name Age

1    Angel  20

2   Amelia  20

6 Angeline  23


rownames(dat2)<-1:nrow(dat2)

#Now you might be okay to plot.


?plot()

A.K.




----- Original Message -----

From: imnew <[hidden email]>

To: [hidden email]

Cc:

Sent: Thursday, July 12, 2012 4:15 AM

Subject: [R] plot graph by first letter


Hi all, may i know is it possible to plot a graph by first letter?

for example:


Name:                      Age:

Angel                        20

Amelia                      20

Bernard                   19

Stephanie               20

Vanessa                   22

Angeline                  23

Camel                       21


If I want to plot the name started with letter 'A' and their Angel, how is

it possible to plot it?

Thanks.


--

View this message in context: http://r.789695.n4.nabble.com/plot-graph-by-first-letter-tp4636266.html
Sent from the R help mailing list archive at Nabble.com.


______________________________________________

[hidden email] 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.



______________________________________________

[hidden email] 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.


   
   

   

   
   
        If you reply to this email, your message will be added to the discussion below:
        http://r.789695.n4.nabble.com/plot-graph-by-first-letter-tp4636266p4636343.html
   
   
       
        To unsubscribe from plot graph by first letter, click here.

        NAML
                              

--
View this message in context: http://r.789695.n4.nabble.com/plot-graph-by-first-letter-tp4636266p4636383.html
Sent from the R help mailing list archive at Nabble.com.
    [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.


______________________________________________
[hidden email] 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.