if (FALSE) {
cr_types()
cr_types("monograph")
cr_types("monograph", works=TRUE)
cr_types(c('monograph', 'book-set', 'book', 'book-track'))
cr_types(c('monograph', 'book-set'), works=TRUE)
## get facets back
cr_types("journal-article", works=TRUE, facet=TRUE)$facets
cr_types("monograph", works=TRUE, facet="license:*", limit = 0)
cr_types(c('monograph', 'book-set'), works=TRUE, facet=TRUE)
# Use the cursor for deep paging
cr_types("journal-article", works = TRUE, cursor = "*",
cursor_max = 500, limit = 100)
cr_types(c('monograph', 'book-set'), works = TRUE, cursor = "*",
cursor_max = 300, limit = 100)
## with optional progress bar
cr_types("journal-article", works = TRUE, cursor = "*",
cursor_max = 500, limit = 100, .progress = TRUE)
# query doesn't work unless using works=TRUE
### you get results, but query param is silently dropped
cr_types(query = "ecology")
# print progress - only works when passing more than one type
cr_types(c('monograph', 'book-set'), works=TRUE, .progress='text')
# Low level function - does no parsing to data.frame, get json or a list
cr_types_('monograph')
cr_types_('monograph', parse = TRUE)
cr_types_("journal-article", works = TRUE, cursor = "*",
cursor_max = 300, limit = 100)
# field queries
## query.container-title
cr_types("journal-article", works = TRUE,
flq = c(`query.container-title` = 'Ecology'))
# select only certain fields to return
res <- cr_types("journal-article", works = TRUE, select = c('DOI', 'title'))
names(res$data)
}
Run the code above in your browser using DataLab