paleolimbot / rbbt

R Interface to the Better BiBTex Zotero Connector
142 stars 25 forks source link

bbt_library_id() gets a row number, not the id value of the library #46

Open stepanpaulik opened 8 months ago

stepanpaulik commented 8 months ago

Hello all,

I am trying to write a collaborative RMarkdown article. To do that, we have setup a group library. When I queue the bbt_libraries() function, it returns two libraries with IDs 1 (the local one) and 4 (the group one). However, when I use the "bbt_library_id(name_of_the_library)" function in the library_id argument of bbt_write_bib() function in the YAML header, the function returns 2, the row number of the group library rather than its ID. It means that the library ID has to be hard coded instead and makes the collaborative work more difficult.

image

The workaround is to call the functioning bbt_libraries() with the call rbbt::bbt_libraries()$id[rbbt::bbt_libraries()$name == 'name_of_the_library']

Thank you for the resolution!