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

G See gsee000 at gmail.com
Fri Feb 3 18:03:38 CET 2012


On Fri, Feb 3, 2012 at 10:39 AM, peter dalgaard <pdalgd at gmail.com> wrote:
>
> So that's a nonbreak space alright. Next question: How did it get there? I'm mildly surprised that it crept into the data frame, I would expect it to happen much easier with things typed on the keyboard (Alt-Spc on my Mac keyboard, e.g.).
>

Peter,
I won't venture to guess how, but this will do it.

> library(XML)
> x <- readHTMLTable("http://earnings.com/company.asp?client=cb&ticker=GOOG", stringsAsFactors=FALSE)[[21]]
> charToRaw(x[28, 4])
[1] 6e 2f 61 c2 a0

Garrett



More information about the R-help mailing list