简体   繁体   English

R包sqldf没有加载tcltk并返回警告。 怎么解决?

[英]R package sqldf not loading tcltk and returning a warning. How to solve it?

I'm using RStudio to run some data analysis and would like to use the package sqldf. 我正在使用RStudio来运行一些数据分析,并希望使用sqldf包。 Once I require the package, I get the output bellow: 一旦我需要包,我得到输出:

Loading required package: sqldf 加载所需的包:sqldf
Loading required package: gsubfn 加载所需的包:gsubfn
Loading required package: proto 加载所需的包:proto
Could not load tcltk. 无法加载tcltk。 Will use slower R code instead. 将使用较慢的R代码。
Loading required package: RSQLite 加载所需的包:RSQLite
Warning message: 警告信息:
In doTryCatch(return(expr), name, parentenv, handler) : 在doTryCatch中(return(expr),name,parentenv,handler):

unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so': 无法加载共享对象'/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib dlopen(/ Library/Frameworks/R.framework/Resources/modules//R_X11.so,6):未加载库:/opt/X11/lib/libSM.6.dylib
Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so 参考自:/ Library / Frame / R.framework / Resources / modules // R_X11.so
Reason: image not found 原因:找不到图像

My sessionInfo() is as follows: 我的sessionInfo()如下:

R version 3.3.2 (2016-10-31) R版本3.3.2(2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit) 平台:x86_64-apple-darwin13.4.0(64位)
Running under: OS X El Capitan 10.11.6 运行于:OS X El Capitan 10.11.6

locale: 区域:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 [1] en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

attached base packages: 附加基础包:
[1] stats graphics grDevices utils datasets methods base [1] stats graphics grDevices utils数据集方法库

other attached packages: 其他附件包:
[1] sqldf_0.4-10 RSQLite_1.1-2 gsubfn_0.6-6 proto_1.0.0 [1] sqldf_0.4-10 RSQLite_1.1-2 gsubfn_0.6-6 proto_1.0.0

Also, 也,

capabilities()['tcltk'] 能力()[ 'tcltk']
tcltk tcltk
TRUE 真正

How can I solve this? 我怎么解决这个问题?

I don't know if you solved the problem but I'll write you the solution that worked for me (found here https://support.bioconductor.org/p/31750/ ). 我不知道你是否解决了这个问题,但我会给你写一个对我有用的解决方案(在这里找到https://support.bioconductor.org/p/31750/ )。

You need to go here http://cran.r-project.org/bin/macosx/tools/ 你需要去http://cran.r-project.org/bin/macosx/tools/

and get the tcltk-*.pkg from there. 从那里得到tcltk - * .pkg。 After installing the package, it won't appear any warnings when you load the sqldf library. 安装软件包后,加载sqldf库时不会出现任何警告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM