Open sPuechmailleGitHub opened 2 years ago
Hi @sPuechmailleGitHub 👋
First of all, thank you for your interest in rtaxref
. It is a proof-of-concept for a package to access TAXREF programmatically. So it still has some quite rough edges. And I'm glad it may be useful for some people. I'm actually planning on getting back working on it!
You're right in saying that there is a hard limit on returning a maximum of 5000 lines per query. But strangely it is only mentioned in the documention of the API itself it is for rt_taxa_search
funciton. TAXREF API returns 5000 lines per page so to get the next 5000 results you should change the page
argument which is setup to 1 by default (see the arguments there: https://rekyt.github.io/rtaxref/reference/rt_taxa_search.html)
Nothing is specifically mentioned for the function called by rt_taxa_children()
(I mean on the server side). There is probably a limit set by the server but I don't know how to handle it. I'll have to ask the people behind the API.
I have tried adding a page
parameter but it doesn't seem to work.
And to answer your question more precisely, I'm not sure with the current API how to get a list of the plants occurring in France.
I would maybe try to get all the sub-ranks children of "Plantae" and try to query that. But given that you will need to have groups of less than 5000 species it can be cumbersome...
I'll be asking people behind the API to get a proper answer then :)
I wanted to get all plant species from mainland France, which gave me 5000 lines. I then simply checked that one species was present in there ("Pinus sylvestris") but it was not. I then searched for this species in a different way and could find it. I therefore suspect that the 'rt_taxa_children' function has a limit on the number of items it returns; Nevertheless, this limit does not seem to be explicit anywhere, even with the functions used inside this function. Is it a limit with the API or something else? If so, how to get the full list of species for Plants in mainland France (or any request that would return >5000 lines)?
Thanks & great package!
Code used