data.frame中的非ascii字符无法正确打印 [英] Non-ascii characters in data.frame do not print properly

查看:89
本文介绍了data.frame中的非ascii字符无法正确打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我注意到R不会在Windows上的data.frame中打印非ascii字符(例如日语)。正确打印字符向量,但它们不在data.frame中。我知道这是原R中的一个错误,但我希望Microsoft R能解决
这个问题。

 > c('あいうえお')
[1]"あいうえお" #OK
> data.frame(c('あいうえお'))
c ... U.3042..U.​​3044..U.3046..U.3048..U.304A ...
1 < U + 3042>< U + 3044>< U + 3046>< U + 3048>< U + 304A> #Wrong


由于这个问题,我鼓励我的学生目前使用Linux而不是Windows。但是,如果它更好地支持非ascii字符,我将告诉使用Windows的学生安装Microsoft R!












解决方案

你好,


我和Koheiw有同样的问题,但有中文字符。我想安装Linux,但我在公司笔记本电脑下工作,我必须使用Windows。 


如果有人可以提出一些替代方案,我将不胜感激,因为我不知道如何处理它。我目前唯一的选择是运行我的脚本,然后在Excel中运行vlookup ...............


谢谢,


 


Hi

I noticed that R does not print non-ascii characters (e.g. Japanese) in data.frame on Windows. Character vectors are printed properly, but they are not when they are in data.frame. I know that this is a bug in the original R, but I hope Microsoft R to fix this problem.

> c('あいうえお')
[1] "あいうえお" # OK
> data.frame(c('あいうえお'))
  c...U.3042..U.3044..U.3046..U.3048..U.304A...
1      <U+3042><U+3044><U+3046><U+3048><U+304A> # Wrong

Due to this problem, I encourage my students to use Linux instead of Windows at the moment. But, I will just tell students, who use Windows, to install Microsoft R if it supports non-ascii characters better!





解决方案

Hi there,

I have the same issue as Koheiw but with Chinese characters. I would like to install Linux but I am working under a corporate laptop and I have to use Windows. 

I would appreciate if someone can suggest some alternatives as I am not sure how to deal with this. My only option at the moment is running my script and later, vlookup in Excel...............

Thanks,

 


这篇关于data.frame中的非ascii字符无法正确打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