modleR icon indicating copy to clipboard operation
modleR copied to clipboard

Shapefile to select background points from

Open SDMENM opened this issue 5 years ago • 3 comments

Hi, I tried many different types of shape files as buffers but none of them seems to be the accepted format. Each time I get the following error message.

setup_sdmdata(species_name = "L_agrorensis", occurrences = occ, predictors = stack, lon = "longitude", lat = "latitude", models_dir = "./models", real_absences = NULL, buffer_type = "user", buffer_shape = marea, dist_buf = NULL, env_filter = FALSE, env_distance = "centroid", min_env_dist = NULL, min_geog_dist = NULL, write_buffer = FALSE, seed = NULL, clean_dupl = FALSE, clean_nas = FALSE, clean_uni = FALSE, geo_filt = FALSE, geo_filt_dist = NULL, select_variables = FALSE, cutoff = 0.8, sample_proportion = 0.8, png_sdmdata = TRUE, n_back = 1000, partition_type = c("bootstrap"), boot_n = 1, boot_proportion = 0.7, cv_n = NULL, cv_partitions = NULL)

sampling pseudoabsence points with user buffer Error in .doCellFromXY(object@ncols, object@nrows, object@extent@xmin, : Not compatible with requested type: [type=list; target=double].

Is there any specific format for the user defined M area shapefile?

SDMENM avatar Jul 19 '20 06:07 SDMENM

The shape file that I created has been accepted by the "WALLACE" software, but it doesn't work here, I am not sure, where am I making mistake?

SDMENM avatar Jul 19 '20 06:07 SDMENM

Hi, can someone please tell me whats wrong with my shape file? I get this error message.

Error in .doCellFromXY(object@ncols, object@nrows, object@extent@xmin, : Not compatible with requested type: [type=list; target=double].

SDMENM avatar Jul 22 '20 05:07 SDMENM

I also had this error: for anybody who has it in the future, the source of my problem was that the occurrence records had been manipulated with dplyr, so although they looked like a data frame, they were actually a tibble. Modifying the original command to "occurrences = as.data.frame(occ)" solved the problem for me.

To the developers: it may be useful at some point to add functionality that will let modleR play nice with the tidyverse, as it's a pretty common set of tools that are likely to show up upstream in people's pipelines.

boylermaker avatar Aug 04 '21 15:08 boylermaker