Open leandronascimentolemos opened 4 years ago
Hello Leandro & thanks for your interest in BacDiveR :-)
There is no such function built-in, sorry. Because the list-structure of datasets depends on which data they actually contain, I wasn't sure how best to approach a bacdive_to_csv
function that would work in all cases. The BacDive team didn't include it in their examples, either.
Maybe tidyr and/or tibble contain a function for that? Or something from StackOverflow?
What should be possible in any case, however, is to extract the fields you are interested in into a new dataframe.
In both cases, afterwards, your use readr::write_...
, or other R-native export functions.
I hope these pointers prove useful to you. Please do post the solution here, or feel free to send a PR to extend one the vignettes (.Rmd files).
Kind regards, and good luck!
Katrin
I experimented a bit in dd126c4274dc397e1b9e49533fd4baa397591c1f, but I'm always running into:
Error: No common type for
taxonomy_name$data$data
and
references$data$data
<data.frame< ID_reference: integer reference : character >>.
:-/
I have a question:
Is there any function to export the bd_retrieve_by_search output file in csv?
Thanks.