Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_citations doesn't allow for only_key_fields to take on a character vector #221

Open
TNRiley opened this issue Dec 3, 2024 · 2 comments
Assignees

Comments

@TNRiley
Copy link
Collaborator

TNRiley commented Dec 3, 2024

CiteSource::read_citations is supposed to allow users to select only_key_fields as either TRUE, FALSE, OR to add a character vector to identify fields they want to retain.

I don't believe the character vector option works due to the fact that CiteSource::read_citations inherits the parameters of synthesisr::synthesisr_read_refs and this function's argument "select_fields" defaults to NULL (which means it will read in all fields of the RIS)

@LukasWallrich do you read this the same way I do?

@LukasWallrich
Copy link
Collaborator

Sounds plausible but I'd need to test it. I hope to get to it next week.

@LukasWallrich
Copy link
Collaborator

@TNRiley the character vector works for me (see below). Did you run into any particular issues?

names(read_citations("tests/testthat/data/1_WoS.ris", only_key_fields = c("C6", "supertaxa")))
#> Import completed - with the following details:
#>        file cite_source cite_string cite_label
#> 1 1_WoS.ris       1_WoS        <NA>       <NA>
#>   citations
#> 1       219
#>  [1] "author"      "title"       "year"       
#>  [4] "abstract"    "doi"         "volume"     
#>  [7] "source"      "issue"       "issn"       
#> [10] "start_page"  "ID"          "C6"         
#> [13] "supertaxa"   "cite_source"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants