Skip to content

Using unicode symbol has unexpected results in levels of factor object

2 messages · Wyatt, Kristin M, Peter Dalgaard

#
On Aug 9, 2012, at 06:53 , Wyatt, Kristin M wrote:

            
For whatever it is worth, this works fine (both examples) under OSX Snow Leopard.

Looking at the code for print.factor, I would strongly suspect that the culprit is the line 

        n <- length(lev <- encodeString(levels(x), quote = ifelse(quote, 
            "\"", "")))

which figures since you are in a .1252 locale, not .utf8 (or UTF-8 or ...). 

Over to the Windows/locale/charset experts...