inconsistencies between formatC(), format() and format.char()

Jens Oehlschlägel-Akiyoshi jens.oehlschlaegel-akiyoshi@mdfactory.de
Wed, 12 Jan 2000 18:05:37 +0100



Dear R-Developers,

Just a note: there are some inconsistencies between formatC(), format() and
format.char() and cross calling between these functions.
On the one hand

> cat(format('{"}'), "\n")
{\"}

> cat(format.char('{"}'), "\n")
{\"}

is by default format.char(, flag="-") and thus by default calling format()

> cat(format.char('{"}', flag="-"), "\n")
{\"}


On the other hand

> cat(formatC('{"}'), "\n")
{"}

which is calling format.char(, flag="")

> cat(format.char('{"}', flag=""), "\n")
{"}


also (for me) unexpected is

> format(" abc ", trim=T)
[1] " abc "


As an alternative see functions pad() and trim() from my other mailing ...
Regards


Jens Oehlschlägel-Akiyoshi


> version
         _
platform Windows
arch     x86
os       Win32
system   x86, Win32
status
major    0
minor    90.1
year     1999
month    December
day      15
language R


--
Dr. Jens Oehlschlägel-Akiyoshi
MD FACTORY GmbH
Bayerstrasse 21

80335 München

Tel.: 089 545 28-27
Fax.: 089 545 28-10
http://www.mdfactory.de

Standard Disclaimers: Opinions expressed here are personal
and are not otherwise represented.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._