man-roxygen/class_schema_methods.R

# class_schema_methods.R


#' @name Schema-methods
#'
#' @title
#' Schema: various methods for objects of class Schema
#'
#' @description
#' Some usual \R methods for objects of class [`Schema`][Schema-class].
#'
#' @param x a [`Schema`][Schema-class] object.
#' @param ... additional arguments to be passed to or from methods.
#'
#' @return
#' Return value depends on the function used.
#' * [format()] returns a character vector.
#' * [length()] returns an integer.
#' * [names()] returns a character vector.
#' * [as.data.table.Schema()] returns a [`data.table`][data.table::data.table()]
#' object. See details.
#'
#' @details
#' [as.data.table.Schema()] coerces a [`Schema`][Schema-class] object to a
#' [`data.table`][data.table::data.table()]. This creates a new
#' [`data.table`][data.table::data.table()] with a structure based on the
#' underlying [`Schema`][Schema-class]. Values stored as `archetype`(s)
#' are used to populate the table.
#'
#' @family Schema
jeanmathieupotvin/cargo documentation built on Oct. 27, 2020, 5:22 p.m.