-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 237-pkgdown
- Loading branch information
Showing
12 changed files
with
210 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: xportr | ||
Title: Utilities to Output CDISC SDTM/ADaM XPT Files | ||
Version: 0.3.1.9023 | ||
Version: 0.3.1.9024 | ||
Authors@R: c( | ||
person("Eli", "Miller", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0002-2127-9456")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#' Split xpt file output | ||
#' | ||
#' Per the FDA Study Data Technical Conformance | ||
#' Guide(https://www.fda.gov/media/88173/download) section 3.3.2, dataset files | ||
#' sizes shouldn't exceed 5 GB. If datasets are large enough, they should be | ||
#' split based on a variable. For example, laboratory readings in `ADLB` can be | ||
#' split by `LBCAT` to split up hematology and chemistry data. | ||
#' | ||
#' This function will tell `xportr_write()` to split the data frame based on the | ||
#' variable passed in `split_by`. When written, the file name will be prepended | ||
#' with a number for uniqueness. These files should be noted in the Reviewer Guides per | ||
#' CDISC guidance to note how you split your files. | ||
#' | ||
#' @inheritParams xportr_length | ||
#' @param split_by A quoted variable that will be passed to `base::split()`. | ||
#' | ||
#' @return A data frame with an additional attribute added so `xportr_write()` | ||
#' knows how to split the data frame. | ||
#' | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' | ||
#' adlb <- data.frame( | ||
#' USUBJID = c(1001, 1002, 1003), | ||
#' LBCAT = c("HEMATOLOGY", "HEMATOLOGY", "CHEMISTRY") | ||
#' ) | ||
#' | ||
#' adsl <- xportr_split(adsl, "LBCAT") | ||
xportr_split <- function(.df, split_by = NULL) { | ||
attr(.df, "_xportr.split_by_") <- split_by | ||
|
||
return(.df) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters