andrefaa/ENMTML

Error in .startGDALwriting(x, filename, gdal=options, format=filetype, : Formal argument "sources" matched by multiple actual arguments

Closed this issue · 1 comments

I was able to run the package without any issue 3 months back, however, I am getting this error when I tried to run the model now. This error arises when the algorithm tries to write raster after variable collinearity reduction. I will be thankful to hear the solution.
here is the details on parameters used
ENMTML(
pred_dir = preddir,
proj_dir = NULL,
result_dir = result_dir,
occ_file = occ_file,
sp = 'species',
x = 'x',
y = 'y',
min_occ = min_occ,
thin_occ = thin_occ,
eval_occ = eval_occ,
colin_var=c(method='PCA'),
imp_var = TRUE,
sp_accessible_area = NULL,
pseudoabs_method = pseudoabs_method,
pres_abs_ratio = pres_abs_ratio,
part=part,
save_part = FALSE,
save_final = TRUE,
algorithm = algorithm,
thr = c(type='MAX_TSS'),
msdm = NULL,
ensemble = ensemble,
extrapolation = FALSE,
cores = 1
)

Hi

This is a problem caused by raster package, try to install the last raster version or the version 3.6-14

require(devtools)
install_version("raster", version = "3.6-14", repos = "http://cran.us.r-project.org")