Skip to content
Prev 32213 / 63424 Next

type.convert (PR#13646)

In the NA cases, storage.mode(..) - and also typeof(..) and class(..) - 
returns "logical", whereas in the other cases I get "integer" 
(and class "factor").

charToRaw(..) returns a7, as you suspected.

-----Urspr?ngliche Nachricht-----
Von: Peter Dalgaard [mailto:p.dalgaard at biostat.ku.dk] 
Gesendet: Freitag, 10. April 2009 11:03
An: Raberger, Stefan
Cc: r-devel at stat.math.ethz.ch; R-bugs at r-project.org
Betreff: Re: AW: [Rd] type.convert (PR#13646)
Raberger, Stefan wrote:
I saw it correctly. It's "\302\247" in UTF8 locales, which is of course 
the reason I suspected locale settings, but I can't seem to trigger the 
NA behaviour.

I'm at a loss here, but some ideas:

In the cases where it returns NA, what type is it? (I.e. 
storage.mode(type.convert(....)))

What do you get from

 > charToRaw("?")
[1] c2 a7

(a7, presumably, but better check).

-p