tcltk in portable R
Asked Answered
T

2

2

I am using portable R and I want to try the sqldf package a bit, I can load the sqldf package, but running a sql statement and gives me this message:

> sqldf("select * from BOD where Time > 4")
Loading required package: tcltk
Loading Tcl/Tk interface ...Error : .onLoad failed in loadNamespace() for 'tcltk', details:
  call: NULL
  error: Tcl/Tk support files were not installed
Error: require(tcltk) is not TRUE

I have looked for solutions but most of them suggest me to install R, which is not possible as I am using portable R.

What can I do? Thanks.

Tripper answered 16/8, 2011 at 7:17 Comment(2)
It seems that the tcltk package may be missing from your installation. The project page on Sourceforge that you link to contains hardly any information. I suggest you contact the software authors for help.Vassili
Run capabilities() inside a running R session. See if tcl-tk is supported with your build. If it isn't, speak to the Portable R people about getting it part of the package - it is generally expected that core and recommended packages are include in R distributions (but not enforced). If it is listed in capabailities, then something is not allowing sqldf to find the tcl-tk libraries/functions.Sternwheeler
T
5

install R 2.13.1 for Windows, copy ~/R-2.13.1/Tcl folder to ~\R-Portable\App\R-2.11.1 and ~/R-2.13.1/library/tcltk folder to ~/R-Portable/App/Data/library

I tried and it works.

Tripper answered 16/8, 2011 at 7:59 Comment(1)
This trick also works, when installing R from anaconda navigatorLowery
J
0

See sqldf FAQ #5

Johannesburg answered 16/8, 2011 at 9:54 Comment(2)
Make sure you are using the most recent version of R and all packages involved and exit R and re-start it. Also, what specifically did you try?Johannesburg
By the way, I noticed from your earlier response to yourself that you are using an old version of R and it may be that that old version of R is pulling in old versions of the packages involved so that may explain why you continue to have this problem.Johannesburg

© 2022 - 2024 — McMap. All rights reserved.