Skip to content

displaying results

5 messages · deanj2k, stephen sefick, Simon Pickett +2 more

#
Read the posting guide please.  Self-contained, minimal, reproducible code.
On Fri, May 15, 2009 at 8:33 AM, deanj2k <dl120 at le.ac.uk> wrote:

  
    
#
Absolutely no idea what you mean,

Try reconstructing your question in concise English with reproducible code.

Simon.


----- Original Message ----- 
From: "deanj2k" <dl120 at le.ac.uk>
To: <r-help at r-project.org>
Sent: Friday, May 15, 2009 1:33 PM
Subject: [R] displaying results
#
On 5/15/2009 8:33 AM, deanj2k wrote:
I think you want something like this:

cat(sprintf("The mean age of patients within the sample is %.1f.\n", 
mean(age)))

Play with the %.1f format for more decimal places, etc.

Duncan Murdoch
#
Duncan Murdoch wrote:
or maybe

    cat(sprintf("The mean age of patients within the sample is %.1f.\n",
round(mean(age), 1)))
... and be aware of excel bugs.

vQ