Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

sqldf

I'm using RStudio to run some data analysis and would like to use the package sqldf. Once I require the package, I get the output bellow:

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

My sessionInfo() is as follows:

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

Also,

capabilities()['tcltk']
tcltk
TRUE

How can I solve this?

like image 737
Synue Cunioci Avatar asked Dec 04 '25 10:12

Synue Cunioci


1 Answers

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/).

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

and get the tcltk-*.pkg from there. After installing the package, it won't appear any warnings when you load the sqldf library.

like image 196
silviacamplani Avatar answered Dec 07 '25 07:12

silviacamplani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!