I'm pretty new to R in Ubuntu.
I am running R (3.5.0) in Rstudio 1.1.456 through Anaconda.
The operating system is Ubuntu 18.04.
In R studio I select the package Rcmdr:
> library("Rcmdr", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: carData
Loading required package: sandwich
Loading required package: effects
lattice theme set by effectsTheme()
See ?effectsTheme for details.
Error: package or namespace load failed for ‘Rcmdr’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Can't find a usable init.tcl in the following directories:
/builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library
This probably means that Tcl wasn't installed properly.
I then tried package tcltk by itself:
> library("tcltk", lib.loc="~/anaconda3/envs/rstudio/lib/R/library")
Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Can't find a usable init.tcl in the following directories:
/builddir/vendor/build/lib/tcl8.6 ./lib/tcl8.6 ./lib/tcl8.6 ./library ./library ./tcl8.6.5/library ./tcl8.6.5/library
This probably means that Tcl wasn't installed properly.
Following the question here:
Error ".onLoad failed in loadNamespace() for 'tcltk'"
> capabilities("tcltk")
tcltk
TRUE
Unfortunately the solution above only deals with the case where capabilities("tcltk") comes back with FALSE so I'm stuck at this point!
Also the package tk is showing as installed already in line with the suggestion by J_F in the comments to the original question:
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
Can someone please tell me how to resolve this.