[ESS] Print spark histograms from skimr package in Emacs ESS on Windows

Vitalie Spinu @p|nuv|t @end|ng |rom gm@||@com
Wed Jan 24 16:17:34 CET 2018


Ok, I see. This is linux but I recall (from many years ago when I worked on
Windows) being able to fix such issues by explicitly specifying the codding
system of the process.

I still have this line commented out in my init file:

 (set-buffer-process-coding-system 'windows-1252 'windows-1252)

Try 'utf-8 or variants displayed by M-x list-coding-systems. If this works, you
can either set in ess-R-post-run-hook or in process-coding-system-alist.

I cannot investigate this further on Windows at the moment, sorry.

 Vitalie



>> On Wed, Jan 24 2018 09:50, Ista Zahn wrote:

> On Wed, Jan 24, 2018 at 8:54 AM, Vitalie Spinu <spinuvit using gmail.com> wrote:
>>
>>
>> Hi Vinh,
>>
>> It works for me out of the box, no need for Chinese locale or R specific tricks:

> Just to clarify -- it works for you _on Windows_? For me it works on
> Linux but _not_ on Windows. And "out of the box" means starting with

> runemacs.exe -q

> followed by

> (package-initialize)
> (require 'ess-site)

> ?

> For me R only displays a subset of characters correctly. For example,
> "\U00B5" displays correctly but "\U4E02" does not. Both characters
> display correctly when inserted with "insert-char", so this is not a
> font problem.

> The attached screen shot shows the behavior I observe in Emacs 25.3 on
> Windows starting from "runemacs.exe -q" (left) and when running
> "runemacs.exe" and using my usual configuration. The behavior is
> different, but in neither case is the 丂 character displayed correctly.

> Best,
> Ista
>>
>>
>>    Variable type: numeric
>>         variable missing complete   n mean   sd  p0 p25 median p75 p100     hist
>>     Petal.Length       0      150 150 3.76 1.77 1   1.6   4.35 5.1  6.9 ▇▁▁▂▅▅▃▁
>>      Petal.Width       0      150 150 1.2  0.76 0.1 0.3   1.3  1.8  2.5 ▇▁▁▅▃▃▂▂
>>     Sepal.Length       0      150 150 5.84 0.83 4.3 5.1   5.8  6.4  7.9 ▂▇▅▇▆▅▂▂
>>      Sepal.Width       0      150 150 3.06 0.44 2   2.8   3    3.3  4.4 ▁▂▅▇▃▂▁▁
>>
>> My bet is that it's your emacs font which doesn't recognize those Unicode
>> characters.

>>
>> In my experience DejaVu is among the most complete fonts so I do this in my .emacs:
>>
>>   (set-face-font 'default  "DejaVu Sans Mono-9.5")
>>
>> You can see all fonts on your machine with by calling (font-family-list).
>>
>> HTH,
>>
>>   Vitalie
>>
>>
>>>> On Tue, Jan 23 2018 17:35, Vinh Nguyen wrote:
>>
>>> Hi everyone,
>>
>>> Was curious if anyone was able to print spark histograms from the
>>> skimr in the text console of Emacs ESS?  Tried setting to Chinese
>>> locale, playing around with environment variables, but can't get
>>> things to print as described here:
>>> https://github.com/ropenscilabs/skimr/issues/246>
>>> I'm able to print on the regular R console by setting to the Chinese
>>> locale and using the NSimSun font as described here
>>> (https://stackoverflow.com/questions/44253848/skimr-cant-seem-to-produce-the-histograms),but no luck on the Emacs ESS side.
>>
>>> Curious if others have gotten this to work.  Thanks!
>>> -- Vinh
>>
>>> ______________________________________________
>>> ESS-help using r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/ess-help>
>> ______________________________________________
>> ESS-help using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help




More information about the ESS-help mailing list