[R] Decimal places in a function output
murdoch.duncan at gmail.com
Wed Nov 10 16:58:13 CET 2010
On 10/11/2010 10:51 AM, Liliana Pacheco wrote:
> Hi R users
> I have a very simple function. As the return of that function I want the
> answer with 5 decimal places, but it hasn't worked with sprintf, nor with
> format, nor print. This is how I used sprintf:
> (SOME CALCULATIONS)
> d is a vector with the numbers I need, specially the last one.
> how can I get the resulting number of the function with a certain amount of
> decimal places?
What is wrong with the result from sprintf()?
More information about the R-help