diff --git a/NAMESPACE b/NAMESPACE index ec210d2..82b54bb 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,5 @@ # Generated by roxygen2: do not edit by hand -export(available_versions) export(compute_abundances) export(compute_concentration_bins_CPR_n) export(compute_concentrations) @@ -14,6 +13,7 @@ export(filter_by_polygon) export(filter_by_species) export(filter_by_year) export(geom_basemap) +export(get_available_versions) export(get_current_version) export(get_ocean_names) export(get_required_columns) diff --git a/R/available_versions.R b/R/get_available_versions.R similarity index 93% rename from R/available_versions.R rename to R/get_available_versions.R index 4175418..978a565 100644 --- a/R/available_versions.R +++ b/R/get_available_versions.R @@ -13,9 +13,9 @@ #' @examples #' ## Versions of the FORCIS database ---- #' -#' available_versions() +#' get_available_versions() -available_versions <- function(record_id = zen_record_id()) { +get_available_versions <- function(record_id = zen_record_id()) { ## Check argument ---- diff --git a/R/get_version_info.R b/R/get_version_info.R index e911fdf..e532828 100644 --- a/R/get_version_info.R +++ b/R/get_version_info.R @@ -4,8 +4,8 @@ #' in the Zenodo database. #' #' @param version a `character` of length 1. The label of the version. Use -#' [available_versions()] to list available versions. If `NULL` (default) the -#' latest version is used. +#' [get_available_versions()] to list available versions. If `NULL` (default) +#' the latest version is used. #' #' @return A `list` with all information about the version, including: `title`, #' `doi`, `publication_date`, `description`, `access_right`, `creators`, @@ -56,7 +56,7 @@ get_version_info <- function(record_id = zen_record_id(), version = NULL) { if (length(pos) == 0) { stop("The required version is not available. Please run ", - "'available_versions()' to list available versions.") + "'get_available_versions()' to list available versions.") } } diff --git a/R/internals.R b/R/internals.R index 0b1c005..baa61be 100644 --- a/R/internals.R +++ b/R/internals.R @@ -736,7 +736,7 @@ set_zen_version <- function(version, ask = TRUE) { check_zen_version(version) - versions <- available_versions() + versions <- get_available_versions() latest_version <- get_zen_latest_version() if (is.null(version)) { @@ -753,7 +753,8 @@ set_zen_version <- function(version, ask = TRUE) { if (!(version %in% versions$"version")) { stop("The required version is not available. Please run ", - "'available_versions()' to list available versions.", call. = FALSE) + "'get_available_versions()' to list available versions.", + call. = FALSE) } } @@ -792,7 +793,7 @@ set_zen_version <- function(version, ask = TRUE) { get_zen_latest_version <- function() { - versions <- available_versions() + versions <- get_available_versions() versions[which.max(as.Date(versions$"publication_date")), "version"] } diff --git a/man/available_versions.Rd b/man/get_available_versions.Rd similarity index 74% rename from man/available_versions.Rd rename to man/get_available_versions.Rd index b0ee500..2934cb8 100644 --- a/man/available_versions.Rd +++ b/man/get_available_versions.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/available_versions.R -\name{available_versions} -\alias{available_versions} +% Please edit documentation in R/get_available_versions.R +\name{get_available_versions} +\alias{get_available_versions} \title{Retrieve all versions of a Zenodo repository} \usage{ -available_versions(record_id = zen_record_id()) +get_available_versions(record_id = zen_record_id()) } \arguments{ \item{record_id}{a \code{character} of length 1. The identifier of the repository @@ -24,5 +24,5 @@ Retrieve all versions of a Zenodo repository \examples{ ## Versions of the FORCIS database ---- -available_versions() +get_available_versions() } diff --git a/man/get_version_info.Rd b/man/get_version_info.Rd index c2edf3b..238720c 100644 --- a/man/get_version_info.Rd +++ b/man/get_version_info.Rd @@ -11,8 +11,8 @@ get_version_info(record_id = zen_record_id(), version = NULL) in the Zenodo database.} \item{version}{a \code{character} of length 1. The label of the version. Use -\code{\link[=available_versions]{available_versions()}} to list available versions. If \code{NULL} (default) the -latest version is used.} +\code{\link[=get_available_versions]{get_available_versions()}} to list available versions. If \code{NULL} (default) +the latest version is used.} } \value{ A \code{list} with all information about the version, including: \code{title},