Re: [R] String manipulation and formatting

From: Bashir Saghir (Aztek Global) <>
Date: Tue 18 Jul 2006 - 00:53:32 EST

THANKS! Exactly what I needed.

-----Original Message-----
From: Richard M. Heiberger [] Sent: Monday, July 17, 2006 16:42
To: Bashir Saghir (Aztek Global); '' Subject: Re: [R] String manipulation and formatting

xify <- function(number) {
  fn <- format(number)
  fn3 <- unlist(strsplit(fn, "\\."))
  if (length(fn3) == 1) paste(rep("X", as.numeric(fn3)), collapse="")   else
  paste(paste(rep("X", as.numeric(fn3)[1]-as.numeric(fn3)[2]), collapse=""),

        paste(rep("X", as.numeric(fn3)[2]), collapse=""),


Legal Notice: This electronic mail and its attachments are i...{{dropped}} mailing list PLEASE do read the posting guide! Received on Tue Jul 18 01:09:38 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 Tue 18 Jul 2006 - 02:19:44 EST.

Mailing list information is available at Please read the posting guide before posting to the list.