Converting a number to a string is easy. In many cases, you don’t even need to call the converting functions explicitly. However, when it comes to sophisticatedly control the output, you may find as.character() is not enough and sprintf() is the cure. I’ll give some real world use cases to demostrate. Case 1: Always display 2 digits for a number For example, if the investment return in a report displays 1%, it’s natural to ask whether the real number is …