1

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.

dww
  • 30,425
  • 5
  • 68
  • 111
Bazman
  • 2,058
  • 9
  • 45
  • 65
  • 1
    does `sudo apt-get install r-cran-tcltk2` help? – dww Jan 06 '19 at 21:33
  • I now have the most up to date version but the bug persists. I am using Anaconda if that makes any difference? – Bazman Jan 07 '19 at 10:16
  • 1
    Very likely related to anaconda. Added tag.This may be relevant: github.com/ContinuumIO/anaconda-issues/issues/1688 – dww Jan 07 '19 at 11:17

0 Answers0