Skip to content
Back to formatted view

Raw Message

Message-ID: <21061E00-EF6C-419E-923C-0C302A8F40BD@exeter.ac.uk>
Date: 2009-04-02T09:30:00Z
From: Baptiste Auguie
Subject: how to sort and group the data?
In-Reply-To: <bd6c86ce0904020214g35ff4a77qcde281bfd705e945@mail.gmail.com>

try this,

d = read.table(textConnection("USER NAME
12     admin
12     admin
10     admin
10     advertising
61     process
17    snapshot
61    ticket
61    ticket
30    snapshot
10    advertising
10    advertising
10    advertising
10    advertising
"),head=T)

str(d) # note that NAME is a factor
library(ggplot2)

qplot(NAME,USER,data=d, geom="point")


baptiste

On 2 Apr 2009, at 10:14, Hemavathi Ramulu wrote:

> HI,
> I need help..
> How to sort and group the data below:-
> USER NAME
> 12     admin
> 12     admin
> 10     admin
> 10     advertising
> 61     process
> 17    snapshot
> 61    ticket
> 61    ticket
> 30    snapshot
> 10    advertising
> 10    advertising
> 10    advertising
> 10    advertising
>
> I want to plot graph using this data.
>
> thank you.
>
> regards,
> Hema.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.

_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag