Skip to content

Commit e4e34c4

Browse files
committed
Resolve CRAN errors
Missing scare-quotes around "dataspice" in DESCRIPTION Non-exported functions can't have \dontrun examples Other weird stuff
1 parent 758a2ac commit e4e34c4

13 files changed

+7
-92
lines changed

DESCRIPTION

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Package: dataspice
22
Version: 1.0.0
33
Title: Create Lightweight Schema.org Descriptions of Data
4-
Description: The goal of dataspice is to make it easier for researchers to
5-
create basic, lightweight, and concise metadata files for their datasets.
6-
These basic files can then be used to make useful information available during
7-
analysis, create a helpful dataset "README" webpage, and produce more complex
8-
metadata formats to aid dataset discovery. Metadata fields are based on
4+
Description: The goal of 'dataspice' is to make it easier for researchers to
5+
create basic, lightweight, and concise metadata files for their datasets.
6+
These basic files can then be used to make useful information available during
7+
analysis, create a helpful dataset "README" webpage, and produce more complex
8+
metadata formats to aid dataset discovery. Metadata fields are based on
99
the 'Schema.org' and 'Ecological Metadata Language' standards.
1010
Authors@R: c(
1111
person("Carl", "Boettiger", role = c("aut"), comment = "https://github.com/cboettig"),

R/eml_crosswalk.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ crosswalk <- function(doc, term) {
247247
#' # Now fill in the attributes data.frame. See `EML::set_attributes`.
248248
#'
249249
#' # And last, set the attributes on our EML document
250-
#'
251-
#' eml_doc$dataset$dataTable[[1]]$attributeList <- EML::set_attributes(attributes)
250+
#' eml_doc$dataset$dataTable[[1]]$attributeList <- EML::set_attributes(attributes)
252251
#' }
253252
crosswalk_variables <- function(spice) {
254253
if (is.character(spice)) {

R/eml_to_spice.R

-30
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ get_access_spice <- function(x){
3333
#'
3434
#' @param eml (emld) an EML object
3535
#' @param path (character) folder path for saving the table to disk
36-
#'
37-
#' @examples
38-
#' \dontrun{
39-
#' library(EML)
40-
#'
41-
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
42-
#' eml <- read_eml(eml_path)
43-
#' es_access(eml)
44-
#' }
4536
es_access <- function(eml, path = NULL) {
4637
entities <- get_entities(eml)
4738
access_entities <- lapply(entities, get_access_spice)
@@ -119,13 +110,6 @@ get_attributes_spice <- function(x) {
119110
#'
120111
#' @import dplyr
121112
#' @importFrom readr write_csv
122-
#'
123-
#' @examples
124-
#' \dontrun{
125-
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
126-
#' eml <- read_eml(eml_path)
127-
#' es_attributes(eml)
128-
#' }
129113
es_attributes <- function(eml, path = NULL) {
130114
entities <- get_entities(eml)
131115
attrTables <- lapply(entities, get_attributes_spice)
@@ -149,13 +133,6 @@ es_attributes <- function(eml, path = NULL) {
149133
#'
150134
#' @param eml (emld) an EML object
151135
#' @param path (character) folder path for saving the table to disk
152-
#'
153-
#' @examples
154-
#' \dontrun{
155-
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
156-
#' eml <- read_eml(eml_path)
157-
#' es_biblio(eml)
158-
#' }
159136
es_biblio <- function(eml, path = NULL) {
160137
biblio_eml <- eml %>%
161138
unlist() %>%
@@ -208,13 +185,6 @@ es_biblio <- function(eml, path = NULL) {
208185
#' @importFrom purrr discard
209186
#' @importFrom tibble enframe
210187
#' @importFrom tidyr spread
211-
#'
212-
#' @examples
213-
#' \dontrun{
214-
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
215-
#' eml <- read_eml(eml_path)
216-
#' es_creators(eml)
217-
#' }
218188
es_creators <- function(eml, path = NULL) {
219189
people <- get_entities(eml,
220190
entities = c("creator", "contact", "associatedParty", "metadataProvider"),

R/jsonld_to_mustache.R

-7
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ parse_GeoShape_points <- function(points) {
5656
#' @param path (character) Path to file on disk to convert
5757
#'
5858
#' @return (list) Mustache-appropriate list
59-
#'
60-
#' @examples
61-
#' \dontrun{
62-
#' json_path <- "myjson.json"
63-
#' data <- jsonld_to_mustache(json_path)
64-
#' whisker::whisker_render("{{ keywords }}", data)
65-
#' }
6659
jsonld_to_mustache <- function(path) {
6760
json <- jsonlite::read_json(path)
6861

R/prep.R

-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#' @param ... parameters passed to `list.files()`. For example, use `recursive = TRUE`
1414
#' to list files in a folder recursively or use `pattern` to filter files for patterns.
1515
#' @return `prep_attributes()` updates the `attributes.csv` and writes to `attributes_path`.
16-
#' `validate_file_paths()` returns a vector of valid file_paths detected from `data_path`.
1716
#' @export
1817
#' @examples
1918
#' \dontrun{
@@ -31,8 +30,6 @@
3130
#' # extract from a folder using folder path
3231
#' data_path <- system.file("example-dataset", package = "dataspice")
3332
#' prep_attributes(data_path)
34-
#' # get vector of valid (existing) file paths
35-
#' validate_file_paths(data_path)
3633
#' }
3734
prep_attributes <- function(data_path = "data",
3835
attributes_path = "data/metadata/attributes.csv",

man/crosswalk_variables.Rd

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/es_access.Rd

-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/es_attributes.Rd

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/es_biblio.Rd

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/es_creators.Rd

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/jsonld_to_mustache.Rd

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/prep_attributes.Rd

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/validate_file_paths.Rd

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)