Skip to content

Add a custom field to export ?  #29

@amelinevallet

Description

@amelinevallet

Hello,
I would like to add to the exported bibliographic information, a custom field, containing a unique ID defined within the context of our review project. Is this possible ? The unique ID is contained in the column of a dataframe, that I can export to a .ris file with the write_refs function (everything work fine). How can I specifiy / add a custom fields to the export ? I have tried to use the tag_naming option from the read_refs and write_refs functions, but did not succeeded to using it for this purpose. Any recommandation about how to proceed ?
I am looking for an option doing this :

references <- data.frame(
  AU = c("Smith, John", "Doe, Jane"),
  TI = c("Sample Title 1", "Sample Title 2"),
  PY = c("2023", "2022"),
  ID = c("CustomID1", "CustomID2") # Custom citation unique identifier
)
bibliography <- as.bibliography(references)

custom_fields <- list(
  ID = "ID" # Adding the ID variable to the list of custom fields to add to the export
)

write_refs(bibliography, format = "ris", file = "output.ris", custom_fields = custom_fields)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions