Cristin {c2z} | R Documentation |
Search Cristin API
Description
Use search parameters for the Cristin API and return the results
as a tibble. See CristinWrangler
Usage
Cristin(
id = NULL,
doi = NULL,
title = NULL,
contributor = NULL,
issn = NULL,
unit = NULL,
institution = NULL,
user = NULL,
category = NULL,
published_since = NULL,
published_before = NULL,
created_since = NULL,
created_before = NULL,
modified_since = NULL,
modified_before = NULL,
year_reported = NULL,
project_code = NULL,
funding_source = NULL,
funding = NULL,
lang = NULL,
page = 1,
per_page = 1000,
max.results = NULL,
no.results = FALSE,
sort = NULL,
filter = NULL,
fields = "all",
open.query = NULL,
all.results = TRUE,
force = FALSE,
remove.duplicates = TRUE,
silent = FALSE,
base.url = "https://api.cristin.no/v2/results",
custom.url = NULL,
use.identifiers = TRUE,
crossref.search = FALSE,
autosearch = TRUE,
zotero = NULL,
zotero.import = TRUE,
zotero.check = TRUE,
remove.na = TRUE,
replace.na = "book",
force.type = NULL,
override = FALSE,
polite = TRUE,
log = list()
)
Arguments
id |
The Cristin id of the result, Default: NULL |
doi |
DOI name (e.g. doi=10.1000/123456), Default: NULL |
title |
The title of the result, Default: NULL |
contributor |
Author's name or Cristin person id, Default: NULL |
issn |
The issn of the result, Default: NULL |
unit |
Id (e.g. unit=185.53.18.10), Default: NULL |
institution |
Id (one number, e.g. institution=185), name or acronym of the institution the contributors belong to, Default: NULL |
user |
A person's username in Cristin together with the institution id separated by colon (e.g., 'askeladd:185'), Default: NULL |
category |
Categories. See category codes, Default: NULL |
published_since |
Results published since and inclusive the given year, (yyyy), Default: NULL |
published_before |
Results published before and inclusive the given year, (yyyy), Default: NULL |
created_since |
Results created since and inclusive the given date, (yyyy-mm-dd), Default: NULL |
created_before |
Results created before and inclusive the given date, (yyyy-mm-dd), Default: NULL |
modified_since |
Results modified since and inclusive the given date, (yyyy-mm-dd), Default: NULL |
modified_before |
Results modified before and inclusive the given date, (yyyy-mm-dd), Default: NULL |
year_reported |
The year a result was reported, Default: NULL |
project_code |
Project code is the internal reference number used by funding source, Default: NULL |
funding_source |
Funding source code e.g: NFR, Default: NULL |
funding |
Funding source code e.g: NFR, and project_code together separated by colon (e.g., NFR:1234), Default: NULL |
lang |
Two letter language code, Default: NULL |
page |
Page number. See pagination, Default: 1 |
per_page |
Number of items per page (1000 is max). See pagination, Default: 1000 |
max.results |
Do you need a limit?, Default: NULL |
no.results |
Do you need only the number of results?, Default: FALSE |
sort |
Sorts on 'category' and/or 'year_published'. See search and sort. Default sort order is on 'cristin_result_id' in ascending order, Default: NULL |
filter |
Vector of cateogries to include in results. See category code, Default: NULL |
fields |
'fields = all' gives a list of result objects with all available fields. If this parameter is omitted, a list of result summaries with fewer fields will be returned, Default: all |
open.query |
Define your own query terms, Default: NULL |
all.results |
Find all results in query, Default: TRUE |
force |
Force is seldom wise, but sometimes..., Default: FALSE |
remove.duplicates |
Remove duplicates if TRUE, Default: TRUE |
silent |
c2z is noisy, tell it to be quiet, Default: FALSE |
base.url |
The base url for the Cristin API, Default: https://api.cristin.no/v2/results |
custom.url |
Define your own Cristin API url, Default: NULL |
use.identifiers |
Use if ISBN/DOI identifiers if enabled, Default: TRUE |
crossref.search |
Query Crossref database based on title, authors, and date if enabled, Default: FALSE |
autosearch |
Results could be automatically evaluated (based on some logic) or you could inspect them manually if set to FALSE, Default: TRUE |
zotero |
A list with information on the specified Zotero library (e.g., id, API key, collections, and items), Default: NULL |
zotero.import |
Use |
zotero.check |
Check for Cristin references already stored in Zotero, Default: TRUE |
remove.na |
Cristin contains many, more or less, obscure categories, and not all are (yet) supported. By default these are removed, however, if this option is set to FALSE unsupported categories are treated according to replace.na, Default: TRUE |
replace.na |
May the odds be in your favor and replace unsupported categories with a predefined itemType if remove.na is set to false, Default: 'book' |
force.type |
Force all items to a predefined itemType, Default: NULL |
override |
Put your faith in the algorithms and the identifiers (i.e., DOI/ISBN) and override what is reported in Cristin, Default: FALSE |
polite |
Please store you email in '.Renviron' to query Crossref, Default: TRUE |
log |
A list for storing log elements, Default: list() |
Details
Please see #' https://oeysan.github.io/c2z/
Value
A list with (exported) items from Cristin
See Also
http_error
, GET
,
RETRY
tail
, head
slice
Examples
# Simple `Cristin` search by id
example <- Cristin(id = "840998")
# Print index using `ZoteroIndex`
if (any(nrow(example$results))) {
ZoteroIndex(example$results) |>
dplyr::select(name) |>
print(width = 80)
}