Closed LukasWallrich closed 10 months ago
That's because the Figshare search_for
parameter is the "Search Term", and that is defined for deposits searches as the default first string of deposits_search()
, and called there "search_string". Explicit setting of "search_for" on Figshare has thus been disabled here. This works:
cli$deposits_search(search_term = "intergroup contact", item_type = 3)
or simply
cli$deposits_search("intergroup contact", item_type = 3)
Your confusion nevertheless indicates that the error messages there are not sufficiently informative, so I'll update that now, and show you what it looks like. Thanks!
Actually, it was even easier to simply make search_for
work, but to ensure that only one term is specified:
library (deposits)
packageVersion ("deposits")
#> [1] '0.2.1.44'
cli <- depositsClient$new (service = "figshare")
txt <- "intergroup contact"
x <- cli$deposits_search (search_for = txt, item_type = 3) # works
x <- cli$deposits_search (search_string = txt, item_type = 3) # works
x <- cli$deposits_search (search_string = txt, search_for = txt, item_type = 3)
#> Error: Please specify only one of 'search_for' or 'search_string'.
Created on 2023-11-06 with reprex v2.0.2
Does that solve your problem?
Yes, that seems ideal. Thank you!
The title says it all - while
search_for
is a documented figshare parameter, I get:cli$deposits_search(search_for = "intergroup contact", item_type = 3)
Error: The parameters [search_for] are not figshare search parameters; see ?depositsClient for full list.