[R] blank space escape sequence in R?

Matt Shotwell matt at biostatmatt.com
Mon Apr 25 19:24:46 CEST 2011


You can embed hex escapes in strings (except \x00). The value(s) that
you embed will depend on the character encoding used on you platform. If
this is UTF-8, or some other ASCII compatible encoding, \x20 will work:

> "foo\x20bar"
[1] "foo bar"
>

For other locales, you might try charToRaw(" ") to see the binary (hex)
representation for the space character on your platform, and substitute
this sequence instead.

On Mon, 2011-04-25 at 15:01 +0200, Mark Heckmann wrote:
> Is there a blank space escape sequence in R, i.e. something like \sp etc. to produce a blank space?
> 
> TIA
> Mark
> –––––––––––––––––––––––––––––––––––––––
> Mark Heckmann
> Blog: www.markheckmann.de
> R-Blog: http://ryouready.wordpress.com
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list