diff --git a/NEWS.md b/NEWS.md index 788b98978f..2cada3b972 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ ## New Features +- Function `my_first_fcn()` created as part of on boarding task + ## Updates of Existing Functions - The functions `derive_param_bmi()` and `derive_param_bsa()` are updated to have the option of producing more values at visits when only weight is collected (#1228). @@ -1129,3 +1131,4 @@ to specify the unit of the input age (#569) - [Creating a BDS Finding ADaM](https://pharmaverse.github.io/admiral/cran-release/articles/bds_finding.html) - [Creating an OCCDS ADaM](https://pharmaverse.github.io/admiral/cran-release/articles/occds.html) + diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R new file mode 100644 index 0000000000..f9936c9a7a --- /dev/null +++ b/R/my_first_fcn.R @@ -0,0 +1,6 @@ +#' Created dummy function +#' +#' Outputs "Welcome to the admiral family!" +#' +#' @details returns a welcome greeting +hello_admiral <- function() {{ message("Welcome to the admiral family!") }} diff --git a/man/hello_admiral.Rd b/man/hello_admiral.Rd new file mode 100644 index 0000000000..1bf4f22378 --- /dev/null +++ b/man/hello_admiral.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/my_first_fcn.R +\name{hello_admiral} +\alias{hello_admiral} +\title{Created dummy function} +\usage{ +hello_admiral() +} +\description{ +Outputs "Welcome to the admiral family!" +} +\details{ +returns a welcome greeting +} diff --git a/renv.lock b/renv.lock index 6617448390..626807b6ba 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.1.3", + "Version": "4.0.5", "Repositories": [ { "Name": "CRAN", @@ -483,18 +483,6 @@ "Repository": "RSPM", "Hash": "77bd60a6157420d4ffa93b27cf6a58b8" }, - "fontawesome": { - "Package": "fontawesome", - "Version": "0.2.2", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "htmltools", - "rlang" - ], - "Hash": "55624ed409e46c5f358b2c060be87f67" - }, "fs": { "Package": "fs", "Version": "1.5.2", @@ -631,21 +619,6 @@ ], "Hash": "76147821cd3fcd8c4b04e1ef0498e7fb" }, - "httpuv": { - "Package": "httpuv", - "Version": "1.6.5", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "Rcpp", - "later", - "promises", - "utils" - ], - "Hash": "97fe71f0a4a1c9890e6c2128afa04bc0" - }, "httr": { "Package": "httr", "Version": "1.4.2", @@ -815,18 +788,6 @@ ], "Hash": "18e9c28c1d3ca1560ce30658b22ce104" }, - "miniUI": { - "Package": "miniUI", - "Version": "0.1.1.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "htmltools", - "shiny", - "utils" - ], - "Hash": "fec5f52652d60615fdb3957b3d74324a" - }, "openssl": { "Package": "openssl", "Version": "2.0.0", @@ -1198,50 +1159,6 @@ ], "Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f" }, - "shiny": { - "Package": "shiny", - "Version": "1.7.1", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "R6", - "bslib", - "cachem", - "commonmark", - "crayon", - "ellipsis", - "fastmap", - "fontawesome", - "glue", - "grDevices", - "htmltools", - "httpuv", - "jsonlite", - "later", - "lifecycle", - "methods", - "mime", - "promises", - "rlang", - "sourcetools", - "tools", - "utils", - "withr", - "xtable" - ], - "Hash": "00344c227c7bd0ab5d78052c5d736c44" - }, - "sourcetools": { - "Package": "sourcetools", - "Version": "0.1.7", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R" - ], - "Hash": "947e4e02a79effa5d512473e10f41797" - }, "spelling": { "Package": "spelling", "Version": "2.2", @@ -1594,18 +1511,6 @@ ], "Hash": "6c85f015dee9cc7710ddd20f86881f58" }, - "xtable": { - "Package": "xtable", - "Version": "1.8-4", - "Source": "Repository", - "Repository": "RSPM", - "Requirements": [ - "R", - "stats", - "utils" - ], - "Hash": "b8acdf8af494d9ec19ccb2481a9b11c2" - }, "yaml": { "Package": "yaml", "Version": "2.3.5", diff --git a/tests/testthat/test-my_first_fcn.R b/tests/testthat/test-my_first_fcn.R new file mode 100644 index 0000000000..f98d4cb509 --- /dev/null +++ b/tests/testthat/test-my_first_fcn.R @@ -0,0 +1,7 @@ +## Test 1: hello_admiral() function greets ---- +test_that("my_first_fcn Test 1: hello_admiral function greets", { + expect_message( + hello_admiral(), + "Welcome to the admiral family!" + ) +})