[R] Maxent Jarfile

Thierry Onkelinx thierry.onkelinx at inbo.be
Thu Jul 9 09:42:48 CEST 2015


Dear Annemie,

The mailing list accepts only a limited number of extensions. Your
attachment got stripped for the mail. It is probably easier to put the
files on-line and send us the link to the files.

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

2015-07-09 7:25 GMT+02:00 <annemariefischer86 op gmail.com>:

> ‎Hi John,
>
> Sorry about that. Please find attached the code, error and input file.
>
> Thanks,
> Annemarie
>
>
>   Original Message
> From: John Kane
> Sent: Thursday 9 July 2015 00:26
> To: Annemarie Fischer; r-help op r-project.org
> Subject: Re: [R] Maxent Jarfile
>
> Hi Annemarie,
> You have sent the email in HTML and it is very close to unreadable. Could
> you please resubmit the message in plain text. R-help does not accept HTML
> and, as happened here, the text gets seriously mangled.
>
>
>
> John Kane
> Kingston ON Canada
>
>
> > -----Original Message-----
> > From: annemarie_dh op hotmail.com
> > Sent: Wed, 8 Jul 2015 20:22:57 +0000
> > To: r-help op r-project.org
> > Subject: [R] Maxent Jarfile
> >
> > Hi,
> > I have been trying to solve the below problem for 2 days with no success.
> > Hopefully you can help as i can find no assistance online.
> > I am attempting to run the niche.equivalency.test and the
> > bg.similarity.test using RStudio and Maxent. I keep getting the error:
> > Error: Unable to access jarfile C:/ProgramError in file(fname, "r") :
> > cannot open the connectionIn addition: Warning messages:1: running
> > command 'java -jar C:/Program
> > Files/R/R-3.1.3/library/dismo/java/maxent.jar -e
> > R.phyloclim.temp/background.csv -s R.phyloclim.temp/samples.csv -j
> > R.phyloclim.temp/proj/ -o R.phyloclim.temp/out/ -r removeduplicates
> > nopictures autorun' had status 1 2: In file(fname, "r") : cannot open
> > file 'R.phyloclim.temp/out/Rhinolophus blasii_proj.asc': No such file or
> > directory
> > I suspect the issue is that the file directory doesnt have "", but i have
> > no idea how to add these in, as in RStudio values, the "" does appear.
> > My code is:
> > # load required
>
> packageslibrary(raster)library(mgcv)library(dismo)library(rgdal)library(ellipse)library(sp)library(proj4)library(rgeos)
> > library(rJava)library(maptools)library(rasterVis)library(phyloclim)
> > # path to MAXENT# --------------maxent.exe <-
> > paste(system.file(package="dismo"),
> > "/java/maxent.jar", sep = "")
> > # a data frame of coordinates where two species # have been detected
> > ('presence points') and# a raster stack of environmental covariables#
> > --------------------------------------
> > ###Change to correct species usedfile <-
> > paste(system.file(package="dismo"), "/ex/Rhinolophus_species.csv",
> > sep="")# this is the file we will use:file
> > #save(file, file="Molossidae_rarefied_points.rda")
> > #data()#data(package = .packages(all.available = TRUE))
> > #myData <- read.csv("file", header=TRUE, nrows=10000)
> > Rhinolophus_species <- read.table(file, header=TRUE, sep=',')
> > species <- c("Rhinolophus blasii", "Rhinolophus
> > clivosus")#data(sites)samples <- Rhinolophus_species[grep(paste(species,
> > collapse = "|"), Rhinolophus_species$Spp), ]data.path <-
> > system.file("extdata", package = "phyloclim")preds <- list.files(path =
> > data.path, pattern = "[.]asc")preds <- paste(data.path, preds, sep =
> > "/")preds <- stack(lapply(X = preds, FUN = raster))
> > # testing against 9 permutations of the data#
> > -------------------------------------------reps <- 1000
> > # run hypothesis tests# --------------------if (file.exists(maxent.exe)){
> > net <- niche.equivalency.test(samples, preds, reps, maxent.exe) net;
> > plot(net) bst <- bg.similarity.test(samples, preds, reps, app =
> > maxent.exe) bst; plot(bst)} else { message("get a copy of MAXENT (see
> > Details)")}
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help op r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ____________________________________________________________
>
>
> ______________________________________________
> R-help op r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> ______________________________________________
> R-help op r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list