[R] Cannot get "==" operator to return TRUE

Petr Savicky savicky at cs.cas.cz
Fri Feb 3 17:33:50 CET 2012


On Fri, Feb 03, 2012 at 10:10:56AM -0600, G See wrote:
> Sorry, I meant
> Do you know of a way to print a string such that I can see whether it
> contains a *space* or a no-break space?

Hi.

For unknown characters, the following may be useful

  x <- "n/a "

  library(Unicode)
  u_char_inspect(as.u_char_seq(x, ""))

      Code                 Name Char
  1 U+006E LATIN SMALL LETTER N    n
  2 U+002F              SOLIDUS    /
  3 U+0061 LATIN SMALL LETTER A    a
  4 U+00A0       NO-BREAK SPACE     

Petr Savicky.



More information about the R-help mailing list