From 2a31e61765dcffb714557be8402dd08227a6f041 Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 10 Oct 2024 04:38:57 +0200 Subject: [PATCH 01/15] git commit for creating new file --- R/my_first_fcn.R | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 R/my_first_fcn.R diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R new file mode 100644 index 0000000000..e69de29bb2 From 589ab99e785954d4caf9802c5fe8d31edd30710a Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 10 Oct 2024 04:38:57 +0200 Subject: [PATCH 02/15] #1839 new file created --- R/my_first_fcn.R | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 R/my_first_fcn.R diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R new file mode 100644 index 0000000000..e69de29bb2 From fb5d6e6d12d786f9278f45ea269ae7ff867256c2 Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 17 Oct 2024 02:23:43 +0200 Subject: [PATCH 03/15] #1839 new function 'my_first_fcn' created --- R/my_first_fcn.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R index e69de29bb2..17cd88881e 100644 --- a/R/my_first_fcn.R +++ b/R/my_first_fcn.R @@ -0,0 +1,3 @@ +my_first_fcn <- function() { + print("Welcome to the admiral family!") +} From 48969668516fea27b4526ecdcb1b091851fee983 Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 17 Oct 2024 02:36:55 +0200 Subject: [PATCH 04/15] #1839 Roxygen skelton inserted --- R/my_first_fcn.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R index 17cd88881e..f51cf6a1dc 100644 --- a/R/my_first_fcn.R +++ b/R/my_first_fcn.R @@ -1,3 +1,13 @@ + +#' my_first_fcn +#' +#' @return +#' This function returns the Character "Welcome to the admiral family!". +#' +#' @export +#' +#' @examples +#' my_first_fcn() ## returns "Welcome to the admiral family!" my_first_fcn <- function() { print("Welcome to the admiral family!") } From 4b506f051799c0fbf08bc3ed859670320043a15b Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 17 Oct 2024 02:49:35 +0200 Subject: [PATCH 05/15] #1839 print() removed --- R/my_first_fcn.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R index f51cf6a1dc..fefa9607e9 100644 --- a/R/my_first_fcn.R +++ b/R/my_first_fcn.R @@ -9,5 +9,5 @@ #' @examples #' my_first_fcn() ## returns "Welcome to the admiral family!" my_first_fcn <- function() { - print("Welcome to the admiral family!") + "Welcome to the admiral family!" } From fd81db83bf8d40b22ac5386df993af4415da6d9e Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 17 Oct 2024 03:13:20 +0200 Subject: [PATCH 06/15] #1839 DESCRIPTION modified --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8179ca0bb5..8cedc3e037 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,7 +27,8 @@ Authors@R: c( person("Kangjie", "Zhang", role = "aut"), person("Zelos", "Zhu", role = "aut"), person("F. Hoffmann-La Roche AG", role = c("cph", "fnd")), - person("GlaxoSmithKline LLC", role = c("cph", "fnd")) + person("GlaxoSmithKline LLC", role = c("cph", "fnd")), + person("Shunsuke", "Goto", role = "aut") ) Description: A toolbox for programming Clinical Data Interchange Standards Consortium (CDISC) compliant Analysis Data Model (ADaM) datasets in R. From c06fe226c74cb7e77fa7bb4e273dac7ab611d10f Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 17 Oct 2024 03:54:31 +0200 Subject: [PATCH 07/15] #1839 unit test created --- tests/testthat/test-my_first_fcn.R | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/testthat/test-my_first_fcn.R diff --git a/tests/testthat/test-my_first_fcn.R b/tests/testthat/test-my_first_fcn.R new file mode 100644 index 0000000000..1d49323830 --- /dev/null +++ b/tests/testthat/test-my_first_fcn.R @@ -0,0 +1,9 @@ +# my_first_fcn ---- +## Test 1: ---- +test_that("multiplication works", { + expected_output <- "Welcome to the admiral family!" + + actual_output <- my_first_fcn() + + expect_equal(expected_output, actual_output) +}) From c3f141a475b316d8356bd795b28c4f0fd6a69b96 Mon Sep 17 00:00:00 2001 From: Shunsuke Goto Date: Thu, 17 Oct 2024 02:43:59 +0000 Subject: [PATCH 08/15] #1839 tidyverse style set --- R/my_first_fcn.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R index fefa9607e9..868629de9a 100644 --- a/R/my_first_fcn.R +++ b/R/my_first_fcn.R @@ -1,4 +1,3 @@ - #' my_first_fcn #' #' @return From 2fbca0bb978fb3feec0de2907b6f0b036051a878 Mon Sep 17 00:00:00 2001 From: Shunsuke Goto Date: Thu, 17 Oct 2024 02:47:26 +0000 Subject: [PATCH 09/15] #1839 NAMESPACE and .Rd files updated --- NAMESPACE | 1 + man/admiral-package.Rd | 1 + 2 files changed, 2 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 9bab92b1cf..47114d4e37 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) diff --git a/man/admiral-package.Rd b/man/admiral-package.Rd index a1539a481d..aeaceee83f 100644 --- a/man/admiral-package.Rd +++ b/man/admiral-package.Rd @@ -47,6 +47,7 @@ Authors: \item Phillip Webster \item Kangjie Zhang \item Zelos Zhu + \item Shunsuke Goto } Other contributors: From 36ad14338bb332b9dbdb15fbbbfc4287bef85f86 Mon Sep 17 00:00:00 2001 From: Shunsuke Goto Date: Thu, 17 Oct 2024 02:52:38 +0000 Subject: [PATCH 10/15] #1839 NEWS updated --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 91fb0405c8..7948f14d60 100644 --- a/NEWS.md +++ b/NEWS.md @@ -62,6 +62,8 @@ again. (#2462) - New `country_code_lookup()` metadata added to decode countries based on [ISO 3166 codes](https://www.iso.org/iso-3166-country-codes.html). (#2388) +- Added function `my_first_fcn()` (#1839). + ## Updates of Existing Functions - `group_var` (optional) parameter is added to `derive_var_trtemfl()` to derive `TRTEMFL` for AE data if the data are collected as one episode of AE with multiple lines. (#2302) From bfa36cc41584fac5f0274ba1437471862e51f96b Mon Sep 17 00:00:00 2001 From: Shunsuke Goto Date: Thu, 17 Oct 2024 06:21:59 +0000 Subject: [PATCH 11/15] #1839 roxygen added --- R/my_first_fcn.R | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R index 868629de9a..95244a3015 100644 --- a/R/my_first_fcn.R +++ b/R/my_first_fcn.R @@ -1,5 +1,14 @@ #' my_first_fcn #' +#' my first function +#' +#' @details +#' This is a function created as dummy. +#' +#' @keywords my_first_fcn +#' +#' @family my_first_fcn +#' #' @return #' This function returns the Character "Welcome to the admiral family!". #' From 33921aa5d56410ca2c07a47ed5ca4fe96ec62cc3 Mon Sep 17 00:00:00 2001 From: Shunsuke Goto Date: Thu, 17 Oct 2024 06:22:37 +0000 Subject: [PATCH 12/15] #1839 man/my_first_fcn.Rd created --- man/my_first_fcn.Rd | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 man/my_first_fcn.Rd diff --git a/man/my_first_fcn.Rd b/man/my_first_fcn.Rd new file mode 100644 index 0000000000..7a6fcdcff5 --- /dev/null +++ b/man/my_first_fcn.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/my_first_fcn.R +\name{my_first_fcn} +\alias{my_first_fcn} +\title{my_first_fcn} +\usage{ +my_first_fcn() +} +\value{ +This function returns the Character "Welcome to the admiral family!". +} +\description{ +my first function +} +\details{ +This is a function created as dummy. +} +\examples{ +my_first_fcn() ## returns "Welcome to the admiral family!" +} +\concept{my_first_fcn} +\keyword{my_first_fcn} From d60d4f285ed4b30b335af378d00512e45ad031ad Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 24 Oct 2024 10:03:24 +0200 Subject: [PATCH 13/15] updated skelton to fix CMD checks --- R/my_first_fcn.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/my_first_fcn.R b/R/my_first_fcn.R index 95244a3015..f40d7a54da 100644 --- a/R/my_first_fcn.R +++ b/R/my_first_fcn.R @@ -5,9 +5,9 @@ #' @details #' This is a function created as dummy. #' -#' @keywords my_first_fcn +#' @keywords other_advanced #' -#' @family my_first_fcn +#' @family other_advanced #' #' @return #' This function returns the Character "Welcome to the admiral family!". From 10b6740f85a479a251b49b239884f196c0bfef9e Mon Sep 17 00:00:00 2001 From: GOTO Date: Thu, 24 Oct 2024 13:32:42 +0200 Subject: [PATCH 14/15] updated documents --- man/list_tte_source_objects.Rd | 1 + man/my_first_fcn.Rd | 9 +++++++-- man/params.Rd | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/man/list_tte_source_objects.Rd b/man/list_tte_source_objects.Rd index db624766b1..a6e310c726 100644 --- a/man/list_tte_source_objects.Rd +++ b/man/list_tte_source_objects.Rd @@ -21,6 +21,7 @@ list_tte_source_objects() } \seealso{ Other Advanced Functions: +\code{\link{my_first_fcn}()}, \code{\link{params}()} } \concept{other_advanced} diff --git a/man/my_first_fcn.Rd b/man/my_first_fcn.Rd index 7a6fcdcff5..1d49812200 100644 --- a/man/my_first_fcn.Rd +++ b/man/my_first_fcn.Rd @@ -18,5 +18,10 @@ This is a function created as dummy. \examples{ my_first_fcn() ## returns "Welcome to the admiral family!" } -\concept{my_first_fcn} -\keyword{my_first_fcn} +\seealso{ +Other Advanced Functions: +\code{\link{list_tte_source_objects}()}, +\code{\link{params}()} +} +\concept{other_advanced} +\keyword{other_advanced} diff --git a/man/params.Rd b/man/params.Rd index ba41405a43..3e1c8b4176 100644 --- a/man/params.Rd +++ b/man/params.Rd @@ -100,7 +100,8 @@ call_derivation( \code{\link[=call_derivation]{call_derivation()}} Other Advanced Functions: -\code{\link{list_tte_source_objects}()} +\code{\link{list_tte_source_objects}()}, +\code{\link{my_first_fcn}()} } \concept{other_advanced} \keyword{other_advanced} From 35e0056143bffd60341d81ab954c9657197dc193 Mon Sep 17 00:00:00 2001 From: Shunsuke Goto Date: Fri, 25 Oct 2024 00:56:21 +0000 Subject: [PATCH 15/15] #1839 updated WORDLIST --- inst/WORDLIST | 1 + 1 file changed, 1 insertion(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index e3a009b79f..a44188656c 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -284,6 +284,7 @@ eg egfr evaluable exprs +fcn fil findable fmt