[R] Can not invoke maxent() of library(dismo) in Mac OSX

Mao Jianfeng jianfeng.mao at gmail.com
Wed Jan 26 22:17:16 CET 2011


Dear R-helpers,

I can not invoke maxent() in Mac OSX. Could you give me any directions
on that? Thank you in advance.

Here is my info:

# (1) the error
>  me <- maxent(predictors, occtrain, factors='biome')
me <- maxent(predictors, occtrain, factors='biome')
Error in .jcall(mxe, "S", "fit", c("autorun", "-e", afn, "-o", dirout,  :
  java.lang.NoClassDefFoundError: Could not initialize class
density.DirectorySelect

# (2) the variables for maxent: predictors, and occtrain
> summary(predictors)
summary(predictors)
Cells:  35712
NAs  :  0 0 0 0 0 0 0 0 0

            1      2      3      4     5    6     7     8      9
Min.    -23.0    0.0    0.0    0.0  97.0 -207  64.0 -66.0  1.000
1st Qu. 171.0  715.5  317.0   30.0 306.0   29 132.0 213.0  1.000
Median  230.0 1271.0  513.0   87.0 322.0  131 183.0 249.0  4.000
Mean    209.3 1364.0  570.3  136.3 314.4  103 210.4 225.9  5.135
3rd Qu. 257.0 1879.0  834.0  216.0 336.0  188 275.0 262.0  8.000
Max.    289.0 7091.0 2458.0 1496.0 422.0  242 449.0 322.0 14.000
summary based on a sample of 5000 cells, which is 14.0008960573477 %
of all cells
> summary(occtrain)
summary(occtrain)
      lon              lat
 Min.   :-85.93   Min.   :-23.450
 1st Qu.:-79.47   1st Qu.: -2.750
 Median :-75.58   Median :  5.300
 Mean   :-72.22   Mean   :  2.823
 3rd Qu.:-65.40   3rd Qu.:  9.150
 Max.   :-46.73   Max.   : 13.950

# (3) my OS and R version
> version
version
               _
platform       x86_64-apple-darwin9.8.0
arch           x86_64
os             darwin9.8.0
system         x86_64, darwin9.8.0
status
major          2
minor          12.1
year           2010
month          12
day            16
svn rev        53855
language       R
version.string R version 2.12.1 (2010-12-16)
> sessionInfo()
sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US/en_US/en_US/C/en_US/en_US

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] evaluate_0.3  dismo_0.5-14  rJava_0.8-8   raster_1.7-29 sp_0.9-76

loaded via a namespace (and not attached):
[1] grid_2.12.1     lattice_0.19-17 plyr_1.4        stringr_0.4
[5] tools_2.12.1

-- 
Jian-Feng, Mao

the Institute of Botany,
Chinese Academy of Botany,



More information about the R-help mailing list