Skip to content
Back to formatted view

Raw Message

Message-ID: <438EA841.5010308@statistik.uni-dortmund.de>
Date: 2005-12-01T07:37:37Z
From: Uwe Ligges
Subject: about sorting table
In-Reply-To: <IQS3EF$E9EE818DDB470875CF259FC884ACB168@oreka.com>

herodote at oreka.com wrote:

> hi all,
> 
> I load a table with headers that enable me to acces it by the column names:
> 
> tab<-read.table("blob/data.dat",h=T)
> attach(tab)
> 
> everythings are OK, but i try to sort this table against one of his column like this:
> 
> tab<-tab[order(tab$IndexUI),];
> 
> It is still ok, the table is sorted, if i type "tab" i see a sorted table.
> 
> but, when i call the column by their names, it appears that the column isn't sorted...
> 
> I believe that, is there a solution to attach column names another time, to reflect the effect of sorting this table?
> 
> thks all for your answers


see ?colnames

Uwe Ligges


> guillaume.
> 
> ______________________________________________
> R-help at 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