Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapefile to select background points from #78

Open
SDMENM opened this issue Jul 19, 2020 · 3 comments
Open

Shapefile to select background points from #78

SDMENM opened this issue Jul 19, 2020 · 3 comments

Comments

@SDMENM
Copy link

SDMENM commented Jul 19, 2020

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
Copy link
Author

SDMENM commented Jul 19, 2020

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
Copy link
Author

SDMENM commented Jul 22, 2020

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].

@boylermaker
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants