From 915d59734be335c1e7c62e8bec6da6a3974bc937 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Fri, 16 Feb 2024 21:39:24 +0000 Subject: [PATCH 1/6] fix: #241 removed unused packages --- DESCRIPTION | 4 +--- NAMESPACE | 2 -- NEWS.md | 8 ++++++++ R/xportr-package.R | 2 -- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 61e81239..e0d5d98a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -56,15 +56,13 @@ Imports: cli, tidyselect, readr, - janitor, - tm, haven (>= 2.5.0), lifecycle License: MIT + file LICENSE Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Suggests: testthat (>= 3.0.0), withr, diff --git a/NAMESPACE b/NAMESPACE index 2b7d1412..590c4b2f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -43,7 +43,6 @@ importFrom(dplyr,ungroup) importFrom(glue,glue) importFrom(glue,glue_collapse) importFrom(graphics,stem) -importFrom(janitor,make_clean_names) importFrom(lifecycle,deprecated) importFrom(magrittr,"%>%") importFrom(magrittr,extract2) @@ -61,7 +60,6 @@ importFrom(stringr,str_replace) importFrom(stringr,str_replace_all) importFrom(tidyselect,all_of) importFrom(tidyselect,any_of) -importFrom(tm,stemDocument) importFrom(utils,capture.output) importFrom(utils,packageVersion) importFrom(utils,str) diff --git a/NEWS.md b/NEWS.md index c066e5e7..14c129ae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +# xportr 0.3.2 + +* Removed unused packages, `{tm}` and `{janitor}` from Imports (#241) + +# xportr 0.3.1 + +* Fixed issues around code coverage (#170) and lintr (#176) + # xportr 0.3.0 ## New Features and Bug Fixes diff --git a/R/xportr-package.R b/R/xportr-package.R index c3804b20..6442a87a 100644 --- a/R/xportr-package.R +++ b/R/xportr-package.R @@ -106,8 +106,6 @@ #' @importFrom stringr str_detect str_extract str_replace str_replace_all #' @importFrom readr parse_number #' @importFrom purrr map_chr map2_chr walk walk2 map map_dbl pluck -#' @importFrom janitor make_clean_names -#' @importFrom tm stemDocument #' @importFrom graphics stem #' @importFrom magrittr %>% extract2 #' From 60185ca7fe05853eb8e7164ced1b8c08e0386c86 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Fri, 16 Feb 2024 21:40:16 +0000 Subject: [PATCH 2/6] chore: #241 pkg upversion --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index e0d5d98a..de2d491e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: xportr Title: Utilities to Output CDISC SDTM/ADaM XPT Files -Version: 0.3.1 +Version: 0.3.2 Authors@R: c( person(given = "Eli", From 940cce1c6da615c9348bb0896f4f830bef039859 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Tue, 20 Feb 2024 14:52:29 +0000 Subject: [PATCH 3/6] chore: #241 doc fixes --- NAMESPACE | 25 +++++++++++++++++++------ man/metadata.Rd | 2 +- man/xportr-package.Rd | 3 ++- man/xportr_df_label.Rd | 2 +- man/xportr_format.Rd | 2 +- man/xportr_label.Rd | 2 +- man/xportr_length.Rd | 2 +- man/xportr_order.Rd | 2 +- man/xportr_type.Rd | 2 +- man/xportr_write.Rd | 2 +- 10 files changed, 29 insertions(+), 15 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 590c4b2f..44baa2a4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,29 +1,40 @@ # Generated by roxygen2: do not edit by hand -export(label_log) -export(length_log) -export(type_log) -export(var_names_log) -export(var_ord_msg) +export(xportr) export(xportr_df_label) export(xportr_format) export(xportr_label) export(xportr_length) -export(xportr_logger) export(xportr_metadata) +export(xportr_options) export(xportr_order) export(xportr_type) export(xportr_write) export(xpt_validate) import(haven) import(rlang) +importFrom(checkmate,assert) +importFrom(checkmate,assert_character) +importFrom(checkmate,assert_choice) +importFrom(checkmate,assert_data_frame) +importFrom(checkmate,assert_integer) +importFrom(checkmate,assert_logical) +importFrom(checkmate,assert_string) +importFrom(checkmate,check_data_frame) +importFrom(checkmate,check_r6) +importFrom(checkmate,makeAssertion) +importFrom(checkmate,test_data_frame) +importFrom(checkmate,test_string) +importFrom(checkmate,vname) importFrom(cli,cli_alert_danger) importFrom(cli,cli_alert_info) importFrom(cli,cli_alert_success) importFrom(cli,cli_div) importFrom(cli,cli_h2) importFrom(cli,cli_text) +importFrom(dplyr,across) importFrom(dplyr,arrange) +importFrom(dplyr,as_tibble) importFrom(dplyr,bind_cols) importFrom(dplyr,case_when) importFrom(dplyr,distinct) @@ -46,6 +57,7 @@ importFrom(graphics,stem) importFrom(lifecycle,deprecated) importFrom(magrittr,"%>%") importFrom(magrittr,extract2) +importFrom(purrr,iwalk) importFrom(purrr,map) importFrom(purrr,map2_chr) importFrom(purrr,map_chr) @@ -60,6 +72,7 @@ importFrom(stringr,str_replace) importFrom(stringr,str_replace_all) importFrom(tidyselect,all_of) importFrom(tidyselect,any_of) +importFrom(tidyselect,where) importFrom(utils,capture.output) importFrom(utils,packageVersion) importFrom(utils,str) diff --git a/man/metadata.Rd b/man/metadata.Rd index 9df1c6c8..30918a0c 100644 --- a/man/metadata.Rd +++ b/man/metadata.Rd @@ -12,7 +12,7 @@ xportr_metadata(.df, metadata = NULL, domain = NULL, verbose = NULL) \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr-package.Rd b/man/xportr-package.Rd index 2f38a255..bcd0521d 100644 --- a/man/xportr-package.Rd +++ b/man/xportr-package.Rd @@ -85,7 +85,8 @@ coerce R classes to numeric XPT types. Default: c("integer", "numeric", "num", " } \item{ xportr.numeric_types - The default character vector used to explicitly -coerce R classes to numeric XPT types. Default: c("integer", "float", "numeric", "posixct", "posixt", "time", "date") +coerce R classes to numeric XPT types. Default: c("integer", "float", +"numeric", "posixct", "posixt", "time", "date") } } } diff --git a/man/xportr_df_label.Rd b/man/xportr_df_label.Rd index 5f95d771..691de990 100644 --- a/man/xportr_df_label.Rd +++ b/man/xportr_df_label.Rd @@ -12,7 +12,7 @@ xportr_df_label(.df, metadata = NULL, domain = NULL, metacore = deprecated()) \item{metadata}{A data frame containing dataset. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_format.Rd b/man/xportr_format.Rd index 0c00da1b..e085a345 100644 --- a/man/xportr_format.Rd +++ b/man/xportr_format.Rd @@ -12,7 +12,7 @@ xportr_format(.df, metadata = NULL, domain = NULL, metacore = deprecated()) \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_label.Rd b/man/xportr_label.Rd index a61e0583..eb03df81 100644 --- a/man/xportr_label.Rd +++ b/man/xportr_label.Rd @@ -18,7 +18,7 @@ xportr_label( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_length.Rd b/man/xportr_length.Rd index 93425808..8d034eb8 100644 --- a/man/xportr_length.Rd +++ b/man/xportr_length.Rd @@ -19,7 +19,7 @@ xportr_length( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_order.Rd b/man/xportr_order.Rd index 03617d4f..26b87f42 100644 --- a/man/xportr_order.Rd +++ b/man/xportr_order.Rd @@ -18,7 +18,7 @@ xportr_order( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_type.Rd b/man/xportr_type.Rd index 05489fcf..736fe0c6 100644 --- a/man/xportr_type.Rd +++ b/man/xportr_type.Rd @@ -18,7 +18,7 @@ xportr_type( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_write.Rd b/man/xportr_write.Rd index bde66844..c6bd4a1d 100644 --- a/man/xportr_write.Rd +++ b/man/xportr_write.Rd @@ -22,7 +22,7 @@ used as \code{xpt} name.} \item{metadata}{A data frame containing dataset. See 'Metadata' section for details.} -\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} From 0c72e09acbcb0c853f851d8898a89dbf7f536388 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Tue, 20 Feb 2024 15:01:28 +0000 Subject: [PATCH 4/6] chore: #241 DESCRIPTION fix --- DESCRIPTION | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c3a79b80..b6581f0f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,17 +25,18 @@ BugReports: https://github.com/atorus-research/xportr/issues Depends: R (>= 3.5) Imports: + checkmate, + cli, dplyr (>= 1.0.2), - purrr (>= 0.3.4), - stringr (>= 1.4.0), - magrittr, + haven (>= 2.5.0), glue (>= 1.4.2), + lifecycle, + magrittr, + purrr (>= 0.3.4), rlang (>= 0.4.10), - cli, + stringr (>= 1.4.0), tidyselect, - readr, - haven (>= 2.5.0), - lifecycle + readr Suggests: admiral, DT, From 0557dcb759e2a521db5e022a99b06d6dec278c96 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Mon, 26 Feb 2024 01:44:45 +0000 Subject: [PATCH 5/6] chore: #241 spelling --- man/metadata.Rd | 2 +- man/xportr-package.Rd | 1 + man/xportr_df_label.Rd | 2 +- man/xportr_format.Rd | 2 +- man/xportr_label.Rd | 2 +- man/xportr_length.Rd | 2 +- man/xportr_order.Rd | 2 +- man/xportr_type.Rd | 2 +- man/xportr_write.Rd | 2 +- 9 files changed, 9 insertions(+), 8 deletions(-) diff --git a/man/metadata.Rd b/man/metadata.Rd index 30918a0c..9df1c6c8 100644 --- a/man/metadata.Rd +++ b/man/metadata.Rd @@ -12,7 +12,7 @@ xportr_metadata(.df, metadata = NULL, domain = NULL, verbose = NULL) \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr-package.Rd b/man/xportr-package.Rd index 34e3edd5..d077e53c 100644 --- a/man/xportr-package.Rd +++ b/man/xportr-package.Rd @@ -109,6 +109,7 @@ options update in the \code{.Rprofile.site} file in the R home directory.} \seealso{ Useful links: \itemize{ + \item \url{https://atorus-research.github.io/xportr/} \item \url{https://github.com/atorus-research/xportr} \item Report bugs at \url{https://github.com/atorus-research/xportr/issues} } diff --git a/man/xportr_df_label.Rd b/man/xportr_df_label.Rd index 691de990..5f95d771 100644 --- a/man/xportr_df_label.Rd +++ b/man/xportr_df_label.Rd @@ -12,7 +12,7 @@ xportr_df_label(.df, metadata = NULL, domain = NULL, metacore = deprecated()) \item{metadata}{A data frame containing dataset. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_format.Rd b/man/xportr_format.Rd index e085a345..0c00da1b 100644 --- a/man/xportr_format.Rd +++ b/man/xportr_format.Rd @@ -12,7 +12,7 @@ xportr_format(.df, metadata = NULL, domain = NULL, metacore = deprecated()) \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_label.Rd b/man/xportr_label.Rd index eb03df81..a61e0583 100644 --- a/man/xportr_label.Rd +++ b/man/xportr_label.Rd @@ -18,7 +18,7 @@ xportr_label( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_length.Rd b/man/xportr_length.Rd index a2c2e01e..c3180a71 100644 --- a/man/xportr_length.Rd +++ b/man/xportr_length.Rd @@ -19,7 +19,7 @@ xportr_length( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_order.Rd b/man/xportr_order.Rd index 26b87f42..03617d4f 100644 --- a/man/xportr_order.Rd +++ b/man/xportr_order.Rd @@ -18,7 +18,7 @@ xportr_order( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_type.Rd b/man/xportr_type.Rd index 736fe0c6..05489fcf 100644 --- a/man/xportr_type.Rd +++ b/man/xportr_type.Rd @@ -18,7 +18,7 @@ xportr_type( \item{metadata}{A data frame containing variable level metadata. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} diff --git a/man/xportr_write.Rd b/man/xportr_write.Rd index c6bd4a1d..bde66844 100644 --- a/man/xportr_write.Rd +++ b/man/xportr_write.Rd @@ -22,7 +22,7 @@ used as \code{xpt} name.} \item{metadata}{A data frame containing dataset. See 'Metadata' section for details.} -\item{domain}{Appropriate CDSIC dataset name, e.g. ADAE, DM. Used to subset +\item{domain}{Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset the metadata object. If none is passed, then name of the dataset passed as .df will be used.} From 7c0a1b7f31760dcebbb29eeba2ff82f055153cf4 Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Mon, 26 Feb 2024 08:53:15 -0500 Subject: [PATCH 6/6] Update NEWS.md Co-authored-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com> --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index e8ff84a6..512b6001 100644 --- a/NEWS.md +++ b/NEWS.md @@ -30,7 +30,7 @@ * New argument in `xportr_length()` allows selection between the length from metadata, as previously done, or from the calculated maximum length per variable when `length_source` is set to “data” (#91) -* * Make `xportr_type()` drop factor levels when coercing variables +* Make `xportr_type()` drop factor levels when coercing variables * `xportr_length()` assigns the maximum length value instead of 200 for a character variable when the length is missing in the metadata (#207)