Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
Config/roxygen2/version: 8.0.0
2 changes: 1 addition & 1 deletion R/add_resource.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' The following properties are automatically set and can't be provided with
#' `...`: `name`, `data`, `path`, `schema`, `profile`, `format`, `mediatype`,
#' `encoding` and `dialect`.
#' @return `package` with one additional resource.
#' @returns `package` with one additional resource.
#' @family edit functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/check_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Check if an object is a non-empty data frame.
#'
#' @param data A data frame.
#' @return `data` invisibly or an error.
#' @returns `data` invisibly or an error.
#' @family check functions
#' @noRd
check_data <- function(data) {
Expand Down
2 changes: 1 addition & 1 deletion R/check_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Check if an object is a Data Package object with the required properties.
#'
#' @inheritParams read_resource
#' @return `package` invisibly or an error.
#' @returns `package` invisibly or an error.
#' @family check functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/check_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @param directory Directory to prepend to path.
#' @param safe Require `path` to be safe, i.e. no absolute or relative parent
#' paths.
#' @return Absolute path or URL or an error.
#' @returns Absolute path or URL or an error.
#' @family check functions
#' @noRd
check_path <- function(path, directory = NULL, safe = FALSE) {
Expand Down
2 changes: 1 addition & 1 deletion R/check_schema.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#'
#' @param schema List describing a Table Schema.
#' @param data A data frame against which the Table Schema must be compared.
#' @return `schema` invisibly or an error.
#' @returns `schema` invisibly or an error.
#' @family check functions
#' @noRd
check_schema <- function(schema, data = NULL) {
Expand Down
4 changes: 2 additions & 2 deletions R/col_types.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Creates a [readr::cols()] for all fields in a Table Schema.
#'
#' @inheritParams check_schema
#' @return A [readr::cols()] object.
#' @returns A [readr::cols()] object.
#' @family parse functions
#' @noRd
cols <- function(schema) {
Expand Down Expand Up @@ -33,7 +33,7 @@ cols <- function(schema) {
#' Creates a column specification for a specific field in a Table Schema.
#'
#' @param field Field in a Table schema.
#' @return A readr collector.
#' @returns A readr collector.
#' @family parse functions
#' @noRd
field_to_col <- function(field) {
Expand Down
12 changes: 6 additions & 6 deletions R/collectors.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Parse a string field
#'
#' @inheritParams col_number
#' @return A readr collector.
#' @returns A readr collector.
#' @family parse functions
#' @noRd
col_string <- function(enum) {
Expand All @@ -17,7 +17,7 @@ col_string <- function(enum) {
#' @param enum A field's `constraints.enum`.
#' @param group_char A field's `groupChar`.
#' @param bare_number A field's `bareNumber`.
#' @return A readr collector.
#' @returns A readr collector.
#' @family parse functions
#' @noRd
col_number <- function(enum, group_char, bare_number) {
Expand All @@ -35,7 +35,7 @@ col_number <- function(enum, group_char, bare_number) {
#' Parse an integer field
#'
#' @inheritParams col_number
#' @return A readr collector.
#' @returns A readr collector.
#' @family parse functions
#' @noRd
col_integer <- function(enum, bare_number) {
Expand All @@ -51,7 +51,7 @@ col_integer <- function(enum, bare_number) {
#' Parse a date field
#'
#' @inheritParams col_datetime
#' @return A readr collector.
#' @returns A readr collector.
#' @family parse functions
#' @noRd
col_date <- function(format) {
Expand All @@ -69,7 +69,7 @@ col_date <- function(format) {
#' Parse a time field
#'
#' @inheritParams col_datetime
#' @return A readr collector.
#' @returns A readr collector.
#' @family parse functions
#' @noRd
col_time <- function(format) {
Expand All @@ -87,7 +87,7 @@ col_time <- function(format) {
#' Parse a datetime field
#'
#' @param format A field's `format`.
#' @return A readr collector.
#' @returns A readr collector.
#' @family parse functions
#' @noRd
col_datetime <- function(format) {
Expand Down
2 changes: 1 addition & 1 deletion R/create_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#'
#' @param descriptor List to be made into a Data Package object.
#' If undefined, an empty Data Package will be created from scratch.
#' @return A Data Package object.
#' @returns A Data Package object.
#' @family create functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/create_schema.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' Data Package standard.
#'
#' @param data A data frame.
#' @return List describing a Table Schema.
#' @returns List describing a Table Schema.
#' @family create functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/example_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' - `2.0`: specified as a [Data Package v2](https://datapackage.org/).
#'
#' @param version Data Package standard version.
#' @return A Data Package object, see [create_package()].
#' @returns A Data Package object, see [create_package()].
#' @family sample data
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/locale.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' `decimal_mark`, `grouping_mark` and `encoding`.
#'
#' @inheritParams read_resource
#' @return A [readr::locale()] object.
#' @returns A [readr::locale()] object.
#' @family parse functions
#' @noRd
locale <- function(package, resource_name) {
Expand Down
2 changes: 1 addition & 1 deletion R/print.datapackage.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @param x Data Package object, as returned by [read_package()] or
#' [create_package()].
#' @param ... Further arguments, they are ignored by this function.
#' @return [print()] with a summary of the Data Package object.
#' @returns [print()] with a summary of the Data Package object.
#' @family print functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/read_from_path.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Read data from the path of a Data Resource
#'
#' @inheritParams read_resource
#' @return A [tibble::tibble()].
#' @returns A [tibble::tibble()].
#' @family read functions
#' @noRd
read_from_path <- function(package, resource_name, col_select) {
Expand Down
2 changes: 1 addition & 1 deletion R/read_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' Data Package standard.
#'
#' @param file Path or URL to a `datapackage.json` file.
#' @return A Data Package object, see [create_package()].
#' @returns A Data Package object, see [create_package()].
#' @family read functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/read_resource.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' @param col_select Character vector of the columns to include in the result,
#' in the order provided.
#' Selecting columns can improve read speed.
#' @return A [tibble::tibble()] with the Data Resource's tabular data.
#' @returns A [tibble::tibble()] with the Data Resource's tabular data.
#' If there are parsing problems, a warning will alert you.
#' You can retrieve the full details by calling [problems()] on your data
#' frame.
Expand Down
2 changes: 1 addition & 1 deletion R/remove_resource.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' described `resources`.
#'
#' @inheritParams read_resource
#' @return `package` with one fewer resource.
#' @returns `package` with one fewer resource.
#' @family edit functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/resource.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' described `resources`.
#'
#' @inheritParams read_resource
#' @return List describing a Data Resource, with new attribute `data_location`
#' @returns List describing a Data Resource, with new attribute `data_location`
#' to indicate how the data are attached.
#' If present, `path` will be updated to contain the full path(s).
#' @family accessor functions
Expand Down
2 changes: 1 addition & 1 deletion R/resource_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Lists the names of the Data Resources included in a Data Package.
#'
#' @inheritParams read_resource
#' @return Character vector with the Data Resource names.
#' @returns Character vector with the Data Resource names.
#' @family accessor functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/schema.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' See `vignette("table-schema")` to learn more about Table Schema.
#'
#' @inheritParams read_resource
#' @return List describing a Table Schema.
#' @returns List describing a Table Schema.
#' @family accessor functions
#' @export
#' @examples
Expand Down
10 changes: 5 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Get unique vector values sorted by how often they occur
#'
#' @param x Vector, e.g. `c("a", "b", "b", "b", "c", "a")`.
#' @return Vector with unique values sorted by most to least occurring,
#' @returns Vector with unique values sorted by most to least occurring,
#' e.g. `c("b", "a", "c")`.
#' @family helper functions
#' @noRd
Expand All @@ -27,7 +27,7 @@ unique_sorted <- function(x) {
#' @param x List or vector.
#' @param fun Function returning `TRUE` for elements that should be removed.
#' @param recursive Whether list should be cleaned recursively.
#' @return Cleaned list.
#' @returns Cleaned list.
#' @family helper functions
#' @noRd
clean_list <- function(x, fun = is.null, recursive = FALSE) {
Expand All @@ -46,7 +46,7 @@ clean_list <- function(x, fun = is.null, recursive = FALSE) {
#' Check if path is URL
#'
#' @param path Path.
#' @return `TRUE` if `path` is a http(s) or (s)ftp URL, otherwise `FALSE`.
#' @returns `TRUE` if `path` is a http(s) or (s)ftp URL, otherwise `FALSE`.
#' @family helper functions
#' @noRd
is_url <- function(path) {
Expand All @@ -58,7 +58,7 @@ is_url <- function(path) {
#' Returns descriptor `x` as is, or attempts to read JSON/YAML from path or URL.
#'
#' @inheritParams check_path
#' @return `x` (unchanged) or loaded JSON/YAML at path or URL.
#' @returns `x` (unchanged) or loaded JSON/YAML at path or URL.
#' @family helper functions
#' @noRd
read_descriptor <- function(x, directory = NULL, safe = FALSE) {
Expand All @@ -82,7 +82,7 @@ read_descriptor <- function(x, directory = NULL, safe = FALSE) {
#' Replicates the base function [...names()] available in R >= 4.0.0.
#'
#' @param ... objects, possibly named
#' @return A character vector of the names of the ... arguments
#' @returns A character vector of the names of the ... arguments
#' @noRd
get_dot_names <- function(...) {
# Get all the names from ...
Expand Down
2 changes: 1 addition & 1 deletion R/write_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' @param directory Path to local directory to write files to.
#' @param compress If `TRUE`, data of added resources will be gzip compressed
#' before being written to disk (e.g. `deployments.csv.gz`).
#' @return `package` invisibly, as written to file.
#' @returns `package` invisibly, as written to file.
#' @family write functions
#' @export
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/write_resource.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @inheritParams read_resource
#' @inheritParams write_package
#' @return Updated list describing a Data Resource, ready to be included in a
#' @returns Updated list describing a Data Resource, ready to be included in a
#' `datapackage.json`.
#' @family write functions
#' @noRd
Expand Down
4 changes: 2 additions & 2 deletions man/add_resource.Rd

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

4 changes: 2 additions & 2 deletions man/create_package.Rd

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

4 changes: 2 additions & 2 deletions man/create_schema.Rd

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

11 changes: 6 additions & 5 deletions man/frictionless-package.Rd

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

4 changes: 2 additions & 2 deletions man/read_package.Rd

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

4 changes: 2 additions & 2 deletions man/read_resource.Rd

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

4 changes: 2 additions & 2 deletions man/remove_resource.Rd

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

4 changes: 2 additions & 2 deletions man/resource_names.Rd

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

4 changes: 2 additions & 2 deletions man/schema.Rd

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

Loading
Loading