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 #2471

Closed
wants to merge 3 commits 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 @@ -137,6 +137,7 @@ export(get_not_mapped)
export(get_one_to_many_dataset)
export(get_summary_records)
export(get_vars_query)
export(hello_admiral)
export(impute_dtc_dt)
export(impute_dtc_dtm)
export(lastalive_censor)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## New Features

- Created function `hello_admiral()` as part of onboarding task. (#1839)

## Updates of Existing Functions

## Breaking Changes
Expand Down
21 changes: 21 additions & 0 deletions R/my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#' Derive Extension Example
#'
#' Says hello admiral
#'
#' @param hw TRUE or FALSE
#'
#' @author Anders
#'
#' @return Happy Message
#'
#' @export
#'
#' @examples
#' hello_admiral(hw = FALSE)
hello_admiral <- function(hw = TRUE) {
if (hw) {
message("Welcome to the admiral family hw!")
} else {
message("Welcome to the admiral family!")
}
}
5 changes: 2 additions & 3 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Akinyi
Alanine
Alkalosis
Analyte
Anders
Ania
Asha
Aspartate
BDS
BILI
Expand All @@ -61,7 +61,6 @@ CTCAEV
CTCAEv
CVD
Carlucci
Chakma
Cheatsheet
Chemistries
Chol
Expand Down Expand Up @@ -96,7 +95,6 @@ Fibrinogen
Findability
Framingham
Franciszek
Francois
Fridericia
Fridericia's
Fujimoto
Expand Down Expand Up @@ -304,6 +302,7 @@ modularized
msec
nd
occds
onboarding
onwards
parttime
pharmaverse
Expand Down
23 changes: 23 additions & 0 deletions man/hello_admiral.Rd

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

20 changes: 20 additions & 0 deletions tests/testthat/test-my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
test_that("hello admiral greets without hw", {
expect_message(
hello_admiral(),
"^Welcome to the admiral family hw!\\n"
)
})

test_that("hello admiral greets with hm", {
expect_message(
hello_admiral(hw = TRUE),
"^Welcome to the admiral family hw!\\n"
)
})

test_that("hello admiral greets with hw", {
expect_message(
hello_admiral(hw = FALSE),
"^Welcome to the admiral family!\\n"
)
})
Loading