Open MLieke opened 8 months ago
Yes. I also realised this issue in wcvp_checklist(), wcvp_summary(). Maybe all methods contain parameter taxon_rank = c("species", "genus", "family", "order", "higher")
will fail when using "species".
Here is my solution:
wcvp_names <- rWCVPdata::wcvp_names
wcvp_names$species <- wcvp_names$taxon_name
wcvp_checklist(taxon = "Elymus czimganicus", taxon_rank = "species", wcvp_names = wcvp_names)
I checked the code of wcvp_checklist() and i knew why!
When we run wcvp_checklist(taxon="Elymus czimganicus", taxon_name="species")
, wcvp_checklist()
actually find "Elymus czimganicus" in the "species" column of rWCVPdata::wcvp_names
.
Unfortunately, the "species" column of rWCVPdata::wcvp_names
is not what we think, you can see below:
So we will never get species occurrences accroding to species rank!
Hi both,
Sorry for my delayed response here.
We originally designed those functions to be used at genus level or above (so the above code should ideally throw a different error), but it looks like the option for taxon_rank = "species"
crept in when we were standardising arguments during pre-release (oops!). I think the best solution is for me to update the functions so that they work for individual species, as is the case for the distribution mapping. I'll get to this ASAP and let you know once the patch is ready.
In the meantime, perhaps the best thing to do is to run the wcvp_*
functions at the genus level, then dplyr::filter
on the specific epithet.
Dear Matilda
Apologies if this is not the right place to ask this question, or the way I ask this question is not as it should be, I'm quite new to this.
Thank you for this really nice package!
I have a question regarding its use. I'm not sure if it's a bug or I'm doing something wrong, but every time I try to use
wcvp_checklist()
itself orwcvp_occ_mat()
(which I guess useswcvp_checklist()
) at the species level, I get the following error: Error inwcvp_checklist()
: ! No occurrences. Are the rank and spelling correct?I thought maybe I'm writing the species names in an incorrect way, but this does not seem to be it (e.g. they work for the function wcvp_distribution()).
Error in
wcvp_checklist()
: ! No occurrences. Are the rank and spelling correct? Backtrace:Do you have an idea what is going wrong here and how I could solve it?
Thank you very much in advance and have a great weekend! Lieke