Skip to content
Back to formatted view

Raw Message

Message-ID: <bcb171920602130601n4d3d20cfv21c38d9c927455da@mail.gmail.com>
Date: 2006-02-13T14:01:24Z
From: Vivek Satsangi
Subject: R-help, specifying the places to decimal

In addition to round() mentioned earlier, if you are merely looking to
*display* your results differently, you may want to check out the
digits option, e.g. in summary():

(This is the method signature for data.frame 's):

     summary(object, maxsum = 7,
            digits = max(3, getOption("digits")-3), ...)


(Begin quoted message)
>Date: Mon, 13 Feb 2006 14:03:55 +0530
>From: "Subhabrata" <subhabratapal at sraindia.com>
>Subject: [R] R-help, specifying the places to decimal
>To: "r-help" <r-help at stat.math.ethz.ch>
>Message-ID: <022f01c63078$3c09c5c0$f608a8c0 at srai37>
>Content-Type: text/plain;       charset="iso-8859-1"

>Hello - R-experts,


>Is there any way with which we can specify the number after
>decimal point to take. Like I have a situation where
>the values are comming 0.160325923 but I only want
>4 place to decimal say 0.1603. Is there any way for that.

>I am no expert in R- and this may sound simple to many.sorry


>Thanks for any help.

>With Regards

>Subhabrata

--
-- Vivek Satsangi
Student, Rochester, NY USA