On Tue, 30 Nov 2004, Kevin Brinkmann wrote:

Dear R List

I have a small problem concerning the output of print().

My version:

R.version
        _
platform i386-portbld-freebsd5.2
arch     i386
os       freebsd5.2
system   i386, freebsd5.2
status
major    1
minor    9.0
year     2004
month    04
day      12
language R

Consider this: I want to print a backslash with an exclamation mark. Here
is the output.

print( "\!" )
[1] "!"

Now I try it differently...

print( "\\!" )
[1] "\\!"

The output contains two backslashes. Why?

Because it is documented to escape backslashes: use cat() if that is not what you want.


--
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to