gpt4 book ai didi

R 包 sqldf 未加载 tcltk 并返回警告。如何解决?

转载 作者:行者123 更新时间:2023-12-04 11:04:07 24 4
gpt4 key购买 nike

我正在使用 RStudio 运行一些数据分析并想使用包 sqldf。一旦我需要这个包,我就会得到下面的输出:

Loading required package: sqldf
Loading required package: gsubfn
Loading required package: proto
Could not load tcltk. Will use slower R code instead.
Loading required package: RSQLite
Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :

unable to load shared object '/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
Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
Reason: image not found

我的 sessionInfo() 如下:

R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: 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

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] sqldf_0.4-10 RSQLite_1.1-2 gsubfn_0.6-6 proto_1.0.0

此外,

capabilities()['tcltk']
tcltk
TRUE

我该如何解决这个问题?

最佳答案

我不知道您是否解决了问题,但我会把对我有用的解决方案写给您(在此处找到 https://support.bioconductor.org/p/31750/)。

你需要去这里 http://cran.r-project.org/bin/macosx/tools/

并从那里获取 tcltk-*.pkg。安装包后,加载sqldf库时不会出现任何警告。

关于R 包 sqldf 未加载 tcltk 并返回警告。如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41615293/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com