From d2cd07b2d85bb2c793a1f806ee002b78ab5a77ef Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 28 Mar 2024 12:56:38 +0000 Subject: [PATCH] Built site for xportr: 0.4.0@6578def --- 404.html | 5 +- LICENSE-text.html | 5 +- LICENSE.html | 6 +- articles/agency_standards.html | 465 +++++ articles/deepdive.html | 1634 ++++++++++------- .../empty-anchor.js | 15 - .../datatables-binding-0.32}/datatables.js | 75 +- .../css/jquery.dataTables.min.css | 1 - .../js/jquery.dataTables.min.js | 4 - .../css/jquery.dataTables.extra.css | 0 .../css/jquery.dataTables.min.css | 1 + .../js/jquery.dataTables.min.js | 4 + .../htmltools-fill-0.5.8/fill.css | 21 + .../htmlwidgets.js | 0 articles/index.html | 7 +- articles/xportr.html | 317 ++-- .../empty-anchor.js | 15 - .../datatables-binding-0.32}/datatables.js | 75 +- .../css/jquery.dataTables.min.css | 1 - .../js/jquery.dataTables.min.js | 4 - .../css/jquery.dataTables.extra.css | 0 .../css/jquery.dataTables.min.css | 1 + .../js/jquery.dataTables.min.js | 4 + .../htmltools-fill-0.5.8/fill.css | 21 + .../htmlwidgets.js | 0 authors.html | 31 +- index.html | 71 +- news/index.html | 73 +- pkgdown.yml | 5 +- pull_request_template.html | 52 +- reference/adsl.html | 247 --- reference/adsl_xportr.html | 261 +++ reference/dataset_spec.html | 131 ++ reference/expect_attr_width.html | 5 +- reference/figures/fda.jpg | Bin 0 -> 41374 bytes reference/figures/nmpa.png | Bin 0 -> 66957 bytes reference/figures/pmda.png | Bin 0 -> 4271 bytes reference/figures/xpt.png | Bin 0 -> 927 bytes reference/index.html | 53 +- reference/label_log.html | 108 -- reference/length_log.html | 108 -- .../{xportr_metadata.html => metadata.html} | 57 +- reference/minimal_metadata.html | 5 +- reference/minimal_table.html | 5 +- reference/multiple_vars_in_spec_helper.html | 7 +- reference/multiple_vars_in_spec_helper2.html | 7 +- reference/type_log.html | 112 -- reference/var_ord_msg.html | 112 -- reference/var_spec.html | 13 +- reference/xportr-package.html | 33 +- reference/xportr.html | 205 +++ reference/xportr_df_label.html | 12 +- reference/xportr_format.html | 63 +- reference/xportr_label.html | 16 +- reference/xportr_length.html | 46 +- reference/xportr_logger.html | 115 -- reference/xportr_options.html | 273 +++ ...ames_log.html => xportr_options_list.html} | 33 +- reference/xportr_order.html | 22 +- reference/xportr_split.html | 142 ++ reference/xportr_type.html | 31 +- reference/xportr_write.html | 63 +- reference/xpt_validate.html | 5 +- search.json | 2 +- sitemap.xml | 32 +- 65 files changed, 3236 insertions(+), 2001 deletions(-) create mode 100644 articles/agency_standards.html delete mode 100644 articles/deepdive_files/accessible-code-block-0.0.1/empty-anchor.js rename articles/{xportr_files/datatables-binding-0.30 => deepdive_files/datatables-binding-0.32}/datatables.js (95%) delete mode 100644 articles/deepdive_files/dt-core-1.13.4/css/jquery.dataTables.min.css delete mode 100644 articles/deepdive_files/dt-core-1.13.4/js/jquery.dataTables.min.js rename articles/deepdive_files/{dt-core-1.13.4 => dt-core-1.13.6}/css/jquery.dataTables.extra.css (100%) create mode 100644 articles/deepdive_files/dt-core-1.13.6/css/jquery.dataTables.min.css create mode 100644 articles/deepdive_files/dt-core-1.13.6/js/jquery.dataTables.min.js create mode 100644 articles/deepdive_files/htmltools-fill-0.5.8/fill.css rename articles/deepdive_files/{htmlwidgets-1.6.3 => htmlwidgets-1.6.4}/htmlwidgets.js (100%) delete mode 100644 articles/xportr_files/accessible-code-block-0.0.1/empty-anchor.js rename articles/{deepdive_files/datatables-binding-0.30 => xportr_files/datatables-binding-0.32}/datatables.js (95%) delete mode 100644 articles/xportr_files/dt-core-1.13.4/css/jquery.dataTables.min.css delete mode 100644 articles/xportr_files/dt-core-1.13.4/js/jquery.dataTables.min.js rename articles/xportr_files/{dt-core-1.13.4 => dt-core-1.13.6}/css/jquery.dataTables.extra.css (100%) create mode 100644 articles/xportr_files/dt-core-1.13.6/css/jquery.dataTables.min.css create mode 100644 articles/xportr_files/dt-core-1.13.6/js/jquery.dataTables.min.js create mode 100644 articles/xportr_files/htmltools-fill-0.5.8/fill.css rename articles/xportr_files/{htmlwidgets-1.6.3 => htmlwidgets-1.6.4}/htmlwidgets.js (100%) delete mode 100644 reference/adsl.html create mode 100644 reference/adsl_xportr.html create mode 100644 reference/dataset_spec.html create mode 100644 reference/figures/fda.jpg create mode 100644 reference/figures/nmpa.png create mode 100644 reference/figures/pmda.png create mode 100644 reference/figures/xpt.png delete mode 100644 reference/label_log.html delete mode 100644 reference/length_log.html rename reference/{xportr_metadata.html => metadata.html} (58%) delete mode 100644 reference/type_log.html delete mode 100644 reference/var_ord_msg.html create mode 100644 reference/xportr.html delete mode 100644 reference/xportr_logger.html create mode 100644 reference/xportr_options.html rename reference/{var_names_log.html => xportr_options_list.html} (82%) create mode 100644 reference/xportr_split.html diff --git a/404.html b/404.html index 04987a7a..249dc153 100644 --- a/404.html +++ b/404.html @@ -31,7 +31,7 @@ xportr - 0.3.1 + 0.4.0 + + + + + +
+ + + + +
+
+ + + +
+

