lib_remove_doi_prefix: Remove DOI Prefix.

Description Usage Arguments Details Author(s) Examples

View source: R/lib_remove_doi_prefix.R

Description

Removes DOI HTTP (see lib_remove_doi_http()) and prefix, that is, the first 6 digits of a DOI. For example, in the case of "https://doi.org/10.1016/j.adolescence.2014.04.012" both "https://doi.org/" and "10.1016/" are removed resulting in "j.adolescence.2014.04.012".

Usage

1

Arguments

doi

Character vector. A vector of Digital Object Identifiers.

Details

For more information on DOIs and matching regular expressions see DOI regex.

Regular expressions

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

 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
# Single DOI
doi <- "https://doi.org/10.1016/j.adolescence.2014.04.012"
lib_remove_doi_prefix(doi = doi)
doi <- "10.1016/j.adolescence.2014.04.012"
lib_remove_doi_prefix(doi = doi)
# Vector of DOIs
doi <- c(
  "https://doi.org/10.1016/j.adolescence.2014.04.012",
  "https://doi.org/10.1007/s11469-015-9612-8",
  "https://doi.org/10.1016/j.addbeh.2014.10.002",
  "https://doi.org/10.1007/s10566-014-9275-9",
  "https://doi.org/10.1037/a0039101",
  "https://doi.org/10.1016/j.paid.2016.10.059",
  "https://doi.org/10.1016/j.addbeh.2016.03.026",
  "https://doi.org/10.1080/10826084.2019.1658784",
  "https://doi.org/10.1016/j.addbeh.2018.11.045"
)
lib_remove_doi_prefix(doi = doi)
doi <- c(
  "10.1016/j.adolescence.2014.04.012",
  "10.1007/s11469-015-9612-8",
  "10.1016/j.addbeh.2014.10.002",
  "10.1007/s10566-014-9275-9",
  "10.1037/a0039101",
  "10.1016/j.paid.2016.10.059",
  "10.1016/j.addbeh.2016.03.026",
  "10.1080/10826084.2019.1658784",
  "10.1016/j.addbeh.2018.11.045"
)
lib_remove_doi_prefix(doi = doi)

jeksterslabds/jeksterslabRlib documentation built on Jan. 19, 2021, 11:04 a.m.