THANKS! Exactly what I needed.
Saghir

-----Original Message-----
From: Richard M. Heiberger [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 16:42
To: Bashir Saghir (Aztek Global); '[EMAIL PROTECTED]'
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=""),
        sep=".")
}


--------------------------------------------------------- 
Legal Notice: This electronic mail and its attachments are i...{{dropped}}

______________________________________________
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

Reply via email to