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

Closed
wants to merge 8 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 @@ -138,6 +138,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
1 change: 1 addition & 0 deletions R/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
my_first_fcn.R
25 changes: 25 additions & 0 deletions R/my_first_fcn.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#' @name my_first_fcn.R
#'
#' @title Hello Admiral Function
#'
#' @param hw TRUE or FALSE
#'
#' @details First function to generate welcome message
#'
#' @return Happy Message
#'
#' @family der_adsl
#'
#' @keywords der_adsl
#'
#' @export
#'
#' @examples
#' hello_admiral(hw = FALSE)
hello_admiral <- function(hw = TRUE) {
if (hw) {
message("Welcome to the admiral family!")
} else {
message("Welcome to the admiral family!")
}
}
2 changes: 2 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ README
Rahal
Ratford
Romain
Rothstein
SCE
SCN
SCOPEN
Expand Down Expand Up @@ -249,6 +250,7 @@ admiralophtha
admiralvaccine
admiralxxx
adsl
adxx
alanine
aminotransferase
analyte
Expand Down
33 changes: 33 additions & 0 deletions man/my_first_fcn.R.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!\\n"
)
})

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

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