Skip to content

Commit

Permalink
Resolve CRAN errors
Browse files Browse the repository at this point in the history
Missing scare-quotes around "dataspice" in DESCRIPTION
Non-exported functions can't have \dontrun examples
Other weird stuff
  • Loading branch information
amoeba committed Oct 27, 2020
1 parent 758a2ac commit e4e34c4
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 92 deletions.
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Package: dataspice
Version: 1.0.0
Title: Create Lightweight Schema.org Descriptions of Data
Description: The goal of dataspice is to make it easier for researchers to
create basic, lightweight, and concise metadata files for their datasets.
These basic files can then be used to make useful information available during
analysis, create a helpful dataset "README" webpage, and produce more complex
metadata formats to aid dataset discovery. Metadata fields are based on
Description: The goal of 'dataspice' is to make it easier for researchers to
create basic, lightweight, and concise metadata files for their datasets.
These basic files can then be used to make useful information available during
analysis, create a helpful dataset "README" webpage, and produce more complex
metadata formats to aid dataset discovery. Metadata fields are based on
the 'Schema.org' and 'Ecological Metadata Language' standards.
Authors@R: c(
person("Carl", "Boettiger", role = c("aut"), comment = "https://github.com/cboettig"),
Expand Down
3 changes: 1 addition & 2 deletions R/eml_crosswalk.R
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ crosswalk <- function(doc, term) {
#' # Now fill in the attributes data.frame. See `EML::set_attributes`.
#'
#' # And last, set the attributes on our EML document
#'
#' eml_doc$dataset$dataTable[[1]]$attributeList <- EML::set_attributes(attributes)
#' eml_doc$dataset$dataTable[[1]]$attributeList <- EML::set_attributes(attributes)
#' }
crosswalk_variables <- function(spice) {
if (is.character(spice)) {
Expand Down
30 changes: 0 additions & 30 deletions R/eml_to_spice.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ get_access_spice <- function(x){
#'
#' @param eml (emld) an EML object
#' @param path (character) folder path for saving the table to disk
#'
#' @examples
#' \dontrun{
#' library(EML)
#'
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
#' eml <- read_eml(eml_path)
#' es_access(eml)
#' }
es_access <- function(eml, path = NULL) {
entities <- get_entities(eml)
access_entities <- lapply(entities, get_access_spice)
Expand Down Expand Up @@ -119,13 +110,6 @@ get_attributes_spice <- function(x) {
#'
#' @import dplyr
#' @importFrom readr write_csv
#'
#' @examples
#' \dontrun{
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
#' eml <- read_eml(eml_path)
#' es_attributes(eml)
#' }
es_attributes <- function(eml, path = NULL) {
entities <- get_entities(eml)
attrTables <- lapply(entities, get_attributes_spice)
Expand All @@ -149,13 +133,6 @@ es_attributes <- function(eml, path = NULL) {
#'
#' @param eml (emld) an EML object
#' @param path (character) folder path for saving the table to disk
#'
#' @examples
#' \dontrun{
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
#' eml <- read_eml(eml_path)
#' es_biblio(eml)
#' }
es_biblio <- function(eml, path = NULL) {
biblio_eml <- eml %>%
unlist() %>%
Expand Down Expand Up @@ -208,13 +185,6 @@ es_biblio <- function(eml, path = NULL) {
#' @importFrom purrr discard
#' @importFrom tibble enframe
#' @importFrom tidyr spread
#'
#' @examples
#' \dontrun{
#' eml_path <- system.file("example-dataset/broodTable_metadata.xml", package = "dataspice")
#' eml <- read_eml(eml_path)
#' es_creators(eml)
#' }
es_creators <- function(eml, path = NULL) {
people <- get_entities(eml,
entities = c("creator", "contact", "associatedParty", "metadataProvider"),
Expand Down
7 changes: 0 additions & 7 deletions R/jsonld_to_mustache.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ parse_GeoShape_points <- function(points) {
#' @param path (character) Path to file on disk to convert
#'
#' @return (list) Mustache-appropriate list
#'
#' @examples
#' \dontrun{
#' json_path <- "myjson.json"
#' data <- jsonld_to_mustache(json_path)
#' whisker::whisker_render("{{ keywords }}", data)
#' }
jsonld_to_mustache <- function(path) {
json <- jsonlite::read_json(path)

Expand Down
3 changes: 0 additions & 3 deletions R/prep.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#' @param ... parameters passed to `list.files()`. For example, use `recursive = TRUE`
#' to list files in a folder recursively or use `pattern` to filter files for patterns.
#' @return `prep_attributes()` updates the `attributes.csv` and writes to `attributes_path`.
#' `validate_file_paths()` returns a vector of valid file_paths detected from `data_path`.
#' @export
#' @examples
#' \dontrun{
Expand All @@ -31,8 +30,6 @@
#' # extract from a folder using folder path
#' data_path <- system.file("example-dataset", package = "dataspice")
#' prep_attributes(data_path)
#' # get vector of valid (existing) file paths
#' validate_file_paths(data_path)
#' }
prep_attributes <- function(data_path = "data",
attributes_path = "data/metadata/attributes.csv",
Expand Down
3 changes: 1 addition & 2 deletions man/crosswalk_variables.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions man/es_access.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions man/es_attributes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions man/es_biblio.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions man/es_creators.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions man/jsonld_to_mustache.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/prep_attributes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/validate_file_paths.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e4e34c4

Please sign in to comment.