Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not load package tcltk in R [duplicate]

Tags:

r

I am trying to do multiple imputation in R and have installed Amelia and tried to open AmeliaView but it said require tcltk package. I proceeded to install tcltk but error message pop out as follows. Could someone help me?

> AmeliaView()
Loading required package: tcltk
Loading Tcl/Tk interface ... Error : .onLoad failed in loadNamespace() for 'tcltk', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so':
  dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.5.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so
  Reason: image not found
Error in AmeliaView() : The package 'tcltk' is required

> require(tcltk2)
Loading required package: tcltk2
Loading required package: tcltk
Loading Tcl/Tk interface ... Error : .onLoad failed in loadNamespace() for 'tcltk', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so':
  dlopen(/Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.5.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/2.12/Resources/library/tcltk/libs/i386/tcltk.so
  Reason: image not found
Failed with error:  ‘package 'tcltk' could not be loaded’
like image 574
Lily Avatar asked Apr 06 '11 13:04

Lily


1 Answers

This might be useful for those having the same issue on Linux (long discussion, skip to the end to get the final solution):

http://r.789695.n4.nabble.com/Where-is-the-tcltk-package-td3434915.html

like image 154
harkmug Avatar answered Nov 30 '22 19:11

harkmug