HPC and stack_modelling
JuniperPNG opened this issue · 2 comments
Hi there,
I have been running stack_modelling on my Mac in RStudio without problem but now I am trying to send off a larger model through SSH to an HPC (GCC 8, R 4.0.0-cairo).
My model looks like:
Plant_ssdm <- stack_modelling(c("MARS","CTA"), Plant_occ, Env, rep = 10,
Xcol = "longitude", Ycol = "latitude", Spcol = "species",
ensemble.thresh = 0.5, ensemble.metric="AUC", cv="LOO",endemism="WEI",
uncertainty = TRUE, method = "PRR.pSSDM", cores=0, verbose=TRUE)
Ensemble_modelling is working but when I try to run stack_modelling I get:
Error in Occurrences[which(names(Occurrences) == Spcol)] == species :
comparison of these types is not implemented
In addition: Warning message:
In eval(e, x, parent.frame()) :
Incompatible methods ("Ops.data.frame", "Ops.factor") for "=="
I got Plant_occ through load_occ and the file itself looks alright.:
> head(Plant_occ)
X latitude longitude species
11 11 -9.2500 147.3333 Syzygium branderhorstii
13 13 -6.4167 145.7833 Melicope rubra
14 14 -6.0000 144.7500 Eragrostis tenuifolia
16 16 -6.3333 147.1667 Myosotis australis
19 19 -5.1167 141.6333 Drimys membranea
20 20 -3.5833 142.7667 Polygala glomerata
Do you happen to have any idea what might be happening?
Many thanks and happy holidays,
Juniper
Hi Juniper,
I can only guess that there are some data type problems in the part where the data is subset for each species. I tried running the code in question (lapply
over species)
Line 435 in d8152bd
but could not reproduce the problem.
You said stack_modelling
worked on your computer? Are you running the same R version on the cluster? I have not updated to R 4.0.0. yet and I can imagine there have been changes that are in conflict with the data.frame
== factor
comparison we did.
Hi Juniper,
I can only guess that there are some data type problems in the part where the data is subset for each species. I tried running the code in question (
lapply
over species)
Line 435 in d8152bd
but could not reproduce the problem.
You saidstack_modelling
worked on your computer? Are you running the same R version on the cluster? I have not updated to R 4.0.0. yet and I can imagine there have been changes that are in conflict with thedata.frame
==factor
comparison we did.
Hi Lukas,
Many apologies - I only saw your reply now.
I had to change R versions and installed SSDM directly from Github and then it worked!
Many thanks again!