Skip to content

Commit

Permalink
add examples to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaszwagerman committed Oct 16, 2024
1 parent 08d8310 commit a37741c
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 17 deletions.
9 changes: 9 additions & 0 deletions R/catch.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
#'
#' @seealso [loupe()]
#'
#' @examples
#' df_caught <- butterfly::catch(
#' butterflycount$march,
#' butterflycount$february,
#' datetime_variable = "time"
#' )
#'
#' df_caught
#'
#' @export
catch <- function(df_current, df_previous, datetime_variable) {

Expand Down
15 changes: 15 additions & 0 deletions R/loupe.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@
#'
#' @returns A waldo object containing a message on differences or 'And there are no differences with previous data'.
#'
#' @examples
#' # This example contains no differences with previous data
#' butterfly::loupe(
#' butterflycount$february,
#' butterflycount$january,
#' datetime_variable = "time"
#' )
#'
#' # This example does contain differences with previous data
#' butterfly::loupe(
#' butterflycount$march,
#' butterflycount$february,
#' datetime_variable = "time"
#' )
#'
#' @export
loupe <- function(df_current, df_previous, datetime_variable) {

Expand Down
9 changes: 9 additions & 0 deletions R/release.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
#'
#' @seealso [loupe()]
#'
#' @examples
#' df_released <- butterfly::release(
#' butterflycount$march,
#' butterflycount$february,
#' datetime_variable = "time"
#' )
#'
#' df_released
#'
#' @export
release <- function(df_current, df_previous, datetime_variable) {

Expand Down
23 changes: 20 additions & 3 deletions man/catch.Rd

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

41 changes: 30 additions & 11 deletions man/loupe.Rd

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

23 changes: 20 additions & 3 deletions man/release.Rd

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

0 comments on commit a37741c

Please sign in to comment.