diff --git a/devel/404.html b/devel/404.html index 194e264..4c78b74 100644 --- a/devel/404.html +++ b/devel/404.html @@ -57,13 +57,6 @@ - - @@ -141,7 +134,7 @@

APPENDIX: How to diff --git a/devel/articles/contribution_model.html b/devel/articles/contribution_model.html index 8215e7c..17efcf6 100644 --- a/devel/articles/contribution_model.html +++ b/devel/articles/contribution_model.html @@ -56,13 +56,6 @@ - - - - - - - - @@ -78,7 +71,7 @@

All vignettes

diff --git a/devel/articles/modular.html b/devel/articles/modular.html index ab83af9..1410d6b 100644 --- a/devel/articles/modular.html +++ b/devel/articles/modular.html @@ -56,13 +56,6 @@ - - - - - - @@ -98,7 +91,7 @@

Citation

diff --git a/devel/index.html b/devel/index.html index fe047b5..2ac0347 100644 --- a/devel/index.html +++ b/devel/index.html @@ -59,13 +59,6 @@ - - @@ -122,7 +115,7 @@

Various -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/pkgdown.js b/devel/pkgdown.js index 9757bf9..1a99c65 100644 --- a/devel/pkgdown.js +++ b/devel/pkgdown.js @@ -152,3 +152,11 @@ async function searchFuse(query, callback) { }); }); })(window.jQuery || window.$) + +document.addEventListener('keydown', function(event) { + // Check if the pressed key is '/' + if (event.key === '/') { + event.preventDefault(); // Prevent any default action associated with the '/' key + document.getElementById('search-input').focus(); // Set focus to the search input + } +}); diff --git a/devel/pkgdown.yml b/devel/pkgdown.yml index dced220..5fd8de7 100644 --- a/devel/pkgdown.yml +++ b/devel/pkgdown.yml @@ -1,5 +1,5 @@ pandoc: 3.1.11 -pkgdown: 2.1.0 +pkgdown: 2.1.1 pkgdown_sha: ~ articles: contribution_model: contribution_model.html @@ -9,7 +9,7 @@ articles: modular: modular.html variable_cut: variable_cut.html wrapper: wrapper.html -last_built: 2024-09-06T16:07Z +last_built: 2024-10-29T16:12Z urls: reference: https:/pharmaverse.github.io/datacutr/devel/reference article: https:/pharmaverse.github.io/datacutr/devel/articles diff --git a/devel/reference/apply_cut.html b/devel/reference/apply_cut.html index 935d0c0..b0ed364 100644 --- a/devel/reference/apply_cut.html +++ b/devel/reference/apply_cut.html @@ -38,13 +38,6 @@ @@ -123,7 +116,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/create_dcut.html b/devel/reference/create_dcut.html index 209e4e8..31da7bf 100644 --- a/devel/reference/create_dcut.html +++ b/devel/reference/create_dcut.html @@ -40,13 +40,6 @@ @@ -140,7 +133,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/datacutr-package.html b/devel/reference/datacutr-package.html index 04cb6f6..c87eb65 100644 --- a/devel/reference/datacutr-package.html +++ b/devel/reference/datacutr-package.html @@ -34,13 +34,6 @@ @@ -85,7 +78,7 @@

Author< diff --git a/devel/reference/datacutr_ae.html b/devel/reference/datacutr_ae.html index 8f41441..c35d205 100644 --- a/devel/reference/datacutr_ae.html +++ b/devel/reference/datacutr_ae.html @@ -32,13 +32,6 @@ @@ -85,7 +78,7 @@

Format< diff --git a/devel/reference/datacutr_dm.html b/devel/reference/datacutr_dm.html index 30fc04a..87cff8c 100644 --- a/devel/reference/datacutr_dm.html +++ b/devel/reference/datacutr_dm.html @@ -32,13 +32,6 @@ @@ -85,7 +78,7 @@

Format< diff --git a/devel/reference/datacutr_ds.html b/devel/reference/datacutr_ds.html index 226981f..3a86a09 100644 --- a/devel/reference/datacutr_ds.html +++ b/devel/reference/datacutr_ds.html @@ -32,13 +32,6 @@ @@ -85,7 +78,7 @@

Format< diff --git a/devel/reference/datacutr_fa.html b/devel/reference/datacutr_fa.html index 1dbc41a..f6cb81d 100644 --- a/devel/reference/datacutr_fa.html +++ b/devel/reference/datacutr_fa.html @@ -32,13 +32,6 @@ @@ -88,7 +81,7 @@

Format< diff --git a/devel/reference/datacutr_lb.html b/devel/reference/datacutr_lb.html index b6e41df..be216ea 100644 --- a/devel/reference/datacutr_lb.html +++ b/devel/reference/datacutr_lb.html @@ -32,13 +32,6 @@ @@ -85,7 +78,7 @@

Format< diff --git a/devel/reference/datacutr_sc.html b/devel/reference/datacutr_sc.html index d183954..4eb23db 100644 --- a/devel/reference/datacutr_sc.html +++ b/devel/reference/datacutr_sc.html @@ -32,13 +32,6 @@ @@ -82,7 +75,7 @@

Format< diff --git a/devel/reference/datacutr_ts.html b/devel/reference/datacutr_ts.html index 157d987..5edd555 100644 --- a/devel/reference/datacutr_ts.html +++ b/devel/reference/datacutr_ts.html @@ -32,13 +32,6 @@ @@ -82,7 +75,7 @@

Format< diff --git a/devel/reference/date_cut.html b/devel/reference/date_cut.html index 32acaa7..f964f6f 100644 --- a/devel/reference/date_cut.html +++ b/devel/reference/date_cut.html @@ -44,13 +44,6 @@ @@ -153,7 +146,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/drop_temp_vars.html b/devel/reference/drop_temp_vars.html index 0152f52..7121e78 100644 --- a/devel/reference/drop_temp_vars.html +++ b/devel/reference/drop_temp_vars.html @@ -36,13 +36,6 @@ @@ -146,7 +139,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/impute_dcutdtc.html b/devel/reference/impute_dcutdtc.html index e148c00..c43e0a3 100644 --- a/devel/reference/impute_dcutdtc.html +++ b/devel/reference/impute_dcutdtc.html @@ -34,13 +34,6 @@ @@ -111,7 +104,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/impute_sdtm.html b/devel/reference/impute_sdtm.html index cf3ab0a..351d188 100644 --- a/devel/reference/impute_sdtm.html +++ b/devel/reference/impute_sdtm.html @@ -32,13 +32,6 @@ @@ -108,7 +101,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/index.html b/devel/reference/index.html index e9a651c..666d17c 100644 --- a/devel/reference/index.html +++ b/devel/reference/index.html @@ -32,13 +32,6 @@ @@ -196,7 +189,7 @@

Data

diff --git a/devel/reference/process_cut.html b/devel/reference/process_cut.html index 5344072..3679fa0 100644 --- a/devel/reference/process_cut.html +++ b/devel/reference/process_cut.html @@ -42,13 +42,6 @@ @@ -179,7 +172,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/pt_cut.html b/devel/reference/pt_cut.html index 1469664..bf22b44 100644 --- a/devel/reference/pt_cut.html +++ b/devel/reference/pt_cut.html @@ -34,13 +34,6 @@ @@ -122,7 +115,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/read_out.html b/devel/reference/read_out.html index fd926ba..069542e 100644 --- a/devel/reference/read_out.html +++ b/devel/reference/read_out.html @@ -36,13 +36,6 @@ @@ -174,7 +167,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/reference/special_dm_cut.html b/devel/reference/special_dm_cut.html index 581e9c6..b6d71c6 100644 --- a/devel/reference/special_dm_cut.html +++ b/devel/reference/special_dm_cut.html @@ -34,13 +34,6 @@ @@ -129,7 +122,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/devel/search.json b/devel/search.json index 4f949f8..95714b4 100644 --- a/devel/search.json +++ b/devel/search.json @@ -1 +1 @@ -[{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache License","title":"Apache License","text":"Version 2.0, January 2004 ","code":""},{"path":[]},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_1-definitions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"1. Definitions","title":"Apache License","text":"“License” shall mean terms conditions use, reproduction, distribution defined Sections 1 9 document. “Licensor” shall mean copyright owner entity authorized copyright owner granting License. “Legal Entity” shall mean union acting entity entities control, controlled , common control entity. purposes definition, “control” means () power, direct indirect, cause direction management entity, whether contract otherwise, (ii) ownership fifty percent (50%) outstanding shares, (iii) beneficial ownership entity. “” (“”) shall mean individual Legal Entity exercising permissions granted License. “Source” form shall mean preferred form making modifications, including limited software source code, documentation source, configuration files. “Object” form shall mean form resulting mechanical transformation translation Source form, including limited compiled object code, generated documentation, conversions media types. “Work” shall mean work authorship, whether Source Object form, made available License, indicated copyright notice included attached work (example provided Appendix ). “Derivative Works” shall mean work, whether Source Object form, based (derived ) Work editorial revisions, annotations, elaborations, modifications represent, whole, original work authorship. purposes License, Derivative Works shall include works remain separable , merely link (bind name) interfaces , Work Derivative Works thereof. “Contribution” shall mean work authorship, including original version Work modifications additions Work Derivative Works thereof, intentionally submitted Licensor inclusion Work copyright owner individual Legal Entity authorized submit behalf copyright owner. purposes definition, “submitted” means form electronic, verbal, written communication sent Licensor representatives, including limited communication electronic mailing lists, source code control systems, issue tracking systems managed , behalf , Licensor purpose discussing improving Work, excluding communication conspicuously marked otherwise designated writing copyright owner “Contribution.” “Contributor” shall mean Licensor individual Legal Entity behalf Contribution received Licensor subsequently incorporated within Work.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_2-grant-of-copyright-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"2. Grant of Copyright License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable copyright license reproduce, prepare Derivative Works , publicly display, publicly perform, sublicense, distribute Work Derivative Works Source Object form.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_3-grant-of-patent-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"3. Grant of Patent License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable (except stated section) patent license make, made, use, offer sell, sell, import, otherwise transfer Work, license applies patent claims licensable Contributor necessarily infringed Contribution(s) alone combination Contribution(s) Work Contribution(s) submitted. institute patent litigation entity (including cross-claim counterclaim lawsuit) alleging Work Contribution incorporated within Work constitutes direct contributory patent infringement, patent licenses granted License Work shall terminate date litigation filed.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_4-redistribution","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"4. Redistribution","title":"Apache License","text":"may reproduce distribute copies Work Derivative Works thereof medium, without modifications, Source Object form, provided meet following conditions: () must give recipients Work Derivative Works copy License; (b) must cause modified files carry prominent notices stating changed files; (c) must retain, Source form Derivative Works distribute, copyright, patent, trademark, attribution notices Source form Work, excluding notices pertain part Derivative Works; (d) Work includes “NOTICE” text file part distribution, Derivative Works distribute must include readable copy attribution notices contained within NOTICE file, excluding notices pertain part Derivative Works, least one following places: within NOTICE text file distributed part Derivative Works; within Source form documentation, provided along Derivative Works; , within display generated Derivative Works, wherever third-party notices normally appear. contents NOTICE file informational purposes modify License. may add attribution notices within Derivative Works distribute, alongside addendum NOTICE text Work, provided additional attribution notices construed modifying License. may add copyright statement modifications may provide additional different license terms conditions use, reproduction, distribution modifications, Derivative Works whole, provided use, reproduction, distribution Work otherwise complies conditions stated License.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_5-submission-of-contributions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"5. Submission of Contributions","title":"Apache License","text":"Unless explicitly state otherwise, Contribution intentionally submitted inclusion Work Licensor shall terms conditions License, without additional terms conditions. Notwithstanding , nothing herein shall supersede modify terms separate license agreement may executed Licensor regarding Contributions.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_6-trademarks","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"6. Trademarks","title":"Apache License","text":"License grant permission use trade names, trademarks, service marks, product names Licensor, except required reasonable customary use describing origin Work reproducing content NOTICE file.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_7-disclaimer-of-warranty","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"7. Disclaimer of Warranty","title":"Apache License","text":"Unless required applicable law agreed writing, Licensor provides Work (Contributor provides Contributions) “” BASIS, WITHOUT WARRANTIES CONDITIONS KIND, either express implied, including, without limitation, warranties conditions TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS PARTICULAR PURPOSE. solely responsible determining appropriateness using redistributing Work assume risks associated exercise permissions License.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_8-limitation-of-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"8. Limitation of Liability","title":"Apache License","text":"event legal theory, whether tort (including negligence), contract, otherwise, unless required applicable law (deliberate grossly negligent acts) agreed writing, shall Contributor liable damages, including direct, indirect, special, incidental, consequential damages character arising result License use inability use Work (including limited damages loss goodwill, work stoppage, computer failure malfunction, commercial damages losses), even Contributor advised possibility damages.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_9-accepting-warranty-or-additional-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"9. Accepting Warranty or Additional Liability","title":"Apache License","text":"redistributing Work Derivative Works thereof, may choose offer, charge fee , acceptance support, warranty, indemnity, liability obligations /rights consistent License. However, accepting obligations, may act behalf sole responsibility, behalf Contributor, agree indemnify, defend, hold Contributor harmless liability incurred , claims asserted , Contributor reason accepting warranty additional liability. END TERMS CONDITIONS","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"appendix-how-to-apply-the-apache-license-to-your-work","dir":"","previous_headings":"","what":"APPENDIX: How to apply the Apache License to your work","title":"Apache License","text":"apply Apache License work, attach following boilerplate notice, fields enclosed brackets [] replaced identifying information. (Don’t include brackets!) text enclosed appropriate comment syntax file format. also recommend file class name description purpose included “printed page” copyright notice easier identification within third-party archives.","code":"Copyright 2022 F. Hoffmann-La Roche AG Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/contribution_model.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Contribution to {datacutr}","text":"vignette gives overview anticipated contribution model. goal enable users datacutr contribute test contribution model datacutr. Adjustments might made time.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/contribution_model.html","id":"basics","dir":"Articles","previous_headings":"","what":"Basics","title":"Contribution to {datacutr}","text":"new contribution, user creates issue issue tab GitHub put backlog. created issues reviewed creator receive initial feedback via comment. Someone core development team triage new issues assigning appropriate labels (“user request” can easily identify new requests).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/contribution_model.html","id":"contribution-model","dir":"Articles","previous_headings":"","what":"Contribution Model","title":"Contribution to {datacutr}","text":"First, user creates issue comments existing issue notify ’d like contribute enhancements datacutr. datacutr core development team member touch discuss next steps.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"main-concept-of-data-cut-process","dir":"Articles","previous_headings":"","what":"Main Concept of Data cut process","title":"Get Started","text":"main idea datacutr provide standardized approach applying datacut SDTM datasets. process applied package following, create meta dataset DCUT references patients included within cut, cut date used reference (normally Clinical Cut-Date data cleaned ). using DCUT reference, records can removed SDTM data either ) patients part reference DCUT, b) records can identified data cut date supplied.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"data-cut-approaches-for-different-sdtm","dir":"Articles","previous_headings":"","what":"Data cut approaches for different SDTM","title":"Get Started","text":"package relies creating lists SDTM processed specific ways, include, cut - SDTM remain exactly source Patient cut - Patients identified source meta DCUT kept, exclusion records conducted Date cut - Patients identified source meta DCUT kept, records identified data cut date removed Special DM cut - DM contains critical temporal derivations around Deaths require update within data cut, option allows user revert DM.DTHFL DM.DTHDTC death identified data cut date","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"technical-approach-within-datacutr","dir":"Articles","previous_headings":"","what":"Technical approach within {datacutr}","title":"Get Started","text":"datacutr package allows two different approaches user apply data cut process Modular approach - approach breaks steps data cut individual functions. useful user wishes transparency process, de-bugging. also allows user step process bespoke study specific handling required already defined part datacutr process. See Modular Approach implement Wrapped approach - approach users want quick cut generation, need step alter approach taken datacutr. See Wrapped Approach implement","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"data-handling-rules","dir":"Articles","previous_headings":"","what":"Data Handling Rules","title":"Get Started","text":"Inclusion Subjects Subjects randomization date data cutoff date included data cut. study randomized, enrolment date used instead. studies study drug administered, randomization enrolment performed (e.g., observational studies), study-specific definition enrolment date provided. Inclusion Records Subjects Included Data Cut records involving dates, record included data cut relevant date data cutoff date. user selects date variable domain cut applied (ie. –STDTC –DTC). mix (eg. different sources within FA using either FADTC FASTDTC) expectation user create temporary variable store correct date per observation. example shown “Example Wrapped Approach” vignette. Missing Partial Date/Times motivation inclusive possible. expect data cutoff date/time least complete date. time missing, impute maximum possible time, .e; impute 23 missing hours, 59 missing minutes, 59 missing seconds. SDTMv records chosen SDTMv date/time variable missing (missing year component) included data cut. partial date/times imputed minimum possible date/time, .e; impute 01 missing month, 01 missing day, 00 missing hours, 00 missing minutes, 00 missing seconds. imputing missing components data cutoff date/time maximum possible value missing components SDTMv date/time variable minimum possible value, ensure record cut clear SDTMv date/time variable data cutoff date/time. Handling Deaths deaths, derived DM death information updated reflect state time data cutoff date. Death Flag (DM.DTHFL) associated variables (e.g., DM.DTHDT) set missing subject died data cutoff date.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"validation","dir":"Articles","previous_headings":"","what":"Validation","title":"Get Started","text":"functions reviewed tested ensure work described documentation. Testing done SDTMIG v3.2 (SDTM v1.4).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"starting-a-script","dir":"Articles","previous_headings":"","what":"Starting a Script","title":"Get Started","text":"datacutr provides template R scripts starting point. See Modular Approach Wrapped Approach details.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplemodular.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example Modular Approach","text":"article example workflow modular approach section cut explicitly called.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplemodular.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Example Modular Approach","text":"","code":"# Name: Datacut Template Code - Modular Approach # Creating data to be cut ------------------------------------------------ library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts ) # Create DCUT ------------------------------------------------------------ dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" ) # Pre-processing of FA ---------------------------------------------------- # Update FA source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) )) # Specify cut types ------------------------------------------------------ # Patient cut - cut applied will only be for patients existing in DCUT patient_cut_list <- c(\"sc\", \"ds\") # Date cut - cut applied will be both for patients existing in DCUT, and date cut against DCUTDTM date_cut_list <- rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ) # No cut - data does not need to be cut no_cut_list <- list(ts = source_data$ts) # Create the cutting variables ------------------------------------------- # Conduct the patient cut ------------------------------------------------ patient_cut_data <- lapply( source_data[patient_cut_list], pt_cut, dataset_cut = dcut ) # Conduct xxSTDTC or xxDTC Cut ------------------------------------------- date_cut_data <- pmap( .l = list( dataset_sdtm = source_data[date_cut_list[, 1]], sdtm_date_var = syms(date_cut_list[, 2]) ), .f = date_cut, dataset_cut = dcut, cut_var = DCUTDTM ) # Conduct DM special cut for DTH flags after DCUTDTM --------------------- dm_cut <- special_dm_cut( dataset_dm = source_data$dm, dataset_cut = dcut, cut_var = DCUTDTM ) # Apply the cut -------------------------------- cut_data <- purrr::map( c(patient_cut_data, date_cut_data, list(dm = dm_cut)), apply_cut, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE ) # Add on data which is not cut final_data <- c(cut_data, no_cut_list, list(dcut = dcut))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplewrapped.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example Wrapped Approach","text":"article example workflow wrapped approach modules wrapped cut_data function.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplewrapped.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Example Wrapped Approach","text":"","code":"# Name: Datacut Template Code - Modular Approach # Creating data to be cut ------------------------------------------------ library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) # Name: Datacut Template Code - Wrapped Approach # Creating data to be cut ------------------------------------------------ source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts ) # Create DCUT ------------------------------------------------------------ dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" ) # Pre-processing of FA ---------------------------------------------------- # Update FA source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) )) # Process data cut -------------------------------------------------------- cut_data <- process_cut( source_sdtm_data = source_data, patient_cut_v = c(\"sc\", \"ds\"), date_cut_m = rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ), no_cut_v = c(\"ts\"), dataset_cut = dcut, cut_var = DCUTDTM, special_dm = TRUE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Modular Approach","text":"article describes cut study SDTM data using modular approach enable study project specific customization.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"programming-flow","dir":"Articles","previous_headings":"","what":"Programming Flow","title":"Modular Approach","text":"Read Data Create DCUT Dataset Preprocess Datasets Specify Cut Types Patient Cut Date Cut DM Cut Apply Cut Output Final List Cut Datasets","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"readdata","dir":"Articles","previous_headings":"Programming Flow","what":"Read in Data","title":"Modular Approach","text":"start, SDTM data cut needs stored list.","code":"library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) library(rlang) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"dcut","dir":"Articles","previous_headings":"Programming Flow","what":"Create DCUT Dataset","title":"Modular Approach","text":"next step create DCUT dataset containing datacut date description.","code":"dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"preprocess","dir":"Articles","previous_headings":"Programming Flow","what":"Preprocess Datasets","title":"Modular Approach","text":"pre-processing datasets needed, example case FA, multiple date variables, done next.","code":"source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) ))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"cuttypes","dir":"Articles","previous_headings":"Programming Flow","what":"Specify Cut Types","title":"Modular Approach","text":"’ll next specify cut types dataset (patient cut, date cut cut) case date cut date variable used.","code":"patient_cut_list <- c(\"sc\", \"ds\") date_cut_list <- rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ) no_cut_list <- list(ts = source_data$ts)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"ptcut","dir":"Articles","previous_headings":"Programming Flow","what":"Patient Cut","title":"Modular Approach","text":"Next ’ll apply patient cut. adds temporary flag variables indicating observations removed, example SC:","code":"patient_cut_data <- lapply( source_data[patient_cut_list], pt_cut, dataset_cut = dcut )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"dtcut","dir":"Articles","previous_headings":"Programming Flow","what":"Date Cut","title":"Modular Approach","text":"Next ’ll apply date cut. adds temporary flag variables indicating observations removed, example AE:","code":"date_cut_data <- pmap( .l = list( dataset_sdtm = source_data[date_cut_list[, 1]], sdtm_date_var = syms(date_cut_list[, 2]) ), .f = date_cut, dataset_cut = dcut, cut_var = DCUTDTM )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"dmcut","dir":"Articles","previous_headings":"Programming Flow","what":"DM Cut","title":"Modular Approach","text":"lastly ’ll apply special DM cut also updates death related variables. adds temporary variables indicating death records change result applying datacut:","code":"dm_cut <- special_dm_cut( dataset_dm = source_data$dm, dataset_cut = dcut, cut_var = DCUTDTM )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"applycut","dir":"Articles","previous_headings":"Programming Flow","what":"Apply Cut","title":"Modular Approach","text":"last step create RMD report, summarize patients observations cut, apply cut strip observations flagged removed.","code":"cut_data <- purrr::map( c(patient_cut_data, date_cut_data, list(dm = dm_cut)), apply_cut, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"output","dir":"Articles","previous_headings":"Programming Flow","what":"Output Final List of Cut Datasets","title":"Modular Approach","text":"Lastly, create final list cut SDTM data, adding SDTM cut needed.","code":"final_data <- c(cut_data, no_cut_list, list(dcut = dcut))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Applying a Variable Date Cut","text":"article describes apply data cut, date apply common singular date, different date per patient. example cut patients data week 24 visit date. example can done utilizing datacutr.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"programming-flow","dir":"Articles","previous_headings":"","what":"Programming Flow","title":"Applying a Variable Date Cut","text":"Read Data Create DCUT Dataset Postprocess DCUT","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"readdata","dir":"Articles","previous_headings":"Programming Flow","what":"Read in Data","title":"Applying a Variable Date Cut","text":"start, SDTM data needs stored list.","code":"library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) library(rlang) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"dcut","dir":"Articles","previous_headings":"Programming Flow","what":"Create DCUT Dataset","title":"Applying a Variable Date Cut","text":"next step create DCUT dataset containing description, fixed date ensures data necessary ds included DCUT. example today’s date.","code":"dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = as.character(lubridate::today()), cut_description = \"Week 24 Cut\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"postprocess","dir":"Articles","previous_headings":"Programming Flow","what":"Postprocess DCUT","title":"Applying a Variable Date Cut","text":"next step update DCUT required date per patient required variable cut. example using trial visits source. required event observed, keeping DCUT.DCUTDTC future/today date ensures data kept within cut patient. Now DCUT prepared, rest process follows previously prescribed using either wrapped function approach Link modular approach Link","code":"sv <- tibble::tribble( ~USUBJID, ~VISIT, ~SVSTDTC, \"AB12345-001\", \"WEEK24\", \"2022-06-01\", \"AB12345-002\", \"WEEK24\", \"2022-06-30\", \"AB12345-003\", \"WEEK24\", \"2022-07-01\", \"AB12345-004\", \"WEEK24\", \"2022-05-04\", ) dcut <- dcut %>% left_join(sv %>% filter(VISIT == \"WEEK24\") %>% select(USUBJID, SVSTDTC)) %>% mutate(DCUTDTC = as.character(ifelse(!is.na(SVSTDTC), SVSTDTC, as.character(DCUTDTC)))) %>% impute_dcutdtc(dsin = ., varin = DCUTDTC, varout = DCUTDTM)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Wrapped Approach","text":"article describes cut study SDTM data using wrapper function within datacutr package. Please note , wrapped approach may suitable wish enable study project specific customization.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"programming-flow","dir":"Articles","previous_headings":"","what":"Programming Flow","title":"Wrapped Approach","text":"Read Data Create DCUT Dataset Pre-process Datasets Process Data Cut","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"readdata","dir":"Articles","previous_headings":"Programming Flow","what":"Read in Data","title":"Wrapped Approach","text":"start, SDTM data cut needs stored within list.","code":"library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) library(rlang) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"dcut","dir":"Articles","previous_headings":"Programming Flow","what":"Create DCUT Dataset","title":"Wrapped Approach","text":"next step create DCUT dataset containing datacut date description.","code":"dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"preprocess","dir":"Articles","previous_headings":"Programming Flow","what":"Preprocess Datasets","title":"Wrapped Approach","text":"pre-processing SDTM datasets needed, done next. example, case FA, FASTDTC FADTC date variables used, can combine one date variable.","code":"source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) ))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"processcut","dir":"Articles","previous_headings":"Programming Flow","what":"Process data cut","title":"Wrapped Approach","text":"Now, can perform datacut SDTM dataset. can specify cut types domain (patient cut, date cut, cut). date cut chosen, must also specify date variable used. “special” cut can performed demography domain (dm) special_dm parameter set TRUE. well performing standard patient cut, identify deaths occurring datacut date, set death variables (DTHDTC, DTHFL) missing. Please note , special_dm=TRUE, need specify cut type dm inputs. Please ensure selected cut type SDTM domains.","code":"cut_data <- process_cut( source_sdtm_data = source_data, patient_cut_v = c(\"sc\", \"ds\"), date_cut_m = rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ), no_cut_v = c(\"ts\"), dataset_cut = dcut, cut_var = DCUTDTM, special_dm = TRUE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Tim Barnett. Copyright holder, author, maintainer. Nathan Rees. Author. Alana Harris. Author. Cara Andrews. Author.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Barnett T, Rees N, Harris , Andrews C (2024). datacutr: SDTM Datacut. R package version 0.2.0, https://github.com/pharmaverse/datacutr, https://pharmaverse.github.io/datacutr/devel/.","code":"@Manual{, title = {datacutr: SDTM Datacut}, author = {Tim Barnett and Nathan Rees and Alana Harris and Cara Andrews}, year = {2024}, note = {R package version 0.2.0, https://github.com/pharmaverse/datacutr}, url = {https://pharmaverse.github.io/datacutr/devel/}, }"},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"datacutr-","dir":"","previous_headings":"","what":"SDTM Datacut","title":"SDTM Datacut","text":"SDTM Datacut R","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"purpose","dir":"","previous_headings":"","what":"Purpose","title":"SDTM Datacut","text":"provide open source tool enables pharmaceutical programming community apply data cut SDTM data R.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"SDTM Datacut","text":"package available CRAN can installed running following, install latest development version package directly GitHub use following code::","code":"install.packages(\"datacutr\") if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_github(\"pharmaverse/datacutr\", ref = \"devel\")"},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"SDTM Datacut","text":"package works tabulation data following SDTM standard. ease processing, assumption supplemental qualifiers combined parent domain prior application cut process (sometimes labeled SDTMv). user flexibility select type cut applied SDTM domain (either cut, patient cut, date cut, special DM cut).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"references-and-documentation","dir":"","previous_headings":"","what":"References and Documentation","title":"SDTM Datacut","text":"Please go Get Started section start using datacutr Please go Function Reference section break functions created datacutr Please see Contribution Model get involved making contributions","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"contact","dir":"","previous_headings":"","what":"Contact","title":"SDTM Datacut","text":"following support communications user developer community recommended: Slack - informal discussions, Q&building user community. don’t access, use link join pharmaverse Slack workspace GitHub Issues - direct feedback, enhancement requests raising bugs","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Applies the datacut based on the datacut flagging variables — apply_cut","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"Removes records datacut flagging variable, usually called DCUT_TEMP_REMOVE, marked \"Y\". Also, sets death related variables DM (DTHDTC DTHFL) missing death datacut flagging variable, usually called DCUT_TEMP_DTHCHANGE, marked \"Y\".","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"","code":"apply_cut(dsin, dcutvar, dthchangevar)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"dsin Name input dataframe dcutvar Name datacut flagging variable created pt_cut date_cut functions - usually called DCUT_TEMP_REMOVE. dthchangevar Name death datacut flagging variable created special_dm_cut function - usually called DCUT_TEMP_DTHCHANGE.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"Returns input dataframe, excluding rows dcutvar flagged \"Y\". DTHDTC DTHFL set missing records dthchangevar flagged \"Y\". variables \"DCUT_TEMP\" prefix removed.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"","code":"ae <- data.frame( USUBJID = c(\"UXYZ123a\", \"UXYZ123b\", \"UXYZ123c\", \"UXYZ123d\"), DCUT_TEMP_REMOVE = c(\"Y\", \"\", \"NA\", NA) ) ae_final <- apply_cut(dsin = ae, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE) dm <- data.frame( USUBJID = c(\"UXYZ123a\", \"UXYZ123b\", \"UXYZ123b\"), DTHDTC = c(\"2014-10-20\", \"2014-10-21\", \"2013-09-08\"), DTHFL = c(\"Y\", \"Y\", \"Y\"), DCUT_TEMP_REMOVE = c(NA, NA, \"Y\"), DCUT_TEMP_DTHCHANGE = c(NA, \"Y\", \"\") ) dm_final <- apply_cut(dsin = dm, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Datacut Dataset (DCUT) — create_dcut","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"filtering input DS dataset (based given filter condition), records SDTMv date/time variable datacut date/time (imputations) returned output datacut dataset (DCUT). Note ds_date_var cut_date inputs must ISO 8601 format (YYYY-MM-DDThh:mm:ss) imputed using impute_sdtm() impute_dcutdtc() functions.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"","code":"create_dcut(dataset_ds, ds_date_var, filter, cut_date, cut_description)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"dataset_ds Input DS SDTMv dataset ds_date_var Character date/time variable DS SDTMv compared datacut date filter Condition filter patients DS, give 1 row per patient cut_date Datacut date/time, e.g. \"2022-10-22\", NA date cut applied cut_description Datacut date/time description, e.g. \"Clinical Cut Date\"","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"Datacut dataset containing variables USUBJID, DCUTDTC, DCUTDTM DCUTDESC.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"Alana Harris","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"","code":"ds <- tibble::tribble( ~USUBJID, ~DSSEQ, ~DSDECOD, ~DSSTDTC, \"subject1\", 1, \"INFORMED CONSENT\", \"2020-06-23\", \"subject1\", 2, \"RANDOMIZATION\", \"2020-08-22\", \"subject1\", 3, \"WITHDRAWAL BY SUBJECT\", \"2020-05-01\", \"subject2\", 1, \"INFORMED CONSENT\", \"2020-07-13\", \"subject3\", 1, \"INFORMED CONSENT\", \"2020-06-03\", \"subject4\", 1, \"INFORMED CONSENT\", \"2021-01-01\", \"subject4\", 2, \"RANDOMIZATION\", \"2023-01-01\" ) dcut <- create_dcut( dataset_ds = ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-01-01\", cut_description = \"Clinical Cutoff Date\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr-package.html","id":null,"dir":"Reference","previous_headings":"","what":"datacutr: SDTM Datacut — datacutr-package","title":"datacutr: SDTM Datacut — datacutr-package","text":"Supports process applying cut Standard Data Tabulation Model (SDTM), part analysis specific points time data, normally part investigation clinical trials. functions support different approaches cutting different domains SDTM normally observed.","code":""},{"path":[]},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"datacutr: SDTM Datacut — datacutr-package","text":"Maintainer: Tim Barnett timothy.barnett@roche.com [copyright holder] Authors: Nathan Rees nathan.rees@roche.com Alana Harris alana.harris@roche.com Cara Andrews cara.andrews@roche.com","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ae.html","id":null,"dir":"Reference","previous_headings":"","what":"Adverse Events SDTMv Dataset — datacutr_ae","title":"Adverse Events SDTMv Dataset — datacutr_ae","text":"example Adverse Events (AE) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ae.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adverse Events SDTMv Dataset — datacutr_ae","text":"","code":"datacutr_ae"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ae.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Adverse Events SDTMv Dataset — datacutr_ae","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier AETERM Reported Term Adverse Event AESTDTC Start Date/Time Adverse Event","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_dm.html","id":null,"dir":"Reference","previous_headings":"","what":"Demographics SDTMv Dataset — datacutr_dm","title":"Demographics SDTMv Dataset — datacutr_dm","text":"example Demographics (DM) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_dm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Demographics SDTMv Dataset — datacutr_dm","text":"","code":"datacutr_dm"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_dm.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Demographics SDTMv Dataset — datacutr_dm","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier DTHFL Subject Death Flag DTHDTC Date/Time Death","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Disposition SDTMv Dataset — datacutr_ds","title":"Disposition SDTMv Dataset — datacutr_ds","text":"example Disposition (DS) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disposition SDTMv Dataset — datacutr_ds","text":"","code":"datacutr_ds"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ds.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Disposition SDTMv Dataset — datacutr_ds","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier DSDECOD Standardized Disposition Term DSSTDTC Start Date/Time Disposition Event","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_fa.html","id":null,"dir":"Reference","previous_headings":"","what":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","title":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","text":"example Findings Events Interventions (FA) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_fa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","text":"","code":"datacutr_fa"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_fa.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","text":"dataset 5 rows 4 variables: USUBJID Unique Subject Identifier FAORRES Result Finding Original Units FADTC Date/Time Collection FASTDTC Start Date/Time Observation","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_lb.html","id":null,"dir":"Reference","previous_headings":"","what":"Laboratory Test Results SDTMv Dataset — datacutr_lb","title":"Laboratory Test Results SDTMv Dataset — datacutr_lb","text":"example Laboratory Test Results (LB) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_lb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Laboratory Test Results SDTMv Dataset — datacutr_lb","text":"","code":"datacutr_lb"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_lb.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Laboratory Test Results SDTMv Dataset — datacutr_lb","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier LBORRES Result Finding Original Units LBDTC Date/Time Specimen Collection","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_sc.html","id":null,"dir":"Reference","previous_headings":"","what":"Subject Characteristics SDTMv Dataset — datacutr_sc","title":"Subject Characteristics SDTMv Dataset — datacutr_sc","text":"example Subject Characteristics (SC) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_sc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subject Characteristics SDTMv Dataset — datacutr_sc","text":"","code":"datacutr_sc"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_sc.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Subject Characteristics SDTMv Dataset — datacutr_sc","text":"dataset 5 rows 2 variables: USUBJID Unique Subject Identifier SCORRES Result Finding Original Units","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Trial Summary SDTMv Dataset — datacutr_ts","title":"Trial Summary SDTMv Dataset — datacutr_ts","text":"example Trial Summary (TS) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trial Summary SDTMv Dataset — datacutr_ts","text":"","code":"datacutr_ts"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ts.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Trial Summary SDTMv Dataset — datacutr_ts","text":"dataset 5 rows 2 variables: USUBJID Unique Subject Identifier TSVAL Parameter Value","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"xxSTDTC or xxDTC Cut — date_cut","title":"xxSTDTC or xxDTC Cut — date_cut","text":"Use apply datacut either xxSTDTC xxDTC SDTM date variable. datacut date datacut dataset merged input SDTMv dataset renamed TEMP_DCUT_DCUTDTM. flag TEMP_DCUT_REMOVE added dataset indicate observations removed cut applied. Note function applies patient level datacut time (using pt_cut() function), also imputes dates specified SDTMv dataset (using impute_sdtm() function).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"xxSTDTC or xxDTC Cut — date_cut","text":"","code":"date_cut(dataset_sdtm, sdtm_date_var, dataset_cut, cut_var)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"xxSTDTC or xxDTC Cut — date_cut","text":"dataset_sdtm Input SDTMv dataset sdtm_date_var Input date variable found dataset_sdtmv dataset dataset_cut Input datacut dataset cut_var Datacut date variable","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"xxSTDTC or xxDTC Cut — date_cut","text":"Input dataset plus flag TEMP_DCUT_REMOVE indicate observations dropped datacut applied","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"xxSTDTC or xxDTC Cut — date_cut","text":"Alana Harris","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"xxSTDTC or xxDTC Cut — date_cut","text":"","code":"library(lubridate) #> #> Attaching package: ‘lubridate’ #> The following objects are masked from ‘package:base’: #> #> date, intersect, setdiff, union dcut <- tibble::tribble( ~USUBJID, ~DCUTDTM, ~DCUTDTC, \"subject1\", ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject2\", ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject4\", ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\" ) ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~AESTDTC, \"subject1\", 1, \"2020-01-02T00:00:00\", \"subject1\", 2, \"2020-08-31T00:00:00\", \"subject1\", 3, \"2020-10-10T00:00:00\", \"subject2\", 2, \"2020-02-20T00:00:00\", \"subject3\", 1, \"2020-03-02T00:00:00\", \"subject4\", 1, \"2020-11-02T00:00:00\", \"subject4\", 2, \"\" ) ae_out <- date_cut( dataset_sdtm = ae, sdtm_date_var = AESTDTC, dataset_cut = dcut, cut_var = DCUTDTM )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Drops Temporary Variables From a Dataset — drop_temp_vars","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"Drops temporary variables (variables beginning TEMP_) input dataset. Also allows user specify whether drop temporary variables needed throughout multiple steps datacut process (variables beginning DCUT_TEMP_).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"","code":"drop_temp_vars(dsin, drop_dcut_temp = TRUE)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"dsin Name input dataframe drop_dcut_temp Whether drop variables beginning DCUT_TEMP_ (TRUE/FALSE).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"Returns input dataframe, excluding temporary variables.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"functions within package use drop_temp_vars drop_dcut_temp argument set FALSE variables needed across multiple steps process kept. final datacut takes place apply_cut function, point drop_temp_vars used drop_dcut_temp argument set TRUE, temporary variables dropped.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"","code":"ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~TEMP_FLAG, ~DCUT_TEMP_REMOVE, \"subject1\", 1, \"Y\", NA, \"subject1\", 2, \"Y\", NA, \"subject1\", 3, NA, \"Y\", \"subject2\", 2, \"Y\", NA, \"subject3\", 1, NA, \"Y\", \"subject4\", 1, NA, \"Y\" ) drop_temp_vars(dsin = ae) # Drops temp_ and dcut_temp_ variables #> # A tibble: 6 × 2 #> USUBJID AESEQ #> #> 1 subject1 1 #> 2 subject1 2 #> 3 subject1 3 #> 4 subject2 2 #> 5 subject3 1 #> 6 subject4 1 drop_temp_vars(dsin = ae, drop_dcut_temp = TRUE) # Drops temp_ and dcut_temp_ variables #> # A tibble: 6 × 2 #> USUBJID AESEQ #> #> 1 subject1 1 #> 2 subject1 2 #> 3 subject1 3 #> 4 subject2 2 #> 5 subject3 1 #> 6 subject4 1 drop_temp_vars(dsin = ae, drop_dcut_temp = FALSE) # Drops temp_ variables #> # A tibble: 6 × 3 #> USUBJID AESEQ DCUT_TEMP_REMOVE #> #> 1 subject1 1 NA #> 2 subject1 2 NA #> 3 subject1 3 Y #> 4 subject2 2 NA #> 5 subject3 1 Y #> 6 subject4 1 Y"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"Imputes partial date/time data cutoff variable (DCUTDTC), required datacut process.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"","code":"impute_dcutdtc(dsin, varin, varout)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"dsin Name input data cut dataframe (.e; DCUT) varin Name input data cutoff variable (.e; DCUTDTC) must ISO 8601 extended format (YYYY-MM-DDThh:mm:ss). values data cutoff variable must least complete date, NA. varout Name imputed output variable","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"Returns input data cut dataframe, additional one extra variable (varout) POSIXct datetime format, imputed version varin.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"","code":"dcut <- data.frame( USUBJID = rep(c(\"UXYZ123a\"), 7), DCUTDTC = c( \"2022-06-23\", \"2022-06-23T16\", \"2022-06-23T16:57\", \"2022-06-23T16:57:30\", \"2022-06-23T16:57:30.123\", \"2022-06-23T16:-:30\", \"2022-06-23T-:57:30\" ) ) dcut_final <- impute_dcutdtc(dsin = dcut, varin = DCUTDTC, varout = DCUTDTM)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"Imputes partial date/time SDTMv variables, required datacut process.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"","code":"impute_sdtm(dsin, varin, varout)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"dsin Name input SDTMv dataframe varin Name input SDTMv character date/time variable, must ISO 8601 extended format (YYYY-MM-DDThh:mm:ss). use date/time intervals permitted. varout Name imputed output variable","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"Returns input SDTMv dataframe, addition one extra variable (varout) POSIXct datetime format, imputed version varin.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"","code":"ex <- data.frame( USUBJID = rep(c(\"UXYZ123a\"), 13), EXSTDTC = c( \"\", \"2022\", \"2022-06\", \"2022-06-23\", \"2022-06-23T16\", \"2022-06-23T16:57\", \"2022-06-23T16:57:30\", \"2022-06-23T16:57:30.123\", \"2022-06-23T16:-:30\", \"2022-06-23T-:57:30\", \"2022-06--T16:57:30\", \"2022---23T16:57:30\", \"--06-23T16:57:30\" ) ) ex_imputed <- impute_sdtm(dsin = ex, varin = EXSTDTC, varout = DCUT_TEMP_EXSTDTC)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"Applies selected type datacut SDTMv dataset based chosen SDTMv date variable, outputs resulting cut datasets, well datacut dataset, list. provides option perform \"special\" cut demography (dm) domain deaths occurring datacut date removed. also provides option produce .html file summarizes changes applied data cut, can inspect records removed /modified.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"","code":"process_cut( source_sdtm_data, patient_cut_v = NULL, date_cut_m = NULL, no_cut_v = NULL, dataset_cut, cut_var, special_dm = TRUE, read_out = FALSE, out_path = \".\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"source_sdtm_data list uncut SDTMv dataframes patient_cut_v vector quoted SDTMv domain names patient cut applied. left blank patient cut performed domains. date_cut_m 2 column matrix, first column quoted SDTMv domain names date cut applied second column quoted SDTMv date variables used carry date cut SDTMv domain. left blank date cut performed domains. no_cut_v vector quoted SDTMv domain names cut applied. left blank domains remain exactly source. dataset_cut Input datacut dataset, e.g. dcut cut_var Datacut date variable within dataset_cut dataset, e.g. DCUTDTM special_dm logical input indicating whether special dm cut performed. Note , TRUE, dm included patient_cut_v, date_cut_m no_cut_v inputs. read_out logical input indicating whether summary file datacut produced. TRUE, .html file returned containing summary cut records removed. Default set FALSE. out_path character vector file save path summary file read_out = TRUE; default corresponds working directory, getwd().","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"Returns list input SDTMv datasets, plus datacut dataset, performing selected datacut SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"","code":"dcut <- data.frame( USUBJID = c(\"a\", \"b\"), DCUTDTC = c(\"2022-02-17\", \"2022-02-17\") ) dcut <- impute_dcutdtc(dcut, DCUTDTC, DCUTDTM) sc <- data.frame(USUBJID = c(\"a\", \"a\", \"b\", \"c\")) ts <- data.frame(USUBJID = c(\"a\", \"a\", \"b\", \"c\")) ae <- data.frame( USUBJID = c(\"a\", \"a\", \"b\", \"c\"), AESTDTC = c(\"2022-02-16\", \"2022-02-18\", \"2022-02-16\", \"2022-02-16\") ) source_data <- list(sc = sc, ae = ae, ts = ts) cut_data <- process_cut( source_sdtm_data = source_data, patient_cut_v = c(\"sc\"), date_cut_m = rbind(c(\"ae\", \"AESTDTC\")), no_cut_v = c(\"ts\"), dataset_cut = dcut, cut_var = DCUTDTM, special_dm = FALSE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Patient Cut — pt_cut","title":"Patient Cut — pt_cut","text":"Use apply patient cut SDTMv dataset (.e. subset SDTMv observations patients included dataset_cut input dataset)","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Patient Cut — pt_cut","text":"","code":"pt_cut(dataset_sdtm, dataset_cut)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Patient Cut — pt_cut","text":"dataset_sdtm Input SDTMv dataset dataset_cut Input datacut dataset, e.g. dcut","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Patient Cut — pt_cut","text":"Input dataset plus flag DCUT_TEMP_REMOVE indicate observations dropped patient level datacut applied","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Patient Cut — pt_cut","text":"Alana Harris","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Patient Cut — pt_cut","text":"","code":"library(lubridate) dcut <- tibble::tribble( ~USUBJID, ~DCUTDTM, \"subject1\", ymd_hms(\"2020-10-11T23:59:59\"), \"subject2\", ymd_hms(\"2020-10-11T23:59:59\"), \"subject4\", ymd_hms(\"2020-10-11T23:59:59\") ) ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~AESTDTC, \"subject1\", 1, \"2020-01-02T00:00:00\", \"subject1\", 2, \"2020-08-31T00:00:00\", \"subject1\", 3, \"2020-10-10T00:00:00\", \"subject2\", 2, \"2020-02-20T00:00:00\", \"subject3\", 1, \"2020-03-02T00:00:00\", \"subject4\", 1, \"2020-11-02T00:00:00\" ) ae_out <- pt_cut( dataset_sdtm = ae, dataset_cut = dcut )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to generate datacut summary file — read_out","title":"Function to generate datacut summary file — read_out","text":"Produces .html file summarizing changes applied data data cut. file contain overview change number records dataset, types cut applied opportunity inspect removed records.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to generate datacut summary file — read_out","text":"","code":"read_out( dcut = NULL, patient_cut_data = NULL, date_cut_data = NULL, dm_cut = NULL, no_cut_list = NULL, out_path = \".\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to generate datacut summary file — read_out","text":"dcut output datacut dataset (DCUT), created via create_dcut() function, containing variable DCUTDTC. patient_cut_data list quoted SDTMv domain names patient cut . applied (via pt_cut() function). left blank patient cut performed domains. date_cut_data list quoted SDTMv domain names date cut applied. (via date_cut() function). left blank date cut performed domains. dm_cut output dataset, created via special_dm_cut() function, containing variables DCUT_TEMP_REMOVE DCUT_TEMP_DTHCHANGE. no_cut_list List quoted SDTMv domain names cut applied. left blank domains remain exactly source. out_path character vector file save path summary file; default corresponds working directory, getwd().","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to generate datacut summary file — read_out","text":"Returns .html file summarizing changes made data datacut.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to generate datacut summary file — read_out","text":"","code":"if (FALSE) { # \\dontrun{ dcut <- tibble::tribble( ~USUBJID, ~DCUTDTM, ~DCUTDTC, \"subject1\", lubridate::ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject2\", lubridate::ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject4\", lubridate::ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\" ) ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~AESTDTC, \"subject1\", 1, \"2020-01-02T00:00:00\", \"subject1\", 2, \"2020-08-31T00:00:00\", \"subject1\", 3, \"2020-10-10T00:00:00\", \"subject2\", 2, \"2020-02-20T00:00:00\", \"subject3\", 1, \"2020-03-02T00:00:00\", \"subject4\", 1, \"2020-11-02T00:00:00\", \"subject4\", 2, \"\" ) dm <- tibble::tribble( ~USUBJID, ~DTHDTC, ~DTHFL, \"subject1\", \"2020-10-11\", \"Y\", \"subject2\", \"2020-10-12\", \"Y\", ) dt_ae <- date_cut( dataset_sdtm = ae, sdtm_date_var = AESTDTC, dataset_cut = dcut, cut_var = DCUTDTM ) pt_ae <- pt_cut( dataset_sdtm = ae, dataset_cut = dcut ) dm_cut <- special_dm_cut( dataset_dm = dm, dataset_cut = dcut, cut_var = DCUTDTM ) read_out(dcut, patient_cut_data = list(ae = pt_ae), date_cut_data = list(ae = dt_ae), dm_cut) } # }"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"Applies patient cut patient source DCUT, well clearing death information within DM death occurred datacut date","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"","code":"special_dm_cut(dataset_dm, dataset_cut, cut_var = DCUTDTM)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"dataset_dm Input DM SDTMv dataset dataset_cut Input datacut dataset cut_var Datacut date variable found dataset_cut dataset, default DCUTDTM","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"Input dataset plus flag DCUT_TEMP_REMOVE indicate observations dropped datacut applied, flag DCUT_TEMP_DTHCHANGE indicate observations death occurring data cut date clearing","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"Tim Barnett","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"","code":"dcut <- tibble::tribble( ~USUBJID, ~DCUTDTC, ~DCUTDTM, \"01-701-1015\", \"2014-10-20T23:59:59\", lubridate::ymd_hms(\"2014-10-20T23:59:59\"), \"01-701-1023\", \"2014-10-20T23:59:59\", lubridate::ymd_hms(\"2014-10-20T23:59:59\") ) dm <- tibble::tribble( ~USUBJID, ~DTHDTC, ~DTHFL, \"01-701-1015\", \"2014-10-20\", \"Y\", \"01-701-1023\", \"2014-10-21\", \"Y\", ) special_dm_cut( dataset_dm = dm, dataset_cut = dcut, cut_var = DCUTDTM ) #> # A tibble: 2 × 7 #> USUBJID DTHDTC DTHFL DCUT_TEMP_REMOVE DCUT_TEMP_DTHDT DCUT_TEMP_DCUTDTM #> #> 1 01-701-… 2014-… Y NA 2014-10-20 00:00:00 2014-10-20 23:59:59 #> 2 01-701-… 2014-… Y NA 2014-10-21 00:00:00 2014-10-20 23:59:59 #> # ℹ 1 more variable: DCUT_TEMP_DTHCHANGE "}] +[{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache License","title":"Apache License","text":"Version 2.0, January 2004 ","code":""},{"path":[]},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_1-definitions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"1. Definitions","title":"Apache License","text":"“License” shall mean terms conditions use, reproduction, distribution defined Sections 1 9 document. “Licensor” shall mean copyright owner entity authorized copyright owner granting License. “Legal Entity” shall mean union acting entity entities control, controlled , common control entity. purposes definition, “control” means () power, direct indirect, cause direction management entity, whether contract otherwise, (ii) ownership fifty percent (50%) outstanding shares, (iii) beneficial ownership entity. “” (“”) shall mean individual Legal Entity exercising permissions granted License. “Source” form shall mean preferred form making modifications, including limited software source code, documentation source, configuration files. “Object” form shall mean form resulting mechanical transformation translation Source form, including limited compiled object code, generated documentation, conversions media types. “Work” shall mean work authorship, whether Source Object form, made available License, indicated copyright notice included attached work (example provided Appendix ). “Derivative Works” shall mean work, whether Source Object form, based (derived ) Work editorial revisions, annotations, elaborations, modifications represent, whole, original work authorship. purposes License, Derivative Works shall include works remain separable , merely link (bind name) interfaces , Work Derivative Works thereof. “Contribution” shall mean work authorship, including original version Work modifications additions Work Derivative Works thereof, intentionally submitted Licensor inclusion Work copyright owner individual Legal Entity authorized submit behalf copyright owner. purposes definition, “submitted” means form electronic, verbal, written communication sent Licensor representatives, including limited communication electronic mailing lists, source code control systems, issue tracking systems managed , behalf , Licensor purpose discussing improving Work, excluding communication conspicuously marked otherwise designated writing copyright owner “Contribution.” “Contributor” shall mean Licensor individual Legal Entity behalf Contribution received Licensor subsequently incorporated within Work.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_2-grant-of-copyright-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"2. Grant of Copyright License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable copyright license reproduce, prepare Derivative Works , publicly display, publicly perform, sublicense, distribute Work Derivative Works Source Object form.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_3-grant-of-patent-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"3. Grant of Patent License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable (except stated section) patent license make, made, use, offer sell, sell, import, otherwise transfer Work, license applies patent claims licensable Contributor necessarily infringed Contribution(s) alone combination Contribution(s) Work Contribution(s) submitted. institute patent litigation entity (including cross-claim counterclaim lawsuit) alleging Work Contribution incorporated within Work constitutes direct contributory patent infringement, patent licenses granted License Work shall terminate date litigation filed.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_4-redistribution","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"4. Redistribution","title":"Apache License","text":"may reproduce distribute copies Work Derivative Works thereof medium, without modifications, Source Object form, provided meet following conditions: () must give recipients Work Derivative Works copy License; (b) must cause modified files carry prominent notices stating changed files; (c) must retain, Source form Derivative Works distribute, copyright, patent, trademark, attribution notices Source form Work, excluding notices pertain part Derivative Works; (d) Work includes “NOTICE” text file part distribution, Derivative Works distribute must include readable copy attribution notices contained within NOTICE file, excluding notices pertain part Derivative Works, least one following places: within NOTICE text file distributed part Derivative Works; within Source form documentation, provided along Derivative Works; , within display generated Derivative Works, wherever third-party notices normally appear. contents NOTICE file informational purposes modify License. may add attribution notices within Derivative Works distribute, alongside addendum NOTICE text Work, provided additional attribution notices construed modifying License. may add copyright statement modifications may provide additional different license terms conditions use, reproduction, distribution modifications, Derivative Works whole, provided use, reproduction, distribution Work otherwise complies conditions stated License.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_5-submission-of-contributions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"5. Submission of Contributions","title":"Apache License","text":"Unless explicitly state otherwise, Contribution intentionally submitted inclusion Work Licensor shall terms conditions License, without additional terms conditions. Notwithstanding , nothing herein shall supersede modify terms separate license agreement may executed Licensor regarding Contributions.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_6-trademarks","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"6. Trademarks","title":"Apache License","text":"License grant permission use trade names, trademarks, service marks, product names Licensor, except required reasonable customary use describing origin Work reproducing content NOTICE file.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_7-disclaimer-of-warranty","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"7. Disclaimer of Warranty","title":"Apache License","text":"Unless required applicable law agreed writing, Licensor provides Work (Contributor provides Contributions) “” BASIS, WITHOUT WARRANTIES CONDITIONS KIND, either express implied, including, without limitation, warranties conditions TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS PARTICULAR PURPOSE. solely responsible determining appropriateness using redistributing Work assume risks associated exercise permissions License.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_8-limitation-of-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"8. Limitation of Liability","title":"Apache License","text":"event legal theory, whether tort (including negligence), contract, otherwise, unless required applicable law (deliberate grossly negligent acts) agreed writing, shall Contributor liable damages, including direct, indirect, special, incidental, consequential damages character arising result License use inability use Work (including limited damages loss goodwill, work stoppage, computer failure malfunction, commercial damages losses), even Contributor advised possibility damages.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"id_9-accepting-warranty-or-additional-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"9. Accepting Warranty or Additional Liability","title":"Apache License","text":"redistributing Work Derivative Works thereof, may choose offer, charge fee , acceptance support, warranty, indemnity, liability obligations /rights consistent License. However, accepting obligations, may act behalf sole responsibility, behalf Contributor, agree indemnify, defend, hold Contributor harmless liability incurred , claims asserted , Contributor reason accepting warranty additional liability. END TERMS CONDITIONS","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/LICENSE.html","id":"appendix-how-to-apply-the-apache-license-to-your-work","dir":"","previous_headings":"","what":"APPENDIX: How to apply the Apache License to your work","title":"Apache License","text":"apply Apache License work, attach following boilerplate notice, fields enclosed brackets [] replaced identifying information. (Don’t include brackets!) text enclosed appropriate comment syntax file format. also recommend file class name description purpose included “printed page” copyright notice easier identification within third-party archives.","code":"Copyright 2022 F. Hoffmann-La Roche AG Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/contribution_model.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Contribution to {datacutr}","text":"vignette gives overview anticipated contribution model. goal enable users datacutr contribute test contribution model datacutr. Adjustments might made time.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/contribution_model.html","id":"basics","dir":"Articles","previous_headings":"","what":"Basics","title":"Contribution to {datacutr}","text":"new contribution, user creates issue issue tab GitHub put backlog. created issues reviewed creator receive initial feedback via comment. Someone core development team triage new issues assigning appropriate labels (“user request” can easily identify new requests).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/contribution_model.html","id":"contribution-model","dir":"Articles","previous_headings":"","what":"Contribution Model","title":"Contribution to {datacutr}","text":"First, user creates issue comments existing issue notify ’d like contribute enhancements datacutr. datacutr core development team member touch discuss next steps.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"main-concept-of-data-cut-process","dir":"Articles","previous_headings":"","what":"Main Concept of Data cut process","title":"Get Started","text":"main idea datacutr provide standardized approach applying datacut SDTM datasets. process applied package following, create meta dataset DCUT references patients included within cut, cut date used reference (normally Clinical Cut-Date data cleaned ). using DCUT reference, records can removed SDTM data either ) patients part reference DCUT, b) records can identified data cut date supplied.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"data-cut-approaches-for-different-sdtm","dir":"Articles","previous_headings":"","what":"Data cut approaches for different SDTM","title":"Get Started","text":"package relies creating lists SDTM processed specific ways, include, cut - SDTM remain exactly source Patient cut - Patients identified source meta DCUT kept, exclusion records conducted Date cut - Patients identified source meta DCUT kept, records identified data cut date removed Special DM cut - DM contains critical temporal derivations around Deaths require update within data cut, option allows user revert DM.DTHFL DM.DTHDTC death identified data cut date","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"technical-approach-within-datacutr","dir":"Articles","previous_headings":"","what":"Technical approach within {datacutr}","title":"Get Started","text":"datacutr package allows two different approaches user apply data cut process Modular approach - approach breaks steps data cut individual functions. useful user wishes transparency process, de-bugging. also allows user step process bespoke study specific handling required already defined part datacutr process. See Modular Approach implement Wrapped approach - approach users want quick cut generation, need step alter approach taken datacutr. See Wrapped Approach implement","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"data-handling-rules","dir":"Articles","previous_headings":"","what":"Data Handling Rules","title":"Get Started","text":"Inclusion Subjects Subjects randomization date data cutoff date included data cut. study randomized, enrolment date used instead. studies study drug administered, randomization enrolment performed (e.g., observational studies), study-specific definition enrolment date provided. Inclusion Records Subjects Included Data Cut records involving dates, record included data cut relevant date data cutoff date. user selects date variable domain cut applied (ie. –STDTC –DTC). mix (eg. different sources within FA using either FADTC FASTDTC) expectation user create temporary variable store correct date per observation. example shown “Example Wrapped Approach” vignette. Missing Partial Date/Times motivation inclusive possible. expect data cutoff date/time least complete date. time missing, impute maximum possible time, .e; impute 23 missing hours, 59 missing minutes, 59 missing seconds. SDTMv records chosen SDTMv date/time variable missing (missing year component) included data cut. partial date/times imputed minimum possible date/time, .e; impute 01 missing month, 01 missing day, 00 missing hours, 00 missing minutes, 00 missing seconds. imputing missing components data cutoff date/time maximum possible value missing components SDTMv date/time variable minimum possible value, ensure record cut clear SDTMv date/time variable data cutoff date/time. Handling Deaths deaths, derived DM death information updated reflect state time data cutoff date. Death Flag (DM.DTHFL) associated variables (e.g., DM.DTHDT) set missing subject died data cutoff date.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"validation","dir":"Articles","previous_headings":"","what":"Validation","title":"Get Started","text":"functions reviewed tested ensure work described documentation. Testing done SDTMIG v3.2 (SDTM v1.4).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/datacutr.html","id":"starting-a-script","dir":"Articles","previous_headings":"","what":"Starting a Script","title":"Get Started","text":"datacutr provides template R scripts starting point. See Modular Approach Wrapped Approach details.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplemodular.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example Modular Approach","text":"article example workflow modular approach section cut explicitly called.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplemodular.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Example Modular Approach","text":"","code":"# Name: Datacut Template Code - Modular Approach # Creating data to be cut ------------------------------------------------ library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts ) # Create DCUT ------------------------------------------------------------ dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" ) # Pre-processing of FA ---------------------------------------------------- # Update FA source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) )) # Specify cut types ------------------------------------------------------ # Patient cut - cut applied will only be for patients existing in DCUT patient_cut_list <- c(\"sc\", \"ds\") # Date cut - cut applied will be both for patients existing in DCUT, and date cut against DCUTDTM date_cut_list <- rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ) # No cut - data does not need to be cut no_cut_list <- list(ts = source_data$ts) # Create the cutting variables ------------------------------------------- # Conduct the patient cut ------------------------------------------------ patient_cut_data <- lapply( source_data[patient_cut_list], pt_cut, dataset_cut = dcut ) # Conduct xxSTDTC or xxDTC Cut ------------------------------------------- date_cut_data <- pmap( .l = list( dataset_sdtm = source_data[date_cut_list[, 1]], sdtm_date_var = syms(date_cut_list[, 2]) ), .f = date_cut, dataset_cut = dcut, cut_var = DCUTDTM ) # Conduct DM special cut for DTH flags after DCUTDTM --------------------- dm_cut <- special_dm_cut( dataset_dm = source_data$dm, dataset_cut = dcut, cut_var = DCUTDTM ) # Apply the cut -------------------------------- cut_data <- purrr::map( c(patient_cut_data, date_cut_data, list(dm = dm_cut)), apply_cut, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE ) # Add on data which is not cut final_data <- c(cut_data, no_cut_list, list(dcut = dcut))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplewrapped.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example Wrapped Approach","text":"article example workflow wrapped approach modules wrapped cut_data function.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/examplewrapped.html","id":"example","dir":"Articles","previous_headings":"","what":"Example","title":"Example Wrapped Approach","text":"","code":"# Name: Datacut Template Code - Modular Approach # Creating data to be cut ------------------------------------------------ library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) # Name: Datacut Template Code - Wrapped Approach # Creating data to be cut ------------------------------------------------ source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts ) # Create DCUT ------------------------------------------------------------ dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" ) # Pre-processing of FA ---------------------------------------------------- # Update FA source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) )) # Process data cut -------------------------------------------------------- cut_data <- process_cut( source_sdtm_data = source_data, patient_cut_v = c(\"sc\", \"ds\"), date_cut_m = rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ), no_cut_v = c(\"ts\"), dataset_cut = dcut, cut_var = DCUTDTM, special_dm = TRUE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Modular Approach","text":"article describes cut study SDTM data using modular approach enable study project specific customization.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"programming-flow","dir":"Articles","previous_headings":"","what":"Programming Flow","title":"Modular Approach","text":"Read Data Create DCUT Dataset Preprocess Datasets Specify Cut Types Patient Cut Date Cut DM Cut Apply Cut Output Final List Cut Datasets","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"readdata","dir":"Articles","previous_headings":"Programming Flow","what":"Read in Data","title":"Modular Approach","text":"start, SDTM data cut needs stored list.","code":"library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) library(rlang) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"dcut","dir":"Articles","previous_headings":"Programming Flow","what":"Create DCUT Dataset","title":"Modular Approach","text":"next step create DCUT dataset containing datacut date description.","code":"dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"preprocess","dir":"Articles","previous_headings":"Programming Flow","what":"Preprocess Datasets","title":"Modular Approach","text":"pre-processing datasets needed, example case FA, multiple date variables, done next.","code":"source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) ))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"cuttypes","dir":"Articles","previous_headings":"Programming Flow","what":"Specify Cut Types","title":"Modular Approach","text":"’ll next specify cut types dataset (patient cut, date cut cut) case date cut date variable used.","code":"patient_cut_list <- c(\"sc\", \"ds\") date_cut_list <- rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ) no_cut_list <- list(ts = source_data$ts)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"ptcut","dir":"Articles","previous_headings":"Programming Flow","what":"Patient Cut","title":"Modular Approach","text":"Next ’ll apply patient cut. adds temporary flag variables indicating observations removed, example SC:","code":"patient_cut_data <- lapply( source_data[patient_cut_list], pt_cut, dataset_cut = dcut )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"dtcut","dir":"Articles","previous_headings":"Programming Flow","what":"Date Cut","title":"Modular Approach","text":"Next ’ll apply date cut. adds temporary flag variables indicating observations removed, example AE:","code":"date_cut_data <- pmap( .l = list( dataset_sdtm = source_data[date_cut_list[, 1]], sdtm_date_var = syms(date_cut_list[, 2]) ), .f = date_cut, dataset_cut = dcut, cut_var = DCUTDTM )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"dmcut","dir":"Articles","previous_headings":"Programming Flow","what":"DM Cut","title":"Modular Approach","text":"lastly ’ll apply special DM cut also updates death related variables. adds temporary variables indicating death records change result applying datacut:","code":"dm_cut <- special_dm_cut( dataset_dm = source_data$dm, dataset_cut = dcut, cut_var = DCUTDTM )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"applycut","dir":"Articles","previous_headings":"Programming Flow","what":"Apply Cut","title":"Modular Approach","text":"last step create RMD report, summarize patients observations cut, apply cut strip observations flagged removed.","code":"cut_data <- purrr::map( c(patient_cut_data, date_cut_data, list(dm = dm_cut)), apply_cut, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/modular.html","id":"output","dir":"Articles","previous_headings":"Programming Flow","what":"Output Final List of Cut Datasets","title":"Modular Approach","text":"Lastly, create final list cut SDTM data, adding SDTM cut needed.","code":"final_data <- c(cut_data, no_cut_list, list(dcut = dcut))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Applying a Variable Date Cut","text":"article describes apply data cut, date apply common singular date, different date per patient. example cut patients data week 24 visit date. example can done utilizing datacutr.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"programming-flow","dir":"Articles","previous_headings":"","what":"Programming Flow","title":"Applying a Variable Date Cut","text":"Read Data Create DCUT Dataset Postprocess DCUT","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"readdata","dir":"Articles","previous_headings":"Programming Flow","what":"Read in Data","title":"Applying a Variable Date Cut","text":"start, SDTM data needs stored list.","code":"library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) library(rlang) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"dcut","dir":"Articles","previous_headings":"Programming Flow","what":"Create DCUT Dataset","title":"Applying a Variable Date Cut","text":"next step create DCUT dataset containing description, fixed date ensures data necessary ds included DCUT. example today’s date.","code":"dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = as.character(lubridate::today()), cut_description = \"Week 24 Cut\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/variable_cut.html","id":"postprocess","dir":"Articles","previous_headings":"Programming Flow","what":"Postprocess DCUT","title":"Applying a Variable Date Cut","text":"next step update DCUT required date per patient required variable cut. example using trial visits source. required event observed, keeping DCUT.DCUTDTC future/today date ensures data kept within cut patient. Now DCUT prepared, rest process follows previously prescribed using either wrapped function approach Link modular approach Link","code":"sv <- tibble::tribble( ~USUBJID, ~VISIT, ~SVSTDTC, \"AB12345-001\", \"WEEK24\", \"2022-06-01\", \"AB12345-002\", \"WEEK24\", \"2022-06-30\", \"AB12345-003\", \"WEEK24\", \"2022-07-01\", \"AB12345-004\", \"WEEK24\", \"2022-05-04\", ) dcut <- dcut %>% left_join(sv %>% filter(VISIT == \"WEEK24\") %>% select(USUBJID, SVSTDTC)) %>% mutate(DCUTDTC = as.character(ifelse(!is.na(SVSTDTC), SVSTDTC, as.character(DCUTDTC)))) %>% impute_dcutdtc(dsin = ., varin = DCUTDTC, varout = DCUTDTM)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Wrapped Approach","text":"article describes cut study SDTM data using wrapper function within datacutr package. Please note , wrapped approach may suitable wish enable study project specific customization.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"programming-flow","dir":"Articles","previous_headings":"","what":"Programming Flow","title":"Wrapped Approach","text":"Read Data Create DCUT Dataset Pre-process Datasets Process Data Cut","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"readdata","dir":"Articles","previous_headings":"Programming Flow","what":"Read in Data","title":"Wrapped Approach","text":"start, SDTM data cut needs stored within list.","code":"library(datacutr) library(admiraldev) library(dplyr) library(lubridate) library(stringr) library(purrr) library(rlang) source_data <- list( ds = datacutr_ds, dm = datacutr_dm, ae = datacutr_ae, sc = datacutr_sc, lb = datacutr_lb, fa = datacutr_fa, ts = datacutr_ts )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"dcut","dir":"Articles","previous_headings":"Programming Flow","what":"Create DCUT Dataset","title":"Wrapped Approach","text":"next step create DCUT dataset containing datacut date description.","code":"dcut <- create_dcut( dataset_ds = source_data$ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-06-04\", cut_description = \"Clinical Cutoff Date\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"preprocess","dir":"Articles","previous_headings":"Programming Flow","what":"Preprocess Datasets","title":"Wrapped Approach","text":"pre-processing SDTM datasets needed, done next. example, case FA, FASTDTC FADTC date variables used, can combine one date variable.","code":"source_data$fa <- source_data$fa %>% mutate(DCUT_TEMP_FAXDTC = case_when( FASTDTC != \"\" ~ FASTDTC, FADTC != \"\" ~ FADTC, TRUE ~ as.character(NA) ))"},{"path":"https:/pharmaverse.github.io/datacutr/devel/articles/wrapper.html","id":"processcut","dir":"Articles","previous_headings":"Programming Flow","what":"Process data cut","title":"Wrapped Approach","text":"Now, can perform datacut SDTM dataset. can specify cut types domain (patient cut, date cut, cut). date cut chosen, must also specify date variable used. “special” cut can performed demography domain (dm) special_dm parameter set TRUE. well performing standard patient cut, identify deaths occurring datacut date, set death variables (DTHDTC, DTHFL) missing. Please note , special_dm=TRUE, need specify cut type dm inputs. Please ensure selected cut type SDTM domains.","code":"cut_data <- process_cut( source_sdtm_data = source_data, patient_cut_v = c(\"sc\", \"ds\"), date_cut_m = rbind( c(\"ae\", \"AESTDTC\"), c(\"lb\", \"LBDTC\"), c(\"fa\", \"DCUT_TEMP_FAXDTC\") ), no_cut_v = c(\"ts\"), dataset_cut = dcut, cut_var = DCUTDTM, special_dm = TRUE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Tim Barnett. Copyright holder, author, maintainer. Nathan Rees. Author. Alana Harris. Author. Cara Andrews. Author.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Barnett T, Rees N, Harris , Andrews C (2024). datacutr: SDTM Datacut. R package version 0.2.0, https://github.com/pharmaverse/datacutr, https://pharmaverse.github.io/datacutr/.","code":"@Manual{, title = {datacutr: SDTM Datacut}, author = {Tim Barnett and Nathan Rees and Alana Harris and Cara Andrews}, year = {2024}, note = {R package version 0.2.0, https://github.com/pharmaverse/datacutr}, url = {https://pharmaverse.github.io/datacutr/}, }"},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"datacutr-","dir":"","previous_headings":"","what":"SDTM Datacut","title":"SDTM Datacut","text":"SDTM Datacut R","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"purpose","dir":"","previous_headings":"","what":"Purpose","title":"SDTM Datacut","text":"provide open source tool enables pharmaceutical programming community apply data cut SDTM data R.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"SDTM Datacut","text":"package available CRAN can installed running following, install latest development version package directly GitHub use following code::","code":"install.packages(\"datacutr\") if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_github(\"pharmaverse/datacutr\", ref = \"devel\")"},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"SDTM Datacut","text":"package works tabulation data following SDTM standard. ease processing, assumption supplemental qualifiers combined parent domain prior application cut process (sometimes labeled SDTMv). user flexibility select type cut applied SDTM domain (either cut, patient cut, date cut, special DM cut).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"references-and-documentation","dir":"","previous_headings":"","what":"References and Documentation","title":"SDTM Datacut","text":"Please go Get Started section start using datacutr Please go Function Reference section break functions created datacutr Please see Contribution Model get involved making contributions","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/index.html","id":"contact","dir":"","previous_headings":"","what":"Contact","title":"SDTM Datacut","text":"following support communications user developer community recommended: Slack - informal discussions, Q&building user community. don’t access, use link join pharmaverse Slack workspace GitHub Issues - direct feedback, enhancement requests raising bugs","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Applies the datacut based on the datacut flagging variables — apply_cut","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"Removes records datacut flagging variable, usually called DCUT_TEMP_REMOVE, marked \"Y\". Also, sets death related variables DM (DTHDTC DTHFL) missing death datacut flagging variable, usually called DCUT_TEMP_DTHCHANGE, marked \"Y\".","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"","code":"apply_cut(dsin, dcutvar, dthchangevar)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"dsin Name input dataframe dcutvar Name datacut flagging variable created pt_cut date_cut functions - usually called DCUT_TEMP_REMOVE. dthchangevar Name death datacut flagging variable created special_dm_cut function - usually called DCUT_TEMP_DTHCHANGE.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"Returns input dataframe, excluding rows dcutvar flagged \"Y\". DTHDTC DTHFL set missing records dthchangevar flagged \"Y\". variables \"DCUT_TEMP\" prefix removed.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/apply_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Applies the datacut based on the datacut flagging variables — apply_cut","text":"","code":"ae <- data.frame( USUBJID = c(\"UXYZ123a\", \"UXYZ123b\", \"UXYZ123c\", \"UXYZ123d\"), DCUT_TEMP_REMOVE = c(\"Y\", \"\", \"NA\", NA) ) ae_final <- apply_cut(dsin = ae, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE) dm <- data.frame( USUBJID = c(\"UXYZ123a\", \"UXYZ123b\", \"UXYZ123b\"), DTHDTC = c(\"2014-10-20\", \"2014-10-21\", \"2013-09-08\"), DTHFL = c(\"Y\", \"Y\", \"Y\"), DCUT_TEMP_REMOVE = c(NA, NA, \"Y\"), DCUT_TEMP_DTHCHANGE = c(NA, \"Y\", \"\") ) dm_final <- apply_cut(dsin = dm, dcutvar = DCUT_TEMP_REMOVE, dthchangevar = DCUT_TEMP_DTHCHANGE)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Datacut Dataset (DCUT) — create_dcut","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"filtering input DS dataset (based given filter condition), records SDTMv date/time variable datacut date/time (imputations) returned output datacut dataset (DCUT). Note ds_date_var cut_date inputs must ISO 8601 format (YYYY-MM-DDThh:mm:ss) imputed using impute_sdtm() impute_dcutdtc() functions.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"","code":"create_dcut(dataset_ds, ds_date_var, filter, cut_date, cut_description)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"dataset_ds Input DS SDTMv dataset ds_date_var Character date/time variable DS SDTMv compared datacut date filter Condition filter patients DS, give 1 row per patient cut_date Datacut date/time, e.g. \"2022-10-22\", NA date cut applied cut_description Datacut date/time description, e.g. \"Clinical Cut Date\"","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"Datacut dataset containing variables USUBJID, DCUTDTC, DCUTDTM DCUTDESC.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"Alana Harris","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/create_dcut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Datacut Dataset (DCUT) — create_dcut","text":"","code":"ds <- tibble::tribble( ~USUBJID, ~DSSEQ, ~DSDECOD, ~DSSTDTC, \"subject1\", 1, \"INFORMED CONSENT\", \"2020-06-23\", \"subject1\", 2, \"RANDOMIZATION\", \"2020-08-22\", \"subject1\", 3, \"WITHDRAWAL BY SUBJECT\", \"2020-05-01\", \"subject2\", 1, \"INFORMED CONSENT\", \"2020-07-13\", \"subject3\", 1, \"INFORMED CONSENT\", \"2020-06-03\", \"subject4\", 1, \"INFORMED CONSENT\", \"2021-01-01\", \"subject4\", 2, \"RANDOMIZATION\", \"2023-01-01\" ) dcut <- create_dcut( dataset_ds = ds, ds_date_var = DSSTDTC, filter = DSDECOD == \"RANDOMIZATION\", cut_date = \"2022-01-01\", cut_description = \"Clinical Cutoff Date\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr-package.html","id":null,"dir":"Reference","previous_headings":"","what":"datacutr: SDTM Datacut — datacutr-package","title":"datacutr: SDTM Datacut — datacutr-package","text":"Supports process applying cut Standard Data Tabulation Model (SDTM), part analysis specific points time data, normally part investigation clinical trials. functions support different approaches cutting different domains SDTM normally observed.","code":""},{"path":[]},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"datacutr: SDTM Datacut — datacutr-package","text":"Maintainer: Tim Barnett timothy.barnett@roche.com [copyright holder] Authors: Nathan Rees nathan.rees@roche.com Alana Harris alana.harris@roche.com Cara Andrews cara.andrews@roche.com","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ae.html","id":null,"dir":"Reference","previous_headings":"","what":"Adverse Events SDTMv Dataset — datacutr_ae","title":"Adverse Events SDTMv Dataset — datacutr_ae","text":"example Adverse Events (AE) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ae.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adverse Events SDTMv Dataset — datacutr_ae","text":"","code":"datacutr_ae"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ae.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Adverse Events SDTMv Dataset — datacutr_ae","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier AETERM Reported Term Adverse Event AESTDTC Start Date/Time Adverse Event","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_dm.html","id":null,"dir":"Reference","previous_headings":"","what":"Demographics SDTMv Dataset — datacutr_dm","title":"Demographics SDTMv Dataset — datacutr_dm","text":"example Demographics (DM) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_dm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Demographics SDTMv Dataset — datacutr_dm","text":"","code":"datacutr_dm"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_dm.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Demographics SDTMv Dataset — datacutr_dm","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier DTHFL Subject Death Flag DTHDTC Date/Time Death","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Disposition SDTMv Dataset — datacutr_ds","title":"Disposition SDTMv Dataset — datacutr_ds","text":"example Disposition (DS) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disposition SDTMv Dataset — datacutr_ds","text":"","code":"datacutr_ds"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ds.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Disposition SDTMv Dataset — datacutr_ds","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier DSDECOD Standardized Disposition Term DSSTDTC Start Date/Time Disposition Event","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_fa.html","id":null,"dir":"Reference","previous_headings":"","what":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","title":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","text":"example Findings Events Interventions (FA) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_fa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","text":"","code":"datacutr_fa"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_fa.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Findings About Events or Interventions SDTMv Dataset — datacutr_fa","text":"dataset 5 rows 4 variables: USUBJID Unique Subject Identifier FAORRES Result Finding Original Units FADTC Date/Time Collection FASTDTC Start Date/Time Observation","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_lb.html","id":null,"dir":"Reference","previous_headings":"","what":"Laboratory Test Results SDTMv Dataset — datacutr_lb","title":"Laboratory Test Results SDTMv Dataset — datacutr_lb","text":"example Laboratory Test Results (LB) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_lb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Laboratory Test Results SDTMv Dataset — datacutr_lb","text":"","code":"datacutr_lb"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_lb.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Laboratory Test Results SDTMv Dataset — datacutr_lb","text":"dataset 5 rows 3 variables: USUBJID Unique Subject Identifier LBORRES Result Finding Original Units LBDTC Date/Time Specimen Collection","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_sc.html","id":null,"dir":"Reference","previous_headings":"","what":"Subject Characteristics SDTMv Dataset — datacutr_sc","title":"Subject Characteristics SDTMv Dataset — datacutr_sc","text":"example Subject Characteristics (SC) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_sc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subject Characteristics SDTMv Dataset — datacutr_sc","text":"","code":"datacutr_sc"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_sc.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Subject Characteristics SDTMv Dataset — datacutr_sc","text":"dataset 5 rows 2 variables: USUBJID Unique Subject Identifier SCORRES Result Finding Original Units","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Trial Summary SDTMv Dataset — datacutr_ts","title":"Trial Summary SDTMv Dataset — datacutr_ts","text":"example Trial Summary (TS) SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trial Summary SDTMv Dataset — datacutr_ts","text":"","code":"datacutr_ts"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/datacutr_ts.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Trial Summary SDTMv Dataset — datacutr_ts","text":"dataset 5 rows 2 variables: USUBJID Unique Subject Identifier TSVAL Parameter Value","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"xxSTDTC or xxDTC Cut — date_cut","title":"xxSTDTC or xxDTC Cut — date_cut","text":"Use apply datacut either xxSTDTC xxDTC SDTM date variable. datacut date datacut dataset merged input SDTMv dataset renamed TEMP_DCUT_DCUTDTM. flag TEMP_DCUT_REMOVE added dataset indicate observations removed cut applied. Note function applies patient level datacut time (using pt_cut() function), also imputes dates specified SDTMv dataset (using impute_sdtm() function).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"xxSTDTC or xxDTC Cut — date_cut","text":"","code":"date_cut(dataset_sdtm, sdtm_date_var, dataset_cut, cut_var)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"xxSTDTC or xxDTC Cut — date_cut","text":"dataset_sdtm Input SDTMv dataset sdtm_date_var Input date variable found dataset_sdtmv dataset dataset_cut Input datacut dataset cut_var Datacut date variable","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"xxSTDTC or xxDTC Cut — date_cut","text":"Input dataset plus flag TEMP_DCUT_REMOVE indicate observations dropped datacut applied","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"xxSTDTC or xxDTC Cut — date_cut","text":"Alana Harris","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/date_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"xxSTDTC or xxDTC Cut — date_cut","text":"","code":"library(lubridate) #> #> Attaching package: ‘lubridate’ #> The following objects are masked from ‘package:base’: #> #> date, intersect, setdiff, union dcut <- tibble::tribble( ~USUBJID, ~DCUTDTM, ~DCUTDTC, \"subject1\", ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject2\", ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject4\", ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\" ) ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~AESTDTC, \"subject1\", 1, \"2020-01-02T00:00:00\", \"subject1\", 2, \"2020-08-31T00:00:00\", \"subject1\", 3, \"2020-10-10T00:00:00\", \"subject2\", 2, \"2020-02-20T00:00:00\", \"subject3\", 1, \"2020-03-02T00:00:00\", \"subject4\", 1, \"2020-11-02T00:00:00\", \"subject4\", 2, \"\" ) ae_out <- date_cut( dataset_sdtm = ae, sdtm_date_var = AESTDTC, dataset_cut = dcut, cut_var = DCUTDTM )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Drops Temporary Variables From a Dataset — drop_temp_vars","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"Drops temporary variables (variables beginning TEMP_) input dataset. Also allows user specify whether drop temporary variables needed throughout multiple steps datacut process (variables beginning DCUT_TEMP_).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"","code":"drop_temp_vars(dsin, drop_dcut_temp = TRUE)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"dsin Name input dataframe drop_dcut_temp Whether drop variables beginning DCUT_TEMP_ (TRUE/FALSE).","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"Returns input dataframe, excluding temporary variables.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"functions within package use drop_temp_vars drop_dcut_temp argument set FALSE variables needed across multiple steps process kept. final datacut takes place apply_cut function, point drop_temp_vars used drop_dcut_temp argument set TRUE, temporary variables dropped.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/drop_temp_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Drops Temporary Variables From a Dataset — drop_temp_vars","text":"","code":"ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~TEMP_FLAG, ~DCUT_TEMP_REMOVE, \"subject1\", 1, \"Y\", NA, \"subject1\", 2, \"Y\", NA, \"subject1\", 3, NA, \"Y\", \"subject2\", 2, \"Y\", NA, \"subject3\", 1, NA, \"Y\", \"subject4\", 1, NA, \"Y\" ) drop_temp_vars(dsin = ae) # Drops temp_ and dcut_temp_ variables #> # A tibble: 6 × 2 #> USUBJID AESEQ #> #> 1 subject1 1 #> 2 subject1 2 #> 3 subject1 3 #> 4 subject2 2 #> 5 subject3 1 #> 6 subject4 1 drop_temp_vars(dsin = ae, drop_dcut_temp = TRUE) # Drops temp_ and dcut_temp_ variables #> # A tibble: 6 × 2 #> USUBJID AESEQ #> #> 1 subject1 1 #> 2 subject1 2 #> 3 subject1 3 #> 4 subject2 2 #> 5 subject3 1 #> 6 subject4 1 drop_temp_vars(dsin = ae, drop_dcut_temp = FALSE) # Drops temp_ variables #> # A tibble: 6 × 3 #> USUBJID AESEQ DCUT_TEMP_REMOVE #> #> 1 subject1 1 NA #> 2 subject1 2 NA #> 3 subject1 3 Y #> 4 subject2 2 NA #> 5 subject3 1 Y #> 6 subject4 1 Y"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"Imputes partial date/time data cutoff variable (DCUTDTC), required datacut process.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"","code":"impute_dcutdtc(dsin, varin, varout)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"dsin Name input data cut dataframe (.e; DCUT) varin Name input data cutoff variable (.e; DCUTDTC) must ISO 8601 extended format (YYYY-MM-DDThh:mm:ss). values data cutoff variable must least complete date, NA. varout Name imputed output variable","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"Returns input data cut dataframe, additional one extra variable (varout) POSIXct datetime format, imputed version varin.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_dcutdtc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputes Partial Date/Time Data Cutoff Variable (DCUTDTC) — impute_dcutdtc","text":"","code":"dcut <- data.frame( USUBJID = rep(c(\"UXYZ123a\"), 7), DCUTDTC = c( \"2022-06-23\", \"2022-06-23T16\", \"2022-06-23T16:57\", \"2022-06-23T16:57:30\", \"2022-06-23T16:57:30.123\", \"2022-06-23T16:-:30\", \"2022-06-23T-:57:30\" ) ) dcut_final <- impute_dcutdtc(dsin = dcut, varin = DCUTDTC, varout = DCUTDTM)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":null,"dir":"Reference","previous_headings":"","what":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"Imputes partial date/time SDTMv variables, required datacut process.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"","code":"impute_sdtm(dsin, varin, varout)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"dsin Name input SDTMv dataframe varin Name input SDTMv character date/time variable, must ISO 8601 extended format (YYYY-MM-DDThh:mm:ss). use date/time intervals permitted. varout Name imputed output variable","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"Returns input SDTMv dataframe, addition one extra variable (varout) POSIXct datetime format, imputed version varin.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/impute_sdtm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Imputes Partial Date/Time SDTMv Variables — impute_sdtm","text":"","code":"ex <- data.frame( USUBJID = rep(c(\"UXYZ123a\"), 13), EXSTDTC = c( \"\", \"2022\", \"2022-06\", \"2022-06-23\", \"2022-06-23T16\", \"2022-06-23T16:57\", \"2022-06-23T16:57:30\", \"2022-06-23T16:57:30.123\", \"2022-06-23T16:-:30\", \"2022-06-23T-:57:30\", \"2022-06--T16:57:30\", \"2022---23T16:57:30\", \"--06-23T16:57:30\" ) ) ex_imputed <- impute_sdtm(dsin = ex, varin = EXSTDTC, varout = DCUT_TEMP_EXSTDTC)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"Applies selected type datacut SDTMv dataset based chosen SDTMv date variable, outputs resulting cut datasets, well datacut dataset, list. provides option perform \"special\" cut demography (dm) domain deaths occurring datacut date removed. also provides option produce .html file summarizes changes applied data cut, can inspect records removed /modified.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"","code":"process_cut( source_sdtm_data, patient_cut_v = NULL, date_cut_m = NULL, no_cut_v = NULL, dataset_cut, cut_var, special_dm = TRUE, read_out = FALSE, out_path = \".\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"source_sdtm_data list uncut SDTMv dataframes patient_cut_v vector quoted SDTMv domain names patient cut applied. left blank patient cut performed domains. date_cut_m 2 column matrix, first column quoted SDTMv domain names date cut applied second column quoted SDTMv date variables used carry date cut SDTMv domain. left blank date cut performed domains. no_cut_v vector quoted SDTMv domain names cut applied. left blank domains remain exactly source. dataset_cut Input datacut dataset, e.g. dcut cut_var Datacut date variable within dataset_cut dataset, e.g. DCUTDTM special_dm logical input indicating whether special dm cut performed. Note , TRUE, dm included patient_cut_v, date_cut_m no_cut_v inputs. read_out logical input indicating whether summary file datacut produced. TRUE, .html file returned containing summary cut records removed. Default set FALSE. out_path character vector file save path summary file read_out = TRUE; default corresponds working directory, getwd().","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"Returns list input SDTMv datasets, plus datacut dataset, performing selected datacut SDTMv domain.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/process_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrapper function to prepare and apply the datacut of SDTMv datasets — process_cut","text":"","code":"dcut <- data.frame( USUBJID = c(\"a\", \"b\"), DCUTDTC = c(\"2022-02-17\", \"2022-02-17\") ) dcut <- impute_dcutdtc(dcut, DCUTDTC, DCUTDTM) sc <- data.frame(USUBJID = c(\"a\", \"a\", \"b\", \"c\")) ts <- data.frame(USUBJID = c(\"a\", \"a\", \"b\", \"c\")) ae <- data.frame( USUBJID = c(\"a\", \"a\", \"b\", \"c\"), AESTDTC = c(\"2022-02-16\", \"2022-02-18\", \"2022-02-16\", \"2022-02-16\") ) source_data <- list(sc = sc, ae = ae, ts = ts) cut_data <- process_cut( source_sdtm_data = source_data, patient_cut_v = c(\"sc\"), date_cut_m = rbind(c(\"ae\", \"AESTDTC\")), no_cut_v = c(\"ts\"), dataset_cut = dcut, cut_var = DCUTDTM, special_dm = FALSE )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Patient Cut — pt_cut","title":"Patient Cut — pt_cut","text":"Use apply patient cut SDTMv dataset (.e. subset SDTMv observations patients included dataset_cut input dataset)","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Patient Cut — pt_cut","text":"","code":"pt_cut(dataset_sdtm, dataset_cut)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Patient Cut — pt_cut","text":"dataset_sdtm Input SDTMv dataset dataset_cut Input datacut dataset, e.g. dcut","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Patient Cut — pt_cut","text":"Input dataset plus flag DCUT_TEMP_REMOVE indicate observations dropped patient level datacut applied","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Patient Cut — pt_cut","text":"Alana Harris","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/pt_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Patient Cut — pt_cut","text":"","code":"library(lubridate) dcut <- tibble::tribble( ~USUBJID, ~DCUTDTM, \"subject1\", ymd_hms(\"2020-10-11T23:59:59\"), \"subject2\", ymd_hms(\"2020-10-11T23:59:59\"), \"subject4\", ymd_hms(\"2020-10-11T23:59:59\") ) ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~AESTDTC, \"subject1\", 1, \"2020-01-02T00:00:00\", \"subject1\", 2, \"2020-08-31T00:00:00\", \"subject1\", 3, \"2020-10-10T00:00:00\", \"subject2\", 2, \"2020-02-20T00:00:00\", \"subject3\", 1, \"2020-03-02T00:00:00\", \"subject4\", 1, \"2020-11-02T00:00:00\" ) ae_out <- pt_cut( dataset_sdtm = ae, dataset_cut = dcut )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to generate datacut summary file — read_out","title":"Function to generate datacut summary file — read_out","text":"Produces .html file summarizing changes applied data data cut. file contain overview change number records dataset, types cut applied opportunity inspect removed records.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to generate datacut summary file — read_out","text":"","code":"read_out( dcut = NULL, patient_cut_data = NULL, date_cut_data = NULL, dm_cut = NULL, no_cut_list = NULL, out_path = \".\" )"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to generate datacut summary file — read_out","text":"dcut output datacut dataset (DCUT), created via create_dcut() function, containing variable DCUTDTC. patient_cut_data list quoted SDTMv domain names patient cut . applied (via pt_cut() function). left blank patient cut performed domains. date_cut_data list quoted SDTMv domain names date cut applied. (via date_cut() function). left blank date cut performed domains. dm_cut output dataset, created via special_dm_cut() function, containing variables DCUT_TEMP_REMOVE DCUT_TEMP_DTHCHANGE. no_cut_list List quoted SDTMv domain names cut applied. left blank domains remain exactly source. out_path character vector file save path summary file; default corresponds working directory, getwd().","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to generate datacut summary file — read_out","text":"Returns .html file summarizing changes made data datacut.","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/read_out.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to generate datacut summary file — read_out","text":"","code":"if (FALSE) { # \\dontrun{ dcut <- tibble::tribble( ~USUBJID, ~DCUTDTM, ~DCUTDTC, \"subject1\", lubridate::ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject2\", lubridate::ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\", \"subject4\", lubridate::ymd_hms(\"2020-10-11T23:59:59\"), \"2020-10-11T23:59:59\" ) ae <- tibble::tribble( ~USUBJID, ~AESEQ, ~AESTDTC, \"subject1\", 1, \"2020-01-02T00:00:00\", \"subject1\", 2, \"2020-08-31T00:00:00\", \"subject1\", 3, \"2020-10-10T00:00:00\", \"subject2\", 2, \"2020-02-20T00:00:00\", \"subject3\", 1, \"2020-03-02T00:00:00\", \"subject4\", 1, \"2020-11-02T00:00:00\", \"subject4\", 2, \"\" ) dm <- tibble::tribble( ~USUBJID, ~DTHDTC, ~DTHFL, \"subject1\", \"2020-10-11\", \"Y\", \"subject2\", \"2020-10-12\", \"Y\", ) dt_ae <- date_cut( dataset_sdtm = ae, sdtm_date_var = AESTDTC, dataset_cut = dcut, cut_var = DCUTDTM ) pt_ae <- pt_cut( dataset_sdtm = ae, dataset_cut = dcut ) dm_cut <- special_dm_cut( dataset_dm = dm, dataset_cut = dcut, cut_var = DCUTDTM ) read_out(dcut, patient_cut_data = list(ae = pt_ae), date_cut_data = list(ae = dt_ae), dm_cut) } # }"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":null,"dir":"Reference","previous_headings":"","what":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"Applies patient cut patient source DCUT, well clearing death information within DM death occurred datacut date","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"","code":"special_dm_cut(dataset_dm, dataset_cut, cut_var = DCUTDTM)"},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"dataset_dm Input DM SDTMv dataset dataset_cut Input datacut dataset cut_var Datacut date variable found dataset_cut dataset, default DCUTDTM","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"Input dataset plus flag DCUT_TEMP_REMOVE indicate observations dropped datacut applied, flag DCUT_TEMP_DTHCHANGE indicate observations death occurring data cut date clearing","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"Tim Barnett","code":""},{"path":"https:/pharmaverse.github.io/datacutr/devel/reference/special_dm_cut.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Special DM Cut to reset Death variable information past cut date — special_dm_cut","text":"","code":"dcut <- tibble::tribble( ~USUBJID, ~DCUTDTC, ~DCUTDTM, \"01-701-1015\", \"2014-10-20T23:59:59\", lubridate::ymd_hms(\"2014-10-20T23:59:59\"), \"01-701-1023\", \"2014-10-20T23:59:59\", lubridate::ymd_hms(\"2014-10-20T23:59:59\") ) dm <- tibble::tribble( ~USUBJID, ~DTHDTC, ~DTHFL, \"01-701-1015\", \"2014-10-20\", \"Y\", \"01-701-1023\", \"2014-10-21\", \"Y\", ) special_dm_cut( dataset_dm = dm, dataset_cut = dcut, cut_var = DCUTDTM ) #> # A tibble: 2 × 7 #> USUBJID DTHDTC DTHFL DCUT_TEMP_REMOVE DCUT_TEMP_DTHDT DCUT_TEMP_DCUTDTM #> #> 1 01-701-… 2014-… Y NA 2014-10-20 00:00:00 2014-10-20 23:59:59 #> 2 01-701-… 2014-… Y NA 2014-10-21 00:00:00 2014-10-20 23:59:59 #> # ℹ 1 more variable: DCUT_TEMP_DTHCHANGE "}]