gdauby / ConR

ConR
https://gdauby.github.io/ConR/
13 stars 3 forks source link

Error in map.res() #2

Closed Watashi26 closed 4 years ago

Watashi26 commented 5 years ago

Hey, I followed your example code with the madagascar dataset and it works perfectly but why I try to apply it on my dataset I always get the following Error: Results and Occurrences input files have different number of species. Even though the species levels are equal. Can you give me a hint on how to fix my problem?

kind regards Max

Code:

`

librarys

library(ConR) library(dplyr) library(rgbif) # download data

fetch download

species data

orch_gbif <- occ_download_get(key = "0042983-181108115102211", overwrite = TRUE) %>% occ_download_import(orch_gbif_download, na.strings = c("", NA))

global boundaries

data(land)

prepare dataset

orch_all <- orch_gbif %>% dplyr::select(decimalLatitude, decimalLongitude, species) # select necessary columns

start calculation

orchResults <- IUCN.eval(orch_all, showWarnings = FALSE)

map.res(Results=orchResults, Occurrences=orch_all, country_map=land, export_map=TRUE, threshold=3, Resol=1) `

gdauby commented 5 years ago

Hey sorry for late reaction and thanks for input. Bug should be corrected. Please try re install the package from github

install.packages("devtools") devtools::install_github("gdauby/ConR")