how to convert a function input to a string in r code example Example: R int to string str <- toString(num)