Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #1839 dummy function created #2537

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export(list_all_templates)
export(list_tte_source_objects)
export(max_cond)
export(min_cond)
export(my_first_fcn)
export(negate_vars)
export(params)
export(print_named_list)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
`AVALCATx` & `AVALCAxN`. (#2480)
- New function `derive_vars_crit_flag()` for deriving criterion flag variables
(`CRITy`, `CRITyFL`, `CRITyFLN`). (#2468)
- New function `my_first_fcn()` as dummy practice. (#1839)

- Replace use of `data("sdtm")` with `sdtm <- pharmaverse::sdtm` in templates and vignettes. (#2498)

Expand Down
16 changes: 16 additions & 0 deletions R/my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#' Print a Greeting Message
#'
#' Prints a fixed greeting `message`.
#'
#' @return No return value (`NULL`).
#'
#' @keywords other_advanced
#' @family other_advanced
#'
#' @export
#'
#' @examples
#' my_first_fcn()
my_first_fcn <- function() {
message("Welcome to the admiral family!")
}
1 change: 1 addition & 0 deletions man/list_tte_source_objects.Rd

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

24 changes: 24 additions & 0 deletions man/my_first_fcn.Rd

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

3 changes: 2 additions & 1 deletion man/params.Rd

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

10 changes: 10 additions & 0 deletions tests/testthat/test-my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# my_first_fcn ----
## Test 1: returns NULL ----
test_that("my_first_fcn Test 1: returns NULL", {
expect_null(my_first_fcn())
})

## Test 2: produces a message ----
test_that("my_first_fcn Test 2: produces a message", {
expect_message(my_first_fcn(), "^Welcome to the admiral family!\\n$")
})
Loading