Re: [R] convert decimals to fractions - sorted

From: JeeBee <JeeBee_at_troefpunt.nl>
Date: Wed 26 Jul 2006 - 19:43:23 EST

Hi Muhammad,

How about this?

at <- read.table(textConnection(a))
at2 <- cbind(at, jeebee=as.character(as.fractions(as.numeric(at[,2]))))

sort.order <- order(at2$V2)

at2[sort.order,]
at2[sort.order,c(1,3)]

JeeBee.



R-help@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 and provide commented, minimal, self-contained, reproducible code. Received on Wed Jul 26 19:53:36 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 26 Jul 2006 - 23:03:43 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.