hello,

Please help with using sprintf with character variables:
The following does not produce what i intended

foot=function(){
  str1=format(Sys.Date,"%Y%m%d")
  sprintf("99%-4s%s","nm",str1)
}

I wanted to have "99nm  20071002" as the output.

______________________________________________
R-help@r-project.org 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.

Reply via email to