Bogaso wrote: > > Vect <- c(12.234, 234.5675, 1.5) > Now I want a string vector like: > changedVec <- c("012.234", "234.568", "001.500") >
sprintf("%06.3f", c(12.234, 234.5675, 1.5)) Dieter -- View this message in context: http://r.789695.n4.nabble.com/From-numeric-vector-to-string-vector-tp3303712p3303730.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.