[R] sorting a dataframe

Bogdan Tanasa tanasa at gmail.com
Sun Jun 21 03:33:25 CEST 2015


thank you all, it is working fine. happy weekend ;) !

On Sat, Jun 20, 2015 at 6:15 PM, David Winsemius <dwinsemius at comcast.net>
wrote:

>
> On Jun 20, 2015, at 5:18 PM, Bogdan Tanasa wrote:
>
> > Dear all,
> >
> > I am looking for a suggestion please regarding sorting a dataframe with
> > alphanumerical components :
> >
> > let's assume we have :
> >
> > A = c("A1","A10","A11","A2")
> > B = c(1,2,3,4)
> >
> > C = data.frame(A,B)
> >
> > how could I sort C data.frame in such a way that we have at the end :
> >
> > C$A in the order : "A1", "A2", "A10", "A11". thank you very much,
>
> Do a search on `mixedorder` and` mixedsort`. They are function names in
> pkg:gtools
>
> --
>
> David Winsemius
> Alameda, CA, USA
>
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list