azizka / sampbias

Sampbias is a method and tool to 1) visualize the distribution of occurrence records and species in any user-provided dataset, 2) quantify the biasing effect of geographic features related to human accessibility, such as proximity to cities, rivers or roads, and 3) create publication-level graphs of these biasing effects in space.
32 stars 8 forks source link

unable crop for signature "sf" #9

Open brunnohba opened 3 years ago

brunnohba commented 3 years ago

Hi everyone,

I'm currently trying to dealing with a problem. I'm testing the function calculate_bias() with freshwater gastropods from Brazil. I'm receiving this error message: "unable to find an inherited method for function ‘crop’ for signature ‘"sf"’". I think that's because I'm using the geobr package for loaded Brazilian shapefiles directly in R, and the package is built over sf. There's an alternative to resolve this? Any method to restrict the samples in calculate_bias() easily? Maybe a link to rnaturalearth can help me?

Thanks for building this package. It is extremely necessary! Thanks for considering this message. Brunno.

BrunoVilela commented 8 months ago

Hello there! We've recently overhauled the Sampbias package, integrating new spatial packages and implementing substantial changes to the code. If you're still encountering the issue after updating the package to the latest version available on GitHub, could you please share a reproducible code along with the accompanying data? This will enable us to investigate the error more effectively and provide you with a timely resolution. Your cooperation is greatly appreciated!