R data.entry在OS X El Capitan上不起作用

R data.entry在OS X El Capitan上不起作用,r,macos,x11,R,Macos,X11,当我使用R语言时,我不能使用数据输入: $ R > cheese = c(1,2,3) > data.entry(cheese) error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: /usr/local/Cellar/r/3.2.2_1/R.framework/Resources/modules/R_d

当我使用R语言时,我不能使用数据输入:

$ R
> cheese = c(1,2,3)
> data.entry(cheese)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: /usr/local/Cellar/r/3.2.2_1/R.framework/Resources/modules/R_de.so (No such file or directory)
Error in dataentry(odata, as.list(Modes)) : X11 is not available
In addition: Warning message:
running command ''/usr/bin/otool' -L '/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/modules/R_de.so'' had status 1

但是我安装了X11、XQuartz 2.7.7。

要使用此功能,您需要X11支持。使用以下工具重新安装R:

brew reinstall r --with-x11

然后,它应该可以正常工作。

从RStudio安装“R”帮助我解决了这个问题。我使用brew安装了“R”,因此首先使用命令卸载了“R”-

Atuls MacBook Pro:~atulkaushik$r

然后从下载相应的软件包“R-x.y.z.pkg”。虽然这一步帮助我在终端上运行x11(),但我仍然无法使用此函数执行操作

m=矩阵(1:81,9,9) 数据输入(m) .External2中出错(C_数据项、数据、模式): 无法启动数据编辑器 此外:警告信息: 1:在数据条目(odata,as.list(Modes))中: Xlib不支持区域设置:某些X操作将在C区域设置中运行 2:在dataentry(odata,as.list(Modes))中:X无法设置区域设置修饰符 3:在数据输入(odata,as.list(Modes))中: 无法创建字体集--fixed-medium-r---120------

我没有通过命令'r'调用r shell,而是使用LC_CTYPE=cr命令

Atuls MacBook Pro:~atulkaushik$LC\u CTYPE=C R

现在,当我执行

数据输入(m)

系统将打开一个XQuartz窗口,如-


此文件是否存在/usr/local/ceral/r/3.2.2_1/r.framework/Resources/modules/r_de.soNo我不知道。我用自制软件安装了R。另一台使用相同程序的笔记本电脑也不起作用。