From djb|rke @end|ng |rom berke|ey@edu  Thu Jun 20 02:24:38 2019
From: djb|rke @end|ng |rom berke|ey@edu (David J. Birke)
Date: Wed, 19 Jun 2019 17:24:38 -0700
Subject: [Rd] base::format adds extraneous whitespace for some inputs
Message-ID: <13ea45cb-564b-8bd5-b75f-5c2ef53119dc@berkeley.edu>

Dear R Core Team,

First of all, thank you for your amazing work on developing and 
maintaining this wonderful language.

I just stumbled upon the following behavior in R version 3.6.0:

format(9.91, digits = 2, nsmall = 2)
format(9.99, digits = 2, nsmall = 2)

yield "9.91" and " 9.99" with an extraneous whitespace.

My expected output for the second command is "9.99".

I have not found anything explaining the whitespace in the help files. 
Therefore, I am writing to report this behavior as a possible bug.

Best wishes,
David



[Rd] base::format adds extraneous whitespace for some inputs
David J. Birke