From 43be198f6da7e32bb820ca45b250486a9274ff55 Mon Sep 17 00:00:00 2001 From: sadchla-codes Date: Tue, 16 Jan 2024 12:27:38 -0500 Subject: [PATCH 1/2] Closes #217 Fixing a small typo --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 83a0dbad..d08d7254 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -23,7 +23,7 @@ _(descriptions of changes)_ - [ ] Run `devtools::document()` so all `.Rd` files in the `man` folder and the `NAMESPACE` file in the project root are updated appropriately - [ ] Run `pkgdown::build_site()` and check that all affected examples are displayed correctly and that all new/updated functions occur on the "Reference" page. - [ ] Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers) -- [ ] Make sure that the pacakge version in the NEWS.md and DESCRIPTION file is same. Don't worry about updating the version because it will be auto-updated using the `vbump.yaml` CI. +- [ ] Make sure that the package version in the NEWS.md and DESCRIPTION file is same. Don't worry about updating the version because it will be auto-updated using the `vbump.yaml` CI. - [ ] Address any updates needed for vignettes and/or templates - [ ] Link the issue Development Panel so that it closes after successful merging. - [ ] Fix merge conflicts From 59b82ebebfd9c0879ea22441cf6ac61112b95995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Wed, 17 Jan 2024 11:30:41 +0100 Subject: [PATCH 2/2] typos and suround code and variables/arguments with backticks --- R/data.R | 2 +- R/format.R | 4 ++-- R/order.R | 4 ++-- R/type.R | 15 ++++++++------- R/xportr-package.R | 10 +++++----- man/dataset_spec.Rd | 2 +- man/xportr-package.Rd | 10 +++------- man/xportr_format.Rd | 4 ++-- man/xportr_order.Rd | 4 ++-- man/xportr_type.Rd | 15 ++++++--------- 10 files changed, 32 insertions(+), 38 deletions(-) diff --git a/R/data.R b/R/data.R index ca83a2a6..02267f2f 100644 --- a/R/data.R +++ b/R/data.R @@ -95,7 +95,7 @@ #' \item{Purpose}{ Purpose of the dataset} #' \item{Key, Variables}{ Join Key variables in the dataset} #' \item{Repeating}{ Indicates if the dataset is repeating} -#' \item{Reference Data}{ Regerence Data} +#' \item{Reference Data}{ Reference Data} #' \item{Comment}{ Additional comment} #' } "dataset_spec" diff --git a/R/format.R b/R/format.R index 4e6b908d..4e4c37c8 100644 --- a/R/format.R +++ b/R/format.R @@ -2,7 +2,7 @@ #' #' Assigns a SAS format from a variable level metadata to a given data frame. If #' no format is found for a given variable, it is set as an empty character -#' vector. This is stored in the format.sas attribute. +#' vector. This is stored in the '`format.sas`' attribute. #' #' @inheritParams xportr_length #' @@ -19,7 +19,7 @@ #' function. #' #' 2) Format Name - passed as the 'xportr.format_name' option. -#' Default: "format". Character values to update the 'format.sas' attribute of +#' Default: "format". Character values to update the '`format.sas`' attribute of #' the column. This is passed to `haven::write` to note the format. #' #' 3) Variable Name - passed as the 'xportr.variable_name' option. Default: diff --git a/R/order.R b/R/order.R index 60bccbc8..3f1842c1 100644 --- a/R/order.R +++ b/R/order.R @@ -39,8 +39,8 @@ #' #' 3) Variable Order - passed as the 'xportr.order_name' option. #' Default: "order". These values used to arrange the order of the variables. -#' If the values of order metadata are not numeric, they will be corsersed to -#' prevent alphabetical sorting of numberic values. +#' If the values of order metadata are not numeric, they will be coerced to +#' prevent alphabetical sorting of numeric values. #' #' @return Dataframe that has been re-ordered according to spec #' diff --git a/R/type.R b/R/type.R index 8f45e326..c0198e20 100644 --- a/R/type.R +++ b/R/type.R @@ -5,7 +5,8 @@ #' 'xportr.character_types' option is used to explicitly collapse the class of a #' column to character using `as.character`. Similarly, 'xportr.numeric_types' #' will collapse a column to a numeric type. If no type is passed for a -#' variable and it isn't identifed as a timing variable, it is assumed to be numeric and coerced with `as.numeric`. +#' variable and it isn't identified as a timing variable, it is assumed to be +#' numeric and coerced with `as.numeric`. #' #' Certain care should be taken when using timing variables. R serializes dates #' based on a reference date of 01/01/1970 where XPT uses 01/01/1960. This can @@ -13,7 +14,7 @@ #' using a date class. For this reason, `xportr` will try to determine what #' should happen with variables that appear to be used to denote time. #' -#' For variables that end in DT, DTM, or, TM, if they are not explicitly noted +#' For variables that end in `DT`, `DTM`, or, `TM`, if they are not explicitly noted #' in 'xportr.numeric_types' or 'xportr.character_types', they are coerced to #' numeric results. #' @@ -37,7 +38,7 @@ #' function. #' #' 2) Format Name - passed as the 'xportr.format_name' option. Default: -#' "format". Character values to update the 'format.sas' attribute of the +#' "format". Character values to update the '`format.sas`' attribute of the #' column. This is passed to `haven::write` to note the format. #' #' 3) Variable Name - passed as the 'xportr.variable_name' option. Default: @@ -48,14 +49,14 @@ #' is used to note the XPT variable "type" options are numeric or character. #' #' 5) (Option only) Character Types - The list of classes that should be -#' explicitly coerced to a XPT Character type. Default: c( "character", +#' explicitly coerced to a XPT Character type. Default: `c( "character", #' "char", "text", "date", "posixct", "posixt", "datetime", "time", #' "partialdate", "partialtime", "partialdatetime", "incompletedatetime", -#' "durationdatetime", "intervaldatetime") +#' "durationdatetime", "intervaldatetime")` #' #' 6) (Option only) Numeric Types - The list of classes that should be -#' explicitly coerced to a XPT numeric type. Default: c("integer", "numeric", -#' "num", "float") +#' explicitly coerced to a XPT numeric type. Default: `c("integer", "numeric", +#' "num", "float")` #' #' @return Returns the modified table. #' @export diff --git a/R/xportr-package.R b/R/xportr-package.R index 197ad5be..e7d4d7f2 100644 --- a/R/xportr-package.R +++ b/R/xportr-package.R @@ -4,7 +4,7 @@ #' CDISC complaint data sets in R, to XPT version 5 files. It was designed with #' options in mind to allow for flexible setting of options while allowing #' projects and system administrators to set sensible defaults for their -#' orginziations workflows. Below are a list of options that can be set to +#' organizations workflows. Below are a list of options that can be set to #' customize how `xportr` works in your environment. #' #' @section xportr options: @@ -64,15 +64,15 @@ #' } #' \item{ #' xportr.character_types - The default character vector used to explicitly -#' coerce R classes to character XPT types. Default: c("character", "char", +#' coerce R classes to character XPT types. Default: `c("character", "char", #' "text", "date", "posixct", "posixt", "datetime", "time", "partialdate", #' "partialtime", "partialdatetime", "incompletedatetime", "durationdatetime", -#' "intervaldatetime") +#' "intervaldatetime")` #' } #' \item{ #' xportr.numeric_types - The default character vector used to explicitly -#' coerce R classes to numeric XPT types. Default: c("integer", "numeric", -#' "num", "float") +#' coerce R classes to numeric XPT types. Default: `c("integer", "numeric", +#' "num", "float")` #' } #' } #' diff --git a/man/dataset_spec.Rd b/man/dataset_spec.Rd index 7ab0d370..6d581ab2 100644 --- a/man/dataset_spec.Rd +++ b/man/dataset_spec.Rd @@ -16,7 +16,7 @@ A data frame with 1 row and 9 columns: \item{Purpose}{\if{html}{\out{}} Purpose of the dataset} \item{Key, Variables}{\if{html}{\out{}} Join Key variables in the dataset} \item{Repeating}{\if{html}{\out{}} Indicates if the dataset is repeating} -\item{Reference Data}{\if{html}{\out{}} Regerence Data} +\item{Reference Data}{\if{html}{\out{}} Reference Data} \item{Comment}{\if{html}{\out{}} Additional comment} } } diff --git a/man/xportr-package.Rd b/man/xportr-package.Rd index 64eaed80..cc452951 100644 --- a/man/xportr-package.Rd +++ b/man/xportr-package.Rd @@ -10,7 +10,7 @@ CDISC complaint data sets in R, to XPT version 5 files. It was designed with options in mind to allow for flexible setting of options while allowing projects and system administrators to set sensible defaults for their -orginziations workflows. Below are a list of options that can be set to +organizations workflows. Below are a list of options that can be set to customize how \code{xportr} works in your environment. } \section{xportr options}{ @@ -71,15 +71,11 @@ xportr.type_verbose - The default argument for the 'verbose' argument for } \item{ xportr.character_types - The default character vector used to explicitly -coerce R classes to character XPT types. Default: c("character", "char", -"text", "date", "posixct", "posixt", "datetime", "time", "partialdate", -"partialtime", "partialdatetime", "incompletedatetime", "durationdatetime", -"intervaldatetime") +coerce R classes to character XPT types. Default: \code{c("character", "char", "text", "date", "posixct", "posixt", "datetime", "time", "partialdate", "partialtime", "partialdatetime", "incompletedatetime", "durationdatetime", "intervaldatetime")} } \item{ xportr.numeric_types - The default character vector used to explicitly -coerce R classes to numeric XPT types. Default: c("integer", "numeric", -"num", "float") +coerce R classes to numeric XPT types. Default: \code{c("integer", "numeric", "num", "float")} } } } diff --git a/man/xportr_format.Rd b/man/xportr_format.Rd index 059fe168..dd883554 100644 --- a/man/xportr_format.Rd +++ b/man/xportr_format.Rd @@ -25,7 +25,7 @@ Data frame with \code{SASformat} attributes for each variable. \description{ Assigns a SAS format from a variable level metadata to a given data frame. If no format is found for a given variable, it is set as an empty character -vector. This is stored in the format.sas attribute. +vector. This is stored in the '\code{format.sas}' attribute. } \section{Metadata}{ The argument passed in the 'metadata' argument can either @@ -38,7 +38,7 @@ For data.frame 'metadata' arguments three columns must be present: "dataset". This is the column subset by the 'domain' argument in the function. \item Format Name - passed as the 'xportr.format_name' option. -Default: "format". Character values to update the 'format.sas' attribute of +Default: "format". Character values to update the '\code{format.sas}' attribute of the column. This is passed to \code{haven::write} to note the format. \item Variable Name - passed as the 'xportr.variable_name' option. Default: "variable". This is used to match columns in '.df' argument and the diff --git a/man/xportr_order.Rd b/man/xportr_order.Rd index de8ec9cd..50fd7e73 100644 --- a/man/xportr_order.Rd +++ b/man/xportr_order.Rd @@ -69,8 +69,8 @@ Default: "variable". This is used to match columns in '.df' argument and the metadata. \item Variable Order - passed as the 'xportr.order_name' option. Default: "order". These values used to arrange the order of the variables. -If the values of order metadata are not numeric, they will be corsersed to -prevent alphabetical sorting of numberic values. +If the values of order metadata are not numeric, they will be coerced to +prevent alphabetical sorting of numeric values. } } diff --git a/man/xportr_type.Rd b/man/xportr_type.Rd index 440cf535..f8c17945 100644 --- a/man/xportr_type.Rd +++ b/man/xportr_type.Rd @@ -38,7 +38,8 @@ attempts to collapse R classes to those two XPT types. The 'xportr.character_types' option is used to explicitly collapse the class of a column to character using \code{as.character}. Similarly, 'xportr.numeric_types' will collapse a column to a numeric type. If no type is passed for a -variable and it isn't identifed as a timing variable, it is assumed to be numeric and coerced with \code{as.numeric}. +variable and it isn't identified as a timing variable, it is assumed to be +numeric and coerced with \code{as.numeric}. } \details{ Certain care should be taken when using timing variables. R serializes dates @@ -47,7 +48,7 @@ result in dates being 10 years off when outputting from R to XPT if you're using a date class. For this reason, \code{xportr} will try to determine what should happen with variables that appear to be used to denote time. -For variables that end in DT, DTM, or, TM, if they are not explicitly noted +For variables that end in \code{DT}, \code{DTM}, or, \code{TM}, if they are not explicitly noted in 'xportr.numeric_types' or 'xportr.character_types', they are coerced to numeric results. } @@ -71,7 +72,7 @@ For data.frame 'metadata' arguments four columns must be present: "dataset". This is the column subset by the 'domain' argument in the function. \item Format Name - passed as the 'xportr.format_name' option. Default: -"format". Character values to update the 'format.sas' attribute of the +"format". Character values to update the '\code{format.sas}' attribute of the column. This is passed to \code{haven::write} to note the format. \item Variable Name - passed as the 'xportr.variable_name' option. Default: "variable". This is used to match columns in '.df' argument and the @@ -79,13 +80,9 @@ metadata. \item Variable Type - passed as the 'xportr.type_name'. Default: "type". This is used to note the XPT variable "type" options are numeric or character. \item (Option only) Character Types - The list of classes that should be -explicitly coerced to a XPT Character type. Default: c( "character", -"char", "text", "date", "posixct", "posixt", "datetime", "time", -"partialdate", "partialtime", "partialdatetime", "incompletedatetime", -"durationdatetime", "intervaldatetime") +explicitly coerced to a XPT Character type. Default: \code{c( "character", "char", "text", "date", "posixct", "posixt", "datetime", "time", "partialdate", "partialtime", "partialdatetime", "incompletedatetime", "durationdatetime", "intervaldatetime")} \item (Option only) Numeric Types - The list of classes that should be -explicitly coerced to a XPT numeric type. Default: c("integer", "numeric", -"num", "float") +explicitly coerced to a XPT numeric type. Default: \code{c("integer", "numeric", "num", "float")} } }