Skip to content

Commit

Permalink
Further tweaks to version doc and how it is invoked in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kuriwaki committed Oct 16, 2024
1 parent 313179f commit 9f3010e
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 20 deletions.
1 change: 0 additions & 1 deletion R/get_dataframe.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#' `.tab` files so if `original = FALSE`, `.f` is set to `readr::read_tsv`.
#'
#' @inheritDotParams get_file
#' @template version
#'
#' @return A R object that is returned by the default or user-supplied function
#' `.f` argument. For example, if `.f = readr::read_tsv()`, the function will
Expand Down
2 changes: 2 additions & 0 deletions R/get_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#' @template envvars
#' @template dots
#' @template ds
#' @template version
#'
#' @return \code{get_file} returns a raw vector (or list of raw vectors,
#' if \code{length(file) > 1}), which can be saved locally with the `writeBin`
Expand Down Expand Up @@ -89,6 +90,7 @@ get_file <- function(
key = Sys.getenv("DATAVERSE_KEY"),
server = Sys.getenv("DATAVERSE_SERVER"),
original = TRUE,
version = ":latest",
...
) {

Expand Down
5 changes: 3 additions & 2 deletions man-roxygen/version.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
#' This can be of the form `"1.1"` or `"1"` (where in `"x.y"`, x is a major
#' version and y is an optional minor version), or
#' `":latest"` (the default, the latest published version).
#' In lieu of this, a dataset's version-specific identification number can be
#' used for the `dataset` argument. We recommend using the number format so that
#' We recommend using the number format so that
#' the function stores a cache of the data (See \code{\link{cache_dataset}}).
#' If the user specifies a `key` or `DATAVERSE_KEY` argument, they can access the
#' draft version by `":draft"` (the current draft) or `":latest"` (which will
#' prioritize the draft over the latest published version.
#' A dataset's version-specific identification number can be
#' used for the `dataset` argument as well to avoid the `version` argument.
7 changes: 4 additions & 3 deletions man/cache.Rd

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

13 changes: 13 additions & 0 deletions man/files.Rd

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

22 changes: 11 additions & 11 deletions man/get_dataframe.Rd

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

7 changes: 4 additions & 3 deletions man/get_dataset.Rd

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

0 comments on commit 9f3010e

Please sign in to comment.