From baf8b94124ddf30207f42257d1bfd0cf9bca912f Mon Sep 17 00:00:00 2001 From: kartikeya kirar Date: Thu, 14 Mar 2024 19:14:41 +0530 Subject: [PATCH] 52 standardise optional notation (#302) part of https://github.com/insightsengineering/nestdevs-tasks/issues/52 --------- Signed-off-by: kartikeya kirar Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com> Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> --- R/cdisc_data.R | 9 ++++----- R/join_keys.R | 2 +- R/teal_data.R | 7 +++---- man/cdisc_data.Rd | 5 ++--- man/join_keys.Rd | 2 +- man/teal_data.Rd | 5 ++--- 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/R/cdisc_data.R b/R/cdisc_data.R index 807e3bdd3..ffbb51ed8 100644 --- a/R/cdisc_data.R +++ b/R/cdisc_data.R @@ -7,11 +7,10 @@ #' for given datasets whose names match ADAM datasets names. #' #' @inheritParams teal_data -#' @param join_keys (`join_keys`) object or a single (`join_key_set`) object -#' -#' (optional) object with datasets column names used for joining. -#' If empty then it would be automatically derived basing on intersection of datasets primary keys. -#' For ADAM datasets it would be automatically derived. +#' @param join_keys (`join_keys` or single `join_key_set`) +#' optional object with datasets column names used for joining. +#' If empty then it would be automatically derived basing on intersection of datasets primary keys. +#' For ADAM datasets it would be automatically derived. #' #' @return A `teal_data` object. #' diff --git a/R/join_keys.R b/R/join_keys.R index b8e5600c2..433332457 100644 --- a/R/join_keys.R +++ b/R/join_keys.R @@ -22,7 +22,7 @@ #' - `join_keys(teal_data)`: Returns the `join_keys` object contained in `teal_data` object. #' - `join_keys(...)`: Creates a new object with one or more `join_key_set` parameters. #' -#' @param ... (optional) +#' @param ... optional, #' - either `teal_data` or `join_keys` object to extract `join_keys` #' - or any number of `join_key_set` objects to create `join_keys` #' - or nothing to create an empty `join_keys` diff --git a/R/teal_data.R b/R/teal_data.R index 70a2d472f..ea32e624a 100644 --- a/R/teal_data.R +++ b/R/teal_data.R @@ -7,10 +7,9 @@ #' #' @param ... any number of objects (presumably data objects) provided as `name = value` pairs. #' -#' @param join_keys (`join_keys`) object or a single (`join_key_set`) object. -#' -#' (optional) object with dataset column relationships used for joining. -#' If empty then no joins between pairs of objects. +#' @param join_keys (`join_keys` or single `join_key_set`) +#' optional object with datasets column names used for joining. +#' If empty then no joins between pairs of objects. #' #' @param code (`character`, `language`) optional code to reproduce the datasets provided in `...`. #' Note this code is not executed and the `teal_data` may not be reproducible diff --git a/man/cdisc_data.Rd b/man/cdisc_data.Rd index 2c356d90a..05f8ee3fe 100644 --- a/man/cdisc_data.Rd +++ b/man/cdisc_data.Rd @@ -14,9 +14,8 @@ cdisc_data( \arguments{ \item{...}{any number of objects (presumably data objects) provided as \code{name = value} pairs.} -\item{join_keys}{(\code{join_keys}) object or a single (\code{join_key_set}) object - -(optional) object with datasets column names used for joining. +\item{join_keys}{(\code{join_keys} or single \code{join_key_set}) +optional object with datasets column names used for joining. If empty then it would be automatically derived basing on intersection of datasets primary keys. For ADAM datasets it would be automatically derived.} diff --git a/man/join_keys.Rd b/man/join_keys.Rd index ec2a7f1bb..26582c211 100644 --- a/man/join_keys.Rd +++ b/man/join_keys.Rd @@ -45,7 +45,7 @@ join_keys(x) <- value \method{print}{join_keys}(x, ...) } \arguments{ -\item{...}{(optional) +\item{...}{optional, \itemize{ \item either \code{teal_data} or \code{join_keys} object to extract \code{join_keys} \item or any number of \code{join_key_set} objects to create \code{join_keys} diff --git a/man/teal_data.Rd b/man/teal_data.Rd index 5676cef15..b249aece4 100644 --- a/man/teal_data.Rd +++ b/man/teal_data.Rd @@ -9,9 +9,8 @@ teal_data(..., join_keys = teal.data::join_keys(), code = character(0), check) \arguments{ \item{...}{any number of objects (presumably data objects) provided as \code{name = value} pairs.} -\item{join_keys}{(\code{join_keys}) object or a single (\code{join_key_set}) object. - -(optional) object with dataset column relationships used for joining. +\item{join_keys}{(\code{join_keys} or single \code{join_key_set}) +optional object with datasets column names used for joining. If empty then no joins between pairs of objects.} \item{code}{(\code{character}, \code{language}) optional code to reproduce the datasets provided in \code{...}.