-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
streamline docs and expose example data
- Loading branch information
Showing
43 changed files
with
218 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,3 @@ empty_funder <- function(cr) { | |
} | ||
out | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
#' Some DOIs for testing | ||
#' @keywords internal | ||
#' @export | ||
tu_dois <- function() { | ||
readr::read_lines(file = system_file2("extdata", "dois", "tu.txt")) | ||
} | ||
|
||
#' Long list of DOIs | ||
#' @noRd | ||
dois_many <- function() { | ||
res <- readr::read_lines(file = system_file2("extdata", "dois", "many.txt")) | ||
biblids::as_doi(res) | ||
} | ||
# ==== example dois | ||
|
||
#' Some troublesome DOIs for testing | ||
#' @noRd | ||
dois_weird <- function() { | ||
c( | ||
# these are roughly in the order of metacheckable predicates | ||
"10.1000/1", | ||
NA, # there's no meaningful metadata for an NA DOI | ||
"doi:10.1000/1", # duplicated from above | ||
"10.3389/fbioe.2020.00209", # actually from CR | ||
"10.1000/2", | ||
"10.1000/3", # would exceed limit of 4 | ||
# caused issues in https://github.com/subugoe/metacheck/issues/181 | ||
"10.1007/s00330-019-06284-8", | ||
# caused issues in https://github.com/subugoe/metacheck/issues/181 | ||
"10.1007/s00431-018-3217-8" | ||
) | ||
} | ||
#' DOIs included in the package for testing and illustration | ||
#' @format A list of [biblids::doi()] vectors, including: | ||
#' - `good`: Guaranteed to work (all are [is_metacheckable()]). | ||
#' - `many`: Long list of DOIs. | ||
#' - `weird`: Troublesome DOIs. | ||
#' - `biblids`: [biblids::doi_examples()] | ||
#' | ||
#' @examples | ||
#' doi_examples$good | ||
#' | ||
#' @family data | ||
#' @export | ||
doi_examples <- list( | ||
# these are originally from TU users | ||
good = biblids::as_doi( | ||
readr::read_lines( | ||
file = system.file("extdata", "dois", "tu.txt", package = "metacheck")) | ||
), | ||
many = biblids::as_doi( | ||
readr::read_lines( | ||
file = system.file("extdata", "dois", "many.txt", package = "metacheck") | ||
) | ||
), | ||
weird = biblids::as_doi( | ||
c( | ||
# these are roughly in the order of metacheckable predicates | ||
"10.1000/1", | ||
NA, # there's no meaningful metadata for an NA DOI | ||
"doi:10.1000/1", # duplicated from above | ||
"10.3389/fbioe.2020.00209", # actually from CR | ||
"10.1000/2", | ||
"10.1000/3", # would exceed limit of 4 | ||
# caused issues in https://github.com/subugoe/metacheck/issues/181 | ||
"10.1007/s00330-019-06284-8", | ||
# caused issues in https://github.com/subugoe/metacheck/issues/181 | ||
"10.1007/s00431-018-3217-8", | ||
"10.3389/fmech.2020.566440/full" # superfluous url fragment | ||
) | ||
), | ||
biblids = biblids::doi_examples() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.