Can not load package tcltk in R [duplicate]
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 ... Erro开发者_Python百科r : .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’
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
If your version of R > 3.0 then Tck/Tk 8.6.0 come bundles with it. You should be ok deleting it
See: http://cran.us.r-project.org/bin/macosx/tools/
精彩评论