Motivation +

+

The xportr package is designed to help clinical +programmers create CDISC compliant xpt files. +It provides the functionality to associate metadata information to a +local R data frame, perform data set level validation checks, and +convert into a transport v5 file (xpt). However, technical +requirements related to the xpt files can change across +different regulatory agencies. This vignette aims to start to provide a +clear and concise summary of the differences between the agencies for +the xpt files. Further updates will come with later package +releases.

+

The following section will delve into various technical +specifications as per FDA, NMPA, +and PMDA +guidelines.

+
+

File name - character +

+
+
XPT +
+

The first character must be an English letter (A, B, C, . . ., Z) or +underscore (_). Subsequent characters can be letters, numeric digits (0, +1, . . ., 9), or underscores. You can use uppercase or lowercase +letters. Blanks cannot appear in SAS names. Special characters, except +for the underscore, are not allowed.

+
+
+
FDA +
+

Dataset in the transport file should be named the same as the +transport file. Variable names, as well as variable and dataset labels +should include American Standard Code for Information Interchange +(ASCII) text codes only. Dataset names should contain only lowercase +letters, numbers, and must start with a letter.

+
+
+
NMPA +
+

The file name and the dataset name must be the same for the SDTM and +ADaM datasets. The Japanese dataset and alphanumeric dataset must be +identical in structure, except for the data lengths of the Japanese +items and the corresponding alphanumeric character sequence

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+

File name - length +

+
+
XPT +
+

maximum length of 8 bytes

+
+
+
FDA +
+

8 characters

+
+
+
NMPA +
+

-

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+

Variable name +

+
+
XPT +
+

The name can contain letters of the Latin alphabet, numerals, or +underscores. The name cannot contain blanks or special characters except +for the underscore. The name must begin with a letter of the Latin +alphabet (A–Z, a–z) or the underscore.

+
+
+
FDA +
+

Variable names, as well as variable and dataset labels should include +American Standard Code for Information Interchange (ASCII) text codes +only. Variable names should contain only uppercase letters, numbers, and +must start with a letter

+
+
+
NMPA +
+

The Japanese dataset and alphanumeric dataset must be identical in +structure, except for the data lengths of the Japanese items and the +corresponding alphanumeric character sequence

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+

Variable length +

+
+
XPT +
+

8 bytes

+
+
+
FDA +
+

8 characters

+
+
+
NMPA +
+

-

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+

Label character +

+
+
XPT +
+

-

+
+
+
FDA +
+

