Description Usage Arguments Examples
The rprintn
function applies number-based formatter to
transform the given character vector to specific texts with
numbers replaced by a given set of values in correct
formats.
1 |
x |
The character vector or list to be transformed |
... |
The arguments that specify the set of values to be placed |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# Format a single-entry character vector with numbering mechanism
rprintf('Hello, {1}', 'world')
rprintf('{1} ({2} years old)','Ken',24)
rprintf('He is {1} but has a height of {2:.2f}cm',18,190)
rprintf('{1}, {2:.1f}, {3:+.2f}, {2}, {1:.0f}',1.56,2.34,3.78)
rprintf('{2},{1}','x','y')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.