Dear Els,
I can't really help on the Mac OS issue with tcl/tk since I'm using Linux. However, as the command line warning tells you, you'd better use 'adehabitatHS' [1] now, instead of the old 'adehabitat', which is no longer developed (bug fixes are added, but no new methods). I don't think it will solve your problem, though, but I really recommend to upgrade. Besides, you might want to have a look at the MADIFA instead of the ENFA. See [2] for further details.
Best,
Mathieu Basille.
[1] http://cran.r-project.org/web/packages/adehabitatHS/index.html
[2] Calenge, C.; Darmon, G.; Basille, M.; Loison, A. & Jullien, J.-M. (2008) The factorial decomposition of the Mahalanobis distances in habitat selection studies. Ecology, 89: 555-566 doi 10.1890/06-1750.1
Le 27/11/2012 10:57, Els Ducheyne a ?crit :
Dear Massimo
yes it works from command line, I do get a warning about the tcl tk though, so indeed this must be the source of the problem (see below)
The good news is that at least I can carry out the code via the terminal if necessary (even it is not with the R Gui)
Still hoping for a fix though
Els
R version 2.15.2 (2012-10-26) -- "Trick or Treat"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
Loading required package: ade4
Attaching package: ?ade4?
The following object(s) are masked from ?package:base?:
within
Loading required package: tkrplot
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading required package: shapefiles
Loading required package: foreign
Attaching package: ?shapefiles?
The following object(s) are masked from ?package:foreign?:
read.dbf, write.dbf
Be careful: it is now recommended to use the newpackages adehabitatMA, adehabitatLT, adehabitatHR, and adehabitatHS.
These 4 packages are intended to become the future of adehabitat.
The "classical" version of adehabitat will still be maintained for some
time, but no new method will be added to the package.
Warning message:
In fun(libname, pkgname) :
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.
R version 2.15.2 (2012-10-26)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] tcltk stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] adehabitat_1.8.11 shapefiles_0.6 foreign_0.8-51 tkrplot_0.0-23
[5] ade4_1.4-17
On 27 Nov 2012, at 16:42, rpi <distem at rpi.edu> wrote:
Els,
i tried to run adehabitat form inside the Gui.app (64 bit) using R
(installed from Homebrew )
.. and i got the same problem you had
i tried to rebuild the gui.app using Xcode but no lucky .. same crash.
trying to run R from the command line ? it is able to load adehabitat.
seems to me a GUI.app problem
.. can you check if your adehabitat code runs fine starting R from command line ?
thanks,
Massimo.
Il giorno 27/nov/2012, alle ore 09:34, Els Ducheyne <educheyne at avia-gis.be> ha scritto:
Dear Massimo
I've just tried and it is still the same problem. Should I put it somewhere for R to find this?
Best
Els
On 27 Nov 2012, at 15:03, epi <massimodisasha at gmail.com> wrote:
Dear list
I am trying to run ENFA for presence only records. I have installed adehabitat v1.18.11 on R2.15.2 on MacOS 10.8.2. I
Whilst the library is successfully installed and loaded, it crashed R when I am trying to run other commands after loading the library.
Did anyone experience this before?
Is it the Tcl/Tk that causes the problem, could I load the package without the Tcl/Tk?
I have tested under windows too with same version of adehabitat and R and there it works fine. Unfortunately, I will use the package for teaching and some students use MacOS so therefore I would like to find a solution.
R version 2.15.2 (2012-10-26)
Platform: i386-apple-darwin9.8.0/i386 (32 bit)
locale
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
stats graphics grDevices utils datasets methods base
Loading required package: ade4
Attaching package: 'ade4'
The following objects are masked from 'package:base'
within
loading required package:tkrplot
loading required package: tcltk
Loading Tcl/Tk interface
After the second sessionInfo() R does not respond, nor with any other command. The only option is Force quit and reboot.
Thanks for any help
Els