Variable names, as well as variable and dataset labels should include +American Standard Code for Information Interchange (ASCII) text codes +only. Do not submit study data with the following special characters in +variable and dataset labels: 1. Unbalanced apostrophe, e.g., +“Parkinson’s” 2. Unbalanced single and double quotation marks 3. +Unbalanced parentheses, braces or brackets, e.g.,(, +{and [

+
+
+
NMPA +
+

The Japanese dataset and alphanumeric dataset must be identical in +structure, except for the data lengths of the Japanese items and the +corresponding alphanumeric character sequence

+
+
+
PMDA +
+

For eSubmission in China, one of the requirements is to translate the +foreign language data package (e.g., English) to Chinese. Variable +labels, dataset labels, MedDRA, WHO Drug terms, primary endpoint-related +code lists, etc., need to be translated from English to Chinese.

+
+
+
+
+

Label length +

+
+
XPT +
+

40 bytes

+
+
+
FDA +
+

40 characters

+
+
+
NMPA +
+

-

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+

Values character +

+
+
XPT +
+

-

+
+
+
FDA +
+

Variable values are the most broadly compatible with software and +operating systems when they are restricted to ASCII text codes +(printable values below 128). Use UTF-8 for extending character sets; +however, the use of extended mappings is not recommended. Transcoding +errors, variable length errors, and lack of software support for multi +byte UTF-8 encodings can result in incorrect character display and +variable value truncation.

+
+
+
NMPA +
+

If variables had been collected in Japanese and there is a risk of +losing certain information by translating it into English, the +descriptions in Japanese are necessary and appropriate, and data written +in Japanese (hereinafter referred to as Japanese data) may be submitted. +In the Japanese dataset, only the Japanese items should be Japanese and +the rest should be alphanumeric(=ASCII) data, similar to that in the +alphanumeric dataset.

+
+
+
PMDA +
+

For eSubmission in China, one of the requirements is to translate the +foreign language data package (e.g., English) to Chinese. Variable +labels, dataset labels, MedDRA, WHO Drug terms, primary endpoint-related +code lists, etc., need to be translated from English to Chinese.

+
+
+
+
+

Values length +

+
+
XPT +
+

200 bytes

+
+
+
FDA +
+

The allotted length for each column containing character (text) data +should be set to the maximum length of the variable used across all +datasets in the study except for supplementary qualification +datasets.

+
+
+
NMPA +
+

-

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+

Format +

+
+
XPT +
+

SAS format

+
+
+
FDA +
+

SAS format

+
+
+
NMPA +
+

-

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+

Type +

+
+
XPT +
+

Numeric and character

+
+
+
FDA +
+

-

+
+
+
NMPA +
+

-

+
+
+
PMDA +
+

-

+
+
+
+
+

File size +

+
+
XPT +
+

-

+
+
+
FDA +
+

5 GB

+
+
+
NMPA +
+

To be consulted if sponsors have datasets >= 5 GB No requirement +to split datasets

+
+
+
PMDA +
+

Information has not yet been collected.

+
+
+
+
+
+ + + +
+ + + +
+
+ + + + + + + diff --git a/articles/deepdive.html b/articles/deepdive.html index 593c9361..c302a47d 100644 --- a/articles/deepdive.html +++ b/articles/deepdive.html @@ -33,7 +33,7 @@ xportr - 0.3.1 + 0.4.0 - - - - - -
-
-
- -
-

An example dataset containing subject level data

-
- -
-

Usage

-
adsl
-
- -
-

Format

- -
-

adsl

- - -

A data frame with 254 rows and 48 columns:

STUDYID
-

Study Identifier

- -
USUBJID
-

Unique Subject Identifier

- -
SUBJID
-

Subject Identifier for the Study

- -
SITEID
-

Study Site Identifier

- -
SITEGR1
-

Pooled Site Group 1

- -
ARM
-

Description of Planned Arm

- -
TRT01P
-

Planned Treatment for Period 01

- -
TRT01PN
-

Planned Treatment for Period 01 (N)

- -
TRT01A
-

Actual Treatment for Period 01

- -
TRT01AN
-

Actual Treatment for Period 01 (N)

- -
TRTSDT
-

Date of First Exposure to Treatment

- -
TRTEDT
-

Date of Last Exposure to Treatment

- -
TRTDUR
-

Duration of Treatment (days)

- -
AVGDD
-

Avg Daily Dose (as planned)

- -
CUMDOSE
-

Cumulative Dose (as planned)

- -
AGE
-

Age

- -
AGEGR1
-

Pooled Age Group 1

- -
AGEGR1N
-

Pooled Age Group 1 (N)

- -
AGEU
-

Age Units

- -
RACE
-

Race

- -
RACEN
-

Race (N)

- -
SEX
-

Sex

- -
ETHNIC
-

Ethnicity

- -
SAFFL
-

Safety Population Flag

- -
ITTFL
-

Intent-To-Treat Population Flag

- -
EFFFL
-

Efficacy Population Flag

- -
COMP8FL
-

Completers of Week 8 Population Flag

- -
COMP16FL
-

Completers of Week 16 Population Flag

- -
COMP24FL
-

Completers of Week 24 Population Flag

- -
DISCONFL
-

Did the Subject Discontinue the Study

- -
DSRAEFL
-

Discontinued due to AE

- -
DTHFL
-

Subject Died

- -
BMIBL
-

Baseline BMI (kg/m^2)

- -
BMIBLGR1
-

Pooled Baseline BMI Group 1

- -
HEIGHTBL
-

Baseline Height (cm)

- -
WEIGHTBL
-

Baseline Weight (kg)

- -
EDUCLVL
-

Years of Education

- -
DISONSDT
-

Date of Onset of Disease

- -
DURDIS
-

Duration of Disease (Months)

- -
DURDSGR1
-

Pooled Disease Duration Group 1

- -
VISIT1DT
-

Date of Visit 1

- -
RFSTDTC
-

Subject Reference Start Date/Time

- -
RFENDTC
-

Subject Reference End Date/Time

- -
VISNUMEN
-

End of Trt Visit (Vis 12 or Early Term.)

- -
RFENDT
-

Date of Discontinuation/Completion

- -
DCDECOD
-

Standardized Disposition Term

- -
DCREASCD
-

Reason for Discontinuation

- -
MMSETOT
-

MMSE Total

- - -
- -
- -
- - -
- - - -
- - - - - - - diff --git a/reference/adsl_xportr.html b/reference/adsl_xportr.html new file mode 100644 index 00000000..951e7de7 --- /dev/null +++ b/reference/adsl_xportr.html @@ -0,0 +1,261 @@ + +Analysis Dataset Subject Level — adsl_xportr • xportr + Skip to contents + + +
+
+
+ +
+

An example dataset containing subject level data

+
+ +
+

Usage

+
data("adsl_xportr")
+
+ +
+

Format

+ +
+

adsl_xportr

+ + +

A data frame with 306 rows and 51 columns:

STUDYID
+

Study Identifier

+ +
USUBJID
+

Unique Subject Identifier

+ +
SUBJID
+

Subject Identifier for the Study

+ +
RFSTDTC
+

Subject Reference Start Date/Time

+ +
RFENDTC
+

Subject Reference End Date/Time

+ +
RFXSTDTC
+

Date/Time of First Study Treatment

+ +
RFXENDTC
+

Date/Time of Last Study Treatment

+ +
RFICDTC
+

Date/Time of Informed Consent

+ +
RFPENDTC
+

Date/Time of End of Participation

+ +
DTHDTC
+

Date/Time of Death

+ +
DTHFL
+

Subject Death Flag

+ +
SITEID
+

Study Site Identifier

+ +
AGE
+

Age

+ +
AGEU
+

Age Units

+ +
SEX
+

Sex

+ +
RACE
+

Race

+ +
ETHNIC
+

Ethnicity

+ +
ARMCD
+

Planned Arm Code

+ +
ARM
+

Description of Planned Arm

+ +
ACTARMCD
+

Actual Arm Code

+ +
ACTARM
+

Description of Actual Arm

+ +
COUNTRY
+

Country

+ +
DMDTC
+

Date/Time of Collection

+ +
DMDY
+

Study Day of Collection

+ +
TRT01P
+

Planned Treatment for Period 01

+ +
TRT01A
+

Actual Treatment for Period 01

+ +
TRTSDTM
+

Datetime of First Exposure to Treatment

+ +
TRTSTMF
+

Time of First Exposure Imputation Flag

+ +
TRTEDTM
+

Datetime of Last Exposure to Treatment

+ +
TRTETMF
+

Time of Last Exposure Imputation Flag

+ +
TRTSDT
+

Date of First Exposure to Treatment

+ +
TRTEDT
+

Date of Last Exposure to Treatment

+ +
TRTDURD
+

Total Treatment Duration (Days)

+ +
SCRFDT
+

Screen Failure Date

+ +
EOSDT
+

End of Study Date

+ +
EOSSTT
+

End of Study Status

+ +
FRVDT
+

Final Retrieval Visit Date

+ +
RANDDT
+

Date of Randomization

+ +
DTHDT
+

Date of Death

+ +
DTHDTF
+

Date of Death Imputation Flag

+ +
DTHADY
+

Relative Day of Death

+ +
LDDTHELD
+

Elapsed Days from Last Dose to Death

+ +
LSTALVDT
+

Date Last Known Alive

+ +
SAFFL
+

Safety Population Flag

+ +
RACEGR1
+

Pooled Race Group 1

+ +
AGEGR1
+

Pooled Age Group 1

+ +
REGION1
+

Geographic Region 1

+ +
LDDTHGR1
+

Last Dose to Death - Days Elapsed Group 1

+ +
DTH30FL
+

Death Within 30 Days of Last Trt Flag

+ +
DTHA30FL
+

Death After 30 Days from Last Trt Flag

+ +
DTHB30FL
+

Death Within 30 Days of First Trt Flag

+ + +
+ +
+
+

Source

+

Dataset created by admiral::use_ad_template("adsl")

+
+ +
+ + +
+ + + +
+ + + + + + + diff --git a/reference/dataset_spec.html b/reference/dataset_spec.html new file mode 100644 index 00000000..e6e1784c --- /dev/null +++ b/reference/dataset_spec.html @@ -0,0 +1,131 @@ + +Example Dataset Specification — dataset_spec • xportr + Skip to contents + + +
+
+
+ +
+

Example Dataset Specification

+
+ +
+

Usage

+
data("dataset_spec")
+
+ +
+

Format

+ +
+

dataset_spec

+ + +

A data frame with 1 row and 9 columns:

Dataset
+

chr: Dataset

+ +
Description
+

chr: Dataset description

+ +
Class
+

chr: Dataset class

+ +
Structure
+

lgl: Logical, indicating if there's a specific structure

+ +
Purpose
+

chr: Purpose of the dataset

+ +
Key, Variables
+

chr: Join Key variables in the dataset

+ +
Repeating
+

chr: Indicates if the dataset is repeating

+ +
Reference Data
+

lgl: Reference Data

+ +
Comment
+

chr: Additional comment

+ + +
+ +
+ +
+ + +
+ + + +
+ + + + + + + diff --git a/reference/expect_attr_width.html b/reference/expect_attr_width.html index 08b3af22..fcf15dfc 100644 --- a/reference/expect_attr_width.html +++ b/reference/expect_attr_width.html @@ -10,7 +10,7 @@ xportr - 0.3.1 + 0.4.0 - - - - - -
-
-
- -
-

Utility for Variable Labels

-
- -
-

Usage

-
label_log(miss_vars, verbose)
-
- -
-

Arguments

-
miss_vars
-

Missing variables in metadata

- - -
verbose
-

Provides additional messaging for user

- -
-
-

Value

- - -

Output to Console

-
- -
- - -
- - - -
- - - - - - - diff --git a/reference/length_log.html b/reference/length_log.html deleted file mode 100644 index def8199c..00000000 --- a/reference/length_log.html +++ /dev/null @@ -1,108 +0,0 @@ - -Utility for Lengths — length_log • xportr - Skip to contents - - -
-
-
- -
-

Utility for Lengths

-
- -
-

Usage

-
length_log(miss_vars, verbose)
-
- -
-

Arguments

-
miss_vars
-

Variables missing from metadata

- - -
verbose
-

Provides additional messaging for user

- -
-
-

Value

- - -

Output to Console

-
- -
- - -
- - - -
- - - - - - - diff --git a/reference/xportr_metadata.html b/reference/metadata.html similarity index 58% rename from reference/xportr_metadata.html rename to reference/metadata.html index 7d18fa9e..d92064b2 100644 --- a/reference/xportr_metadata.html +++ b/reference/metadata.html @@ -1,11 +1,13 @@ -Set variable specifications and domain — xportr_metadata • xportrSet variable specifications and domain — xportr_metadata • xportr @@ -16,7 +18,7 @@ xportr - 0.3.1 + 0.4.0 - - - - - -
-
-
- -
-

Utility for Types

-
- -
-

Usage

-
type_log(meta_ordered, type_mismatch_ind, verbose)
-
- -
-

Arguments

-
meta_ordered
-

fill in later

- - -
type_mismatch_ind
-

fill in later

- - -
verbose
-

Provides additional messaging for user

- -
-
-

Value

- - -

Output to Console

-
- -
- - -
- - - -
- - - - - - - diff --git a/reference/var_ord_msg.html b/reference/var_ord_msg.html deleted file mode 100644 index 776983de..00000000 --- a/reference/var_ord_msg.html +++ /dev/null @@ -1,112 +0,0 @@ - -Utility for Ordering — var_ord_msg • xportr - Skip to contents - - -
-
-
- -
-

Utility for Ordering

-
- -
-

Usage

-
var_ord_msg(reordered_vars, moved_vars, verbose)
-
- -
-

Arguments

-
reordered_vars
-

Number of variables reordered

- - -
moved_vars
-

Number of variables moved in the dataset

- - -
verbose
-

Provides additional messaging for user

- -
-
-

Value

- - -

Output to Console

-
- -
- - -
- - - -
- - - - - - - diff --git a/reference/var_spec.html b/reference/var_spec.html index 9ffc6f94..40a94f5b 100644 --- a/reference/var_spec.html +++ b/reference/var_spec.html @@ -1,5 +1,5 @@ -Example Dataset Specification — var_spec • xportrExample Dataset Variable Specification — var_spec • xportr @@ -10,7 +10,7 @@ xportr - 0.3.1 + 0.4.0 + + + + + +
+
+
+ +
+

Wrapper to apply all core xportr functions and write xpt

+
+ +
+

Usage

+
xportr(
+  .df,
+  var_metadata = NULL,
+  df_metadata = NULL,
+  domain = NULL,
+  verbose = NULL,
+  path,
+  strict_checks = FALSE
+)
+
+ +
+

Arguments

+
.df
+

A data frame of CDISC standard.

+ + +
var_metadata
+

A data frame containing variable level metadata

+ + +
df_metadata
+

A data frame containing dataset level metadata.

+ + +
domain
+

Appropriate CDISC dataset name, e.g. ADAE, DM. Used to subset +the metadata object.

+ + +
verbose
+

The action this function takes when an action is taken on the +dataset or function validation finds an issue. See 'Messaging' section for +details. Options are 'stop', 'warn', 'message', and 'none'

+ + +
path
+

Path where transport file will be written. File name sans will be +used as xpt name.

+ + +
strict_checks
+

If TRUE, xpt validation will report errors and not write +out the dataset. If FALSE, xpt validation will report warnings and continue +with writing out the dataset. Defaults to FALSE

+ +
+
+

Value

+ + +

Returns the input dataframe invisibly

+
+ +
+

Examples

+
data("adsl_xportr", "dataset_spec", "var_spec")
+adsl <- adsl_xportr
+
+library(magrittr)
+test_dir <- tempdir()
+
+pipeline_path <- file.path(test_dir, "adslpipe.xpt")
+xportr_path <- file.path(test_dir, "adslxptr.xpt")
+
+dataset_spec_low <- setNames(dataset_spec, tolower(names(dataset_spec)))
+names(dataset_spec_low)[[2]] <- "label"
+
+var_spec_low <- setNames(var_spec, tolower(names(var_spec)))
+names(var_spec_low)[[5]] <- "type"
+
+adsl %>%
+  xportr_metadata(var_spec_low, "ADSL", verbose = "none") %>%
+  xportr_type() %>%
+  xportr_length() %>%
+  xportr_label() %>%
+  xportr_order() %>%
+  xportr_format() %>%
+  xportr_df_label(dataset_spec_low) %>%
+  xportr_write(pipeline_path)
+#> ── Variable lengths missing from metadata. ──
+#> 
+#>  30 lengths resolved `RFXSTDTC`, `RFXENDTC`, `RFICDTC`, `RFPENDTC`, `DTHDTC`, `ARMCD`, `ACTARMCD`, `ACTARM`, `COUNTRY`, `DMDTC`, `DMDY`, `TRTSDTM`, `TRTSTMF`, `TRTEDTM`, `TRTETMF`, `SCRFDT`, `EOSDT`, `FRVDT`, `RANDDT`, `DTHDT`, `DTHDTF`, `DTHADY`, `LDDTHELD`, `LSTALVDT`, `RACEGR1`, `REGION1`, `LDDTHGR1`, `DTH30FL`, `DTHA30FL`, and `DTHB30FL`
+#> 
+#> ── Variable labels missing from metadata. ──
+#> 
+#>  30 labels skipped
+#> 
+#> ── 30 variables not in spec and moved to end ──
+#> 
+#> ── 42 reordered in dataset ──
+#> 
+
+# `xportr()` can be used to apply a whole pipeline at once
+xportr(
+  adsl,
+  var_metadata = var_spec_low,
+  df_metadata = dataset_spec_low,
+  domain = "ADSL",
+  verbose = "none",
+  path = xportr_path
+)
+#> ── Variable lengths missing from metadata. ──
+#> 
+#>  30 lengths resolved `RFXSTDTC`, `RFXENDTC`, `RFICDTC`, `RFPENDTC`, `DTHDTC`, `ARMCD`, `ACTARMCD`, `ACTARM`, `COUNTRY`, `DMDTC`, `DMDY`, `TRTSDTM`, `TRTSTMF`, `TRTEDTM`, `TRTETMF`, `SCRFDT`, `EOSDT`, `FRVDT`, `RANDDT`, `DTHDT`, `DTHDTF`, `DTHADY`, `LDDTHELD`, `LSTALVDT`, `RACEGR1`, `REGION1`, `LDDTHGR1`, `DTH30FL`, `DTHA30FL`, and `DTHB30FL`
+#> 
+#> ── Variable labels missing from metadata. ──
+#> 
+#>  30 labels skipped
+#> 
+#> ── 30 variables not in spec and moved to end ──
+#> 
+#> ── 42 reordered in dataset ──
+#> 
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/xportr_df_label.html b/reference/xportr_df_label.html index 5dcbf69a..85589008 100644 --- a/reference/xportr_df_label.html +++ b/reference/xportr_df_label.html @@ -12,7 +12,7 @@ xportr - 0.3.1 + 0.4.0 - - - - - -
-
-
- -
-

Functions to output user messages, usually relating to differences -found between dataframe and the metacore/metadata object

-
- -
-

Usage

-
xportr_logger(message, type = "none", ...)
-
- -
-

Arguments

-
message
-

Output to be sent out for user

- - -
type
-

Three types: abort, warn, inform

- - -
...
-

additional arguments if needed

- -
-
-

Value

- - -

Output to Console

-
- -
- - -
- - - -
- - - - - - - diff --git a/reference/xportr_options.html b/reference/xportr_options.html new file mode 100644 index 00000000..4e02bf64 --- /dev/null +++ b/reference/xportr_options.html @@ -0,0 +1,273 @@ + +Get or set xportr options — xportr_options • xportr + Skip to contents + + +
+
+
+ +
+

There are two mechanisms for working with options for xportr. One is the +options() function, which is part of base R, and the other is the +xportr_options() function, which is in the xportr package. The reason for +these two mechanisms is has to do with legacy code and scoping.

+

The options() function sets options globally, for the duration of the R +process. The getOption() function retrieves the value of an option. All +xportr related options of this type are prefixed with "xportr.".

+
+ +
+

Usage

+
xportr_options(...)
+
+ +
+

Arguments

+
...
+

Options to set, with the form name = value or a character vector of option names.

+ +
+
+

Options with options()

+ + + +
xportr.df_domain_name
+

defaults to "dataset"

+: +The name of the domain "name" column in dataset metadata. +
xportr.df_label
+

defaults to "label"

+: +The column noting the dataset label in dataset metadata. +
xportr.domain_name
+

defaults to "dataset"

+: +The name of the domain "name" column in variable metadata. +
xportr.variable_name
+

defaults to "variable"

+: +The name of the variable "name" in variable metadata. +
xportr.type_name
+

defaults to "type"

+: +The name of the variable type column in variable metadata. +
xportr.label
+

defaults to "label"

+: +The name of the variable label column in variable metadata. +
xportr.length
+

defaults to "length"

+: +The name of the variable length column in variable metadata. +
xportr.order_name
+

defaults to "order"

+: +The name of the variable order column in variable metadata. +
xportr.format_name
+

defaults to "format"

+: +The name of the variable format column in variable metadata. +
xportr.format_verbose
+

defaults to "none"

+: +The default argument for the 'verbose' argument for xportr_format. +
xportr.label_verbose
+

defaults to "none"

+: +The default argument for the 'verbose' argument for xportr_label. +
xportr.length_verbose
+

defaults to "none"

+: +The default argument for the 'verbose' argument for xportr_length. +
xportr.type_verbose
+

defaults to "label"

+: +The default argument for the 'verbose' argument for xportr_type. +
xportr.character_types
+

defaults to "character"

+: +The default character vector used to explicitly coerce R classes to character XPT types. +
xportr.character_metadata_types
+

defaults to c("character", "char", "text", "date", "posixct", "posixt", "datetime", "time", "partialdate", "partialtime", "partialdatetime", "incompletedatetime", "durationdatetime", "intervaldatetime")

+: +The default character vector used to explicitly coerce R classes to character XPT types. +
xportr.numeric_metadata_types
+

defaults to c("integer", "numeric", "num", "float")

+: +The default character vector used to explicitly coerce R classes to numeric XPT types. +
xportr.numeric_types
+

defaults to c("integer", "float", "numeric", "posixct", "posixt", "time", "date")

+: +The default character vector used to explicitly coerce R classes to numeric XPT types. + +
+
+

Options with xportr_options()

+ + + +

Alternative to the options(), the xportr_options() function can be used to set the options. +The xportr_options() function also returns the current options when a character vector of +the options keys are passed into it. If nothing is passed into it, it returns the state of all xportr options.

+
+ +
+

Examples

+
xportr_options("xportr.df_label")
+#> $xportr.df_label
+#> [1] "label"
+#> 
+xportr_options(xportr.df_label = "data_label", xportr.label = "custom_label")
+xportr_options(c("xportr.label", "xportr.df_label"))
+#> $xportr.label
+#> [1] "custom_label"
+#> 
+#> $xportr.df_label
+#> [1] "data_label"
+#> 
+xportr_options()
+#> $xportr.df_domain_name
+#> [1] "dataset"
+#> 
+#> $xportr.df_label
+#> [1] "data_label"
+#> 
+#> $xportr.domain_name
+#> [1] "dataset"
+#> 
+#> $xportr.variable_name
+#> [1] "variable"
+#> 
+#> $xportr.type_name
+#> [1] "type"
+#> 
+#> $xportr.label
+#> [1] "custom_label"
+#> 
+#> $xportr.length
+#> [1] "length"
+#> 
+#> $xportr.order_name
+#> [1] "order"
+#> 
+#> $xportr.format_name
+#> [1] "format"
+#> 
+#> $xportr.format_verbose
+#> [1] "none"
+#> 
+#> $xportr.label_verbose
+#> [1] "none"
+#> 
+#> $xportr.length_verbose
+#> [1] "none"
+#> 
+#> $xportr.type_verbose
+#> [1] "none"
+#> 
+#> $xportr.character_types
+#> [1] "character"
+#> 
+#> $xportr.character_metadata_types
+#>  [1] "character"          "char"               "text"              
+#>  [4] "date"               "posixct"            "posixt"            
+#>  [7] "datetime"           "time"               "partialdate"       
+#> [10] "partialtime"        "partialdatetime"    "incompletedatetime"
+#> [13] "durationdatetime"   "intervaldatetime"  
+#> 
+#> $xportr.numeric_metadata_types
+#> [1] "integer" "numeric" "num"     "float"  
+#> 
+#> $xportr.numeric_types
+#> [1] "integer" "float"   "numeric" "posixct" "posixt"  "time"    "date"   
+#> 
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/var_names_log.html b/reference/xportr_options_list.html similarity index 82% rename from reference/var_names_log.html rename to reference/xportr_options_list.html index d9bdfc24..af53b363 100644 --- a/reference/var_names_log.html +++ b/reference/xportr_options_list.html @@ -1,5 +1,5 @@ -Utility for Renaming Variables — var_names_log • xportrA list with all the supported options of xportr — xportr_options_list • xportr @@ -10,7 +10,7 @@ xportr - 0.3.1 + 0.4.0 + + + + + +
+
+
+ +
+

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.

+
+ +
+

Usage

+
xportr_split(.df, split_by = NULL)
+
+ +
+

Arguments

+
.df
+

A data frame of CDISC standard.

+ + +
split_by
+

A quoted variable that will be passed to base::split().

+ +
+
+

Value

+ + +

A data frame with an additional attribute added so xportr_write()

+ + +

knows how to split the data frame.

+
+
+

Details

+

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.

+
+ +
+

Examples

+

+adlb <- data.frame(
+  USUBJID = c(1001, 1002, 1003),
+  LBCAT = c("HEMATOLOGY", "HEMATOLOGY", "CHEMISTRY")
+)
+
+adlb <- xportr_split(adlb, "LBCAT")
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/xportr_type.html b/reference/xportr_type.html index cd2f6982..e19ea279 100644 --- a/reference/xportr_type.html +++ b/reference/xportr_type.html @@ -4,12 +4,12 @@ '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.">Coerce variable type — xportr_type • xportrCoerce variable type — xportr_type • xportr @@ -20,7 +20,7 @@ xportr - 0.3.1 + 0.4.0