Running MAXENT through R- dismo package

933 views
Skip to first unread message

Girija Kalyani

unread,
Aug 25, 2014, 5:01:12 AM8/25/14
to max...@googlegroups.com
 i get the following error, when i run the maxent command from R
I would be greatly obliged with your response.


Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: inDL(x, as.logical(local), as.logical(now), ...)
  error: unable to load shared object 'G:/Software/R-3.1.1/library/rJava/libs/x64/rJava.dll':
  LoadLibrary failure:  The specified module could not be found.

Error: package ‘rJava’ could not be loaded


System configuration
Windows-64 bit
R-version- 3.1.1
Java-1.7

romunov

unread,
Aug 25, 2014, 5:03:08 AM8/25/14
to maxent
Can you run the example in `?maxent`?

Cheers,
Roman




--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.
To post to this group, send email to max...@googlegroups.com.
Visit this group at http://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.



--
In God we trust, all others bring data.

Girija Kalyani

unread,
Aug 25, 2014, 5:41:01 AM8/25/14
to max...@googlegroups.com
No sir. I cant..!
I get the same problem


--
You received this message because you are subscribed to a topic in the Google Groups "Maxent" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/maxent/ucqCY-O_poY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to maxent+un...@googlegroups.com.

Girija Kalyani

unread,
Aug 25, 2014, 5:46:10 AM8/25/14
to max...@googlegroups.com
i get this error.
Error in maxent(predictors, occtrain, factors = "biome") : 
  unused argument (factors = "biome")

romunov

unread,
Aug 25, 2014, 7:30:36 AM8/25/14
to maxent
OP solved the problem offlist and I'm reposting it for posterity:

--------------------------------

I followed this: 

Getting rJava to work depends heavily on your computers configuration:

  1. You have to use the same 32bit or 64bit version for both: R and JDK/JRE. A mixture of this will never work (at least for me).
  2. If you use 64bit version make sure, that you do not set JAVA_HOME as a enviorment variable. If this variable is set, rJava will not work for whatever reason (at least for me). You can check easily within R is JAVA_HOME is set with

    Sys.getenv("JAVA_HOME")

If you need to have JAVA_HOME set (e.g. you need it for maven or something else), you could deactivate it within your R-session with the following code before loading rJava:

if (Sys.getenv("JAVA_HOME")!="")
  Sys.setenv(JAVA_HOME="")
library(rJava)

This should do the trick in most cases. Furthermore this will fix issue Using the rJava package on Win7 64 bit with R, too. I borrowed the idea of unsetting the enviorment variable from R: rJava package install failing.


And it worked..!!! :)



On Mon, Aug 25, 2014 at 11:01 AM, Girija Kalyani <smilei...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.
To post to this group, send email to max...@googlegroups.com.
Visit this group at http://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages