Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed Jul 23, 2023
1 parent 6517672 commit 51be232
Show file tree
Hide file tree
Showing 10 changed files with 159 additions and 55 deletions.
7 changes: 6 additions & 1 deletion R/incorporate.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
#' info text, etc.) and we can print the *informant* object or use the
#' [get_informant_report()] function to see the information report.
#'
#' @param informant An informant object of class `ptblank_informant`.
#' @param informant *The pointblank informant object*
#'
#' `obj:<ptblank_informant>` // **required**
#'
#' A **pointblank** *informant* object that is commonly created through the
#' use of the [create_informant()] function.
#'
#' @return A `ptblank_informant` object.
#'
Expand Down
43 changes: 37 additions & 6 deletions R/info_add.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
#' text*."`), we can add more information that makes sense for describing the
#' table as a whole.
#'
#' @param x An informant object of class `ptblank_informant`.
#' @param x *The pointblank informant object*
#'
#' `obj:<ptblank_informant>` // **required**
#'
#' A **pointblank** *informant* object that is commonly created through the
#' use of the [create_informant()] function.
#'
#' @param ... Information entries as a series of named arguments. The names
#' refer to subsection titles within the `TABLE` section and the values are
Expand Down Expand Up @@ -226,7 +231,12 @@ info_tabular <- function(
#' series of named arguments (in the form `entry_name = "The *info text*."`)
#' serves as additional information for the column or columns.
#'
#' @param x An informant object of class `ptblank_informant`.
#' @param x *The pointblank informant object*
#'
#' `obj:<ptblank_informant>` // **required**
#'
#' A **pointblank** *informant* object that is commonly created through the
#' use of the [create_informant()] function.
#'
#' @param columns The column or set of columns to focus on. Can be defined as a
#' column name in quotes (e.g., `"<column_name>"`), one or more column names
Expand Down Expand Up @@ -496,9 +506,16 @@ info_columns <- function(
#' of the informant) will have a new entry for the `"info"` property. Empty or
#' missing info text will be pruned from `tbl`.
#'
#' @param x An informant object of class `ptblank_informant`.
#' @param x *The pointblank informant object*
#'
#' `obj:<ptblank_informant>` // **required**
#'
#' A **pointblank** *informant* object that is commonly created through the
#' use of the [create_informant()] function.
#'
#' @param tbl The two-column data frame which contains metadata about the target
#' table in the informant object.
#' table in the informant object.
#'
#' @param .add Should new text be added to existing text? This is `TRUE` by
#' default; setting to `FALSE` replaces any existing text for the `"info"`
#' property.
Expand Down Expand Up @@ -668,9 +685,16 @@ check_info_columns_tbl <- function(tbl) {
#' named arguments (in the form `entry_name = "The *info text*."`) to build the
#' informational content for that section.
#'
#' @param x An informant object of class `ptblank_informant`.
#' @param x *The pointblank informant object*
#'
#' `obj:<ptblank_informant>` // **required**
#'
#' A **pointblank** *informant* object that is commonly created through the
#' use of the [create_informant()] function.
#'
#' @param section_name The name of the section for which this information
#' pertains.
#'
#' @param ... Information entries as a series of named arguments. The names
#' refer to subsection titles within the section defined as `section_name` and
#' the RHS is the *info text* (informational text that can be written as
Expand Down Expand Up @@ -895,10 +919,17 @@ info_section <- function(
#' with just the `snippet_name` inside (e.g., `"This column has {n_cat}
#' categories."`).
#'
#' @param x An informant object of class `ptblank_informant`.
#' @param x *The pointblank informant object*
#'
#' `obj:<ptblank_informant>` // **required**
#'
#' A **pointblank** *informant* object that is commonly created through the
#' use of the [create_informant()] function.
#'
#' @param snippet_name The name for snippet, which is used for interpolating the
#' result of the snippet formula into *info text* defined by an `info_*()`
#' function.
#'
#' @param fn A formula that obtains a snippet of data from the target table.
#' It's best to use a leading dot (`.`) that stands for the table itself and
#' use pipes to construct a series of operations to be performed on the table
Expand Down
57 changes: 38 additions & 19 deletions R/interrogate.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,48 @@
#' A **pointblank** *agent* object that is commonly created through the use of
#' the [create_agent()] function.
#'
#' @param extract_failed An option to collect rows that didn't pass a particular
#' validation step. The default is `TRUE` and further options allow for fine
#' control of how these rows are collected.
#' @param extract_failed *Collect failed rows as data extracts*
#'
#' `scalar<logical>` // *default:* `TRUE`
#'
#' An option to collect rows that didn't pass a particular validation step.
#' The default is `TRUE` and further options allow for fine control of how
#' these rows are collected.
#'
#' @param get_first_n If the option to collect non-passing rows is chosen, there
#' is the option here to collect the first `n` rows here. Supply the number of
#' rows to extract from the top of the non-passing rows table (the ordering of
#' data from the original table is retained).
#' @param get_first_n *Get the first n values*
#'
#' `scalar<integer>` // *default:* `NULL` (`optional`)
#'
#' If the option to collect non-passing rows is chosen, there is the option
#' here to collect the first `n` rows here. Supply the number of rows to
#' extract from the top of the non-passing rows table (the ordering of data
#' from the original table is retained).
#'
#' @param sample_n If the option to collect non-passing rows is chosen, this
#' option allows for the sampling of `n` rows. Supply the number of rows to
#' sample from the non-passing rows table. If `n` is greater than the number
#' of non-passing rows, then all the rows will be returned.
#' @param sample_n *Sample n values*
#'
#' `scalar<integer>` // *default:* `NULL` (`optional`)
#'
#' If the option to collect non-passing rows is chosen, this option allows for
#' the sampling of `n` rows. Supply the number of rows to sample from the
#' non-passing rows table. If `n` is greater than the number of non-passing
#' rows, then all the rows will be returned.
#'
#' @param sample_frac If the option to collect non-passing rows is chosen, this
#' option allows for the sampling of a fraction of those rows. Provide a
#' number in the range of `0` and `1`. The number of rows to return may be
#' extremely large (and this is especially when querying remote databases),
#' however, the `sample_limit` option will apply a hard limit to the returned
#' rows.
#' @param sample_frac *Sample a fraction of values*
#'
#' `scalar<numeric>` // *default:* `NULL` (`optional`)
#'
#' If the option to collect non-passing rows is chosen, this option allows for
#' the sampling of a fraction of those rows. Provide a number in the range of
#' `0` and `1`. The number of rows to return may be extremely large (and this
#' is especially when querying remote databases), however, the `sample_limit`
#' option will apply a hard limit to the returned rows.
#'
#' @param sample_limit A value that limits the possible number of rows returned
#' when sampling non-passing rows using the `sample_frac` option.
#' @param sample_limit *Row limit for sampling*
#'
#' `scalar<integer>` // *default:* `5000`
#'
#' A value that limits the possible number of rows returned when sampling
#' non-passing rows using the `sample_frac` option.
#'
#' @return A `ptblank_agent` object.
#'
Expand Down
7 changes: 6 additions & 1 deletion man/incorporate.Rd

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

7 changes: 6 additions & 1 deletion man/info_columns.Rd

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

7 changes: 6 additions & 1 deletion man/info_columns_from_tbl.Rd

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

7 changes: 6 additions & 1 deletion man/info_section.Rd

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

7 changes: 6 additions & 1 deletion man/info_snippet.Rd

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

7 changes: 6 additions & 1 deletion man/info_tabular.Rd

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

65 changes: 42 additions & 23 deletions man/interrogate.Rd

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

0 comments on commit 51be232

Please sign in to comment.