-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
81 lines (59 loc) · 2.76 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
rdatacite
=========
```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE
)
```
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![cran checks](https://cranchecks.info/badges/worst/rdatacite)](https://cranchecks.info/pkgs/rdatacite)
[![R-CMD-check](https://github.com/ropensci/rdatacite/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/rdatacite/actions?query=workflow%3AR-CMD-check)
[![codecov.io](https://codecov.io/github/ropensci/rdatacite/coverage.svg?branch=master)](https://codecov.io/github/ropensci/rdatacite?branch=master)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/rdatacite)](https://github.com/r-hub/cranlogs.app)
[![cran version](https://www.r-pkg.org/badges/version/rdatacite)](https://cran.r-project.org/package=rdatacite)
[![DOI](https://zenodo.org/badge/2521192.svg)](https://zenodo.org/badge/latestdoi/2521192)
`rdatacite` provides programmatic accesses to DataCite (https://datacite.org/) metadata
* REST API. Docs: https://support.datacite.org/docs/api and https://support.datacite.org/reference
`rdatacite` docs: https://docs.ropensci.org/rdatacite
Package API:
```{r echo=FALSE, comment=NA, results='asis'}
cat(paste(" -", paste(sprintf("`%s`", getNamespaceExports("rdatacite")), collapse = "\n - ")))
```
## Installation
Stable CRAN version
```{r eval=FALSE}
install.packages("rdatacite")
```
Development version from github
```{r eval=FALSE}
pak::pkg_install("ropensci/rdatacite")
```
```{r}
library('rdatacite')
```
## Result objects
Outputs from nearly all `rdatacite` functions will be of class `dc`, an S3 class that's
simply a named list of results. You can easily remove the class via `unclass()`.
The `print.dc` method prints the data.frame for the `data`, `included`, and `reports`
slots if they exist, but hides the `meta` named list. You can get to the metadata by
indexing to it like `$meta`.
## Searching
You may want to start with `dc_dois()`.
```{r}
dc_dois(query = "climate change")
```
The `query` parameter supports Elasticearch query string queries. Some examples:
```{r eval=FALSE}
# search within a field
dc_dois(query = "publicationYear:2016")
# fuzzy search (via *) on a nested field
dc_dois(query = "creators.familyName:mil*")
```
## Meta
* Please [report any issues or bugs](https://github.com/ropensci/rdatacite/issues).
* License: MIT
* Get citation information for `rdatacite` in R doing `citation(package = 'rdatacite')`
* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.