[ESS] unexpected character when evaling a region

Alex Branham @|ex@br@nh@m @end|ng |rom gm@||@com
Wed Oct 9 21:19:11 CEST 2019


On Wed 09 Oct 2019 at 15:19, Balint Tamasi via ESS-help <ess-help using r-project.org> wrote:

> I'm trying to set up ESS on a Linux laptop, which worked perfectly on my
> Macbook. When I work on a .R file and try to send code to a running R
> process with ess-eval-region in some cases whitespaces are substituted with
> '\302' which results in errors.
>
> For example if I type
>
> fit <- lm(dist ~ speed, data = cars)
>
> and hit C-c C-j, I get
>
>> fit <- lm(dist ~ speed, data = cars)
> Error: unexpected input in "fit <- lm(dist ~ speed, data =\302"
>
> But if I go back to the .R file, delete the space after the =, add it
> again, and evaluate the line (which is seemingly the same as in the
> previous case), the error goes away.
>
> Any suggestions or ideas are appreciated

\302 is a nonbreaking space, I think (this character: ). Did you
copy/paste that code from the internet? If so you might need to go
through and remove the UTF8 codes like that.

Alex



More information about the ESS-help mailing list