Message-ID: <8A97BD45-277A-47BD-9E1C-62A1D5E3626F@comcast.net>
Date: 2011-11-16T14:35:52Z
From: David Winsemius
Subject: Numerical Format on axis
In-Reply-To: <1321447266.93217.YahooMailNeo@web29803.mail.ird.yahoo.com>
On Nov 16, 2011, at 7:41 AM, Mario Giesel wrote:
> Hello, list,
>
> I'm new to R and I'm trying to produce a chart with currency values
> on the y axis.
> Values should be e.g. 1,00, 1,50, 2,00, etc.
> In fact they are 1,0, 1,5, 2,0, etc.
> How do I get R to show two digits after the comma on that axis?
?sprintf
?format
On the left (geographic) side of the Atlantic, it might be:
> sprintf("%1.2f", 1)
[1] "1.00"
I assume that your system is set up with different options() and that
your punkts are going to be handle to your liking by sprintf.
--
David Winsemius, MD
West Hartford, CT