Skip to content

character set problem

5 messages · Kevin Ushey, Bert Gunter, bretschr

#
Dear R-users,


Last week I installed R 3.5.2 on a new MacBook Air.

I got error messages for the wrong locale (character set).
And simple math proved not to work:
Upon typing this, I got:
Error: unexpected input in "2?"
The character visible as a caret is apparently coded as something very different.

Then I changed things according to the FAQ, chapter 7, (switching all settings to English),
and executed the recommended line:

defaults write org.R-project.R force.LANG en_US.UTF-8

The error messages disappeared, but the problem remained.

A fresh install of R 3.5.2 also didn't help: 

Here its startup messages, then a line testing the caret:
Does anyone know how to get R (R.app) to interpret a caret as a caret?

Thanks in advance,



Franklin Bretschneider
Utrecht University
Utrecht, The Netherlands
#
If I understand correctly, the problem is that the character your keyboard
is inserting is not a regular caret (^, \u0053); rather, it's a 'modifier
character circumflex accent' (?, \u02c6).

How are you inserting the carat on your laptop? For what it's worth, I get
a 'regular' caret with Shift + 6, and that particular accent character with
Alt + I.
On Tue, Feb 19, 2019 at 10:40 AM bretschr <bretschr at xs4all.nl> wrote:

            

  
  
#
You might try posting this on r-sig-mac if you don't get resolution here.

-- Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Feb 19, 2019 at 10:55 AM bretschr <bretschr at xs4all.nl> wrote:

            

  
  
#
Oops, you already seem to have done this! My bad.

-- Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Feb 19, 2019 at 11:36 AM Bert Gunter <bgunter.4567 at gmail.com> wrote:

            

  
  
#
Dear Kevin Ushey,

Re:
Thanks.  Indeed I just type the normal shift-6, and get this strange circumflex character. With alt-i I get this same character.

I can produce a normal caret by typing 

rawToChar(as.raw(94))

in the console, but that's of course rather clumsy.

How to "tame" the editor to produce the normal ASCII caret?
The other symbols in that row, like % and &, are the normal ASCII characters.
Strange why this single character on my keyboard is a two-byte character.

Any clue appreciated.


Franklin




Franklin Bretschneider
Utrecht University
Utrecht, The Netherlands