Reputation: 28907
Everytime I use scatter3d, I include the following libraries:
library(rgl)
library(Rcmdr)
but when I load those libraries, I get the following message:
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading required package: car
Loading required package: MASS
Loading required package: nnet
Loading required package: survival
Loading required package: splines
Rcmdr Version 1.7-0
Attaching package: 'Rcmdr'
The following object(s) are masked from 'package:tcltk':
tclvalue
Warning message:
In fun(...) : Can't find a usable tk.tcl in the following directories:
/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tk8.5 /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tk8.5/Resources/Scripts /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5 /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tk8.5/Resources/Scripts ./lib/tk8.5 ./lib/tk8.5/Resources/Scripts ~/Library/Tcl/tk8.5 ~/Library/Tcl/tk8.5/Resources/Scripts /Library/Tcl/tk8.5 /Library/Tcl/tk8.5/Resources/Scripts /System/Library/Tcl/tk8.5 /System/Library/Tcl/tk8.5/Resources/Scripts /System/Library/Tcl/8.5/tk8.5 /System/Library/Tcl/8.5/tk8.5/Resources/Scripts ~/Library/Frameworks/tk8.5 ~/Library/Frameworks/tk8.5/Resources/Scripts /Library/Frameworks/tk8.5 /Library/Frameworks/tk8.5/Resources/Scripts /System/Library/Frameworks/tk8.5 /System/Library/Frameworks/tk8.5/Resources/Scripts ./library
This probably means that tk wasn't installed properly.
and it plots fine. However, if I run the script a few times, x11 always starts crashing after like the 3rd time (the plot comes up, but when I click on it to expand the window or interact with it, x11 stops responding). What does this mean?
Upvotes: 0
Views: 1634
Reputation: 263301
Tcl/Tk should be part of your Mac OSX installation (of whatever version you might be using). Most people these days are running Leopard or higher, so I suspect that the Tcl section of the R-Mac-FAQ: http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#TclTk-issues may not apply, but you should certainly check if you are running and earlier version.
The tcltk
package is part of the standard R installation. Have you updated to R 2.14.0? If you did so, has it also been updated since Nov 10 when Simon Urbanek fixed a binary package loading problem? Is your Rcmdr
version current (... my Package Installer says there have been 3 minor version upgrades since 17.0).
Your current Rcmdr setup seems to be expecting a version of Tcltk that is higher than the default 8.4 that is installed on Macs of the vintage I have. If updating R and Rcmdr is not effective then you could try installing a more recent version of Tcl/Tk as sanctioned by the R-Install/Admin Manual: http://cran.r-project.org/doc/manuals/R-admin.html#Tcl_002fTk
Upvotes: 1