Skip to content

how to sort and plot data?

7 messages · Hemavathi Ramulu, Dieter Menne, Umesh Srinivasan +3 more

#
Hem wrote:
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
2 days later
#
Try looking at the examples in :
?order

perhaps:

dta.frm[order(user_id), ]


   .... especially the one that demonstrates how to sort dataframes  
with three indices. And if that does not satisfy your needs, then you  
absolutely must provide a simple example and an explicit layout of  
what the output should look like.
#
Hi

r-help-bounces at r-project.org napsal dne 06.04.2009 05:01:56:
sorted
another
can
If you want to sort and filter like in excel why not using excel

rowSums(table(test$user_id, test$website))

gives you info how many of websites were visited by each user_id. It is 
not clear how days are coded so it is difficult to come with any 
reasonable way how to compute numbers per day.

I would try to split/lapply way but there could be better means.

Regards
Petr
<umesh.srinivasan at gmail.com
know
user
this
not
http://www.nabble.com/how-to-sort-and-plot-data--tp22861661p22863918.html
http://www.R-project.org/posting-guide.html