Re: [R] blank space escape sequence in R?

From: Matt Shotwell <matt_at_biostatmatt.com>
Date: Mon, 25 Apr 2011 12:24:46 -0500

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.



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. Received on Mon 25 Apr 2011 - 17:26:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 25 Apr 2011 - 18:00:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive