Skip to content
Back to formatted view

Raw Message

Message-ID: <e40d78ce0602241054g1c0b0c5bi839987c42aaaab02@mail.gmail.com>
Date: 2006-02-24T18:54:40Z
From: Mark
Subject: Sorting alphanumerically

I'm trying to sort a DATAFRAME by a column "ID" that contains
alphanumeric data. Specifically,"ID" contains integers all preceeded
by the character "g" as in:

g1, g6, g3, g19, g100, g2, g39

I am using the following code:

DATAFRAME=DATAFRAME[order(DATAFRAME1$ID),]

and was hoping it would sort the dataframe by ID in the following manner

g1, g2, g3, g6, g19, g39, g100

but it doesn't sort at all. Could anyone point out my mistake?

Thank you.

Mark