Skip to content
Back to formatted view

Raw Message

Message-ID: <200411081752.iA8Hqssr004293@erdos.math.unb.ca>
Date: 2004-11-08T17:52:54Z
From: Rolf Turner
Subject: misleading output after ordering data frame

You wrote:

> Is there a way to update the row numbers as well? It's not that
> important, but I find it a bit confusing.

	They're not actually row numbers, they're row ***names***.
	These default to row numbers.
	
	If they were real-live names you'd want them to be carried
	along in the sort.

	To re-set them to be what you want:

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


				cheers,

					Rolf Turner
					rolf at math.unb.ca