diff --git a/main/404.html b/main/404.html index c18c83769..e15581b93 100644 --- a/main/404.html +++ b/main/404.html @@ -22,7 +22,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014
## ✅︎ verified teal_data object -## <environment: 0x559350cee1e8> [L] +## <environment: 0x55f422f44068> [L] ## Parent: <environment: package:teal.data>
data_empty <- within(data_empty, i <- head(iris)) data_empty # remains verified
## ✅︎ verified teal_data object -## <environment: 0x5593518a58a0> [L] +## <environment: 0x55f423afba70> [L] ## Parent: <environment: package:teal.data> ## Bindings: ## • i: <df[,5]> [L]
## ✖ unverified teal_data object -## <environment: 0x5593534fa4f0> [L] +## <environment: 0x55f4257506c0> [L] ## Parent: <environment: package:teal.data> ## Bindings: ## • i: <df[,5]> [L]
## ✖ unverified teal_data object -## <environment: 0x55934ed88a20> [L] +## <environment: 0x55f420fdea90> [L] ## Parent: <environment: package:teal.data> ## Bindings: ## • i: <df[,6]> [L]
## ✅︎ verified teal_data object -## <environment: 0x5593513f8d28> [L] +## <environment: 0x55f42364eec0> [L] ## Parent: <environment: package:teal.data> ## Bindings: ## • data: <df[,2]> [L]
## ✅︎ verified teal_data object -## <environment: 0x55858748b5e0> [L] +## <environment: 0x55b71b5165e0> [L] ## Parent: <environment: package:teal.data> ## Bindings: ## • data: <df[,2]> [L]
Kaledkowski D, Chlebowski A, Kosinski M, Verissimo A, Rucki P, Hallal M, Burkoff N, Nasinski M, Pagacz K, Zhao J (2024). teal.data: Data Model for 'teal' Applications. -R package version 0.6.0.9013, +R package version 0.6.0.9014, https://github.com/insightsengineering/teal.data/, https://insightsengineering.github.io/teal.data/.
@Manual{, title = {teal.data: Data Model for 'teal' Applications}, author = {Dawid Kaledkowski and Aleksander Chlebowski and Marcin Kosinski and Andre Verissimo and Pawel Rucki and Mahmoud Hallal and Nikolas Burkoff and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2024}, - note = {R package version 0.6.0.9013, + note = {R package version 0.6.0.9014, https://github.com/insightsengineering/teal.data/}, url = {https://insightsengineering.github.io/teal.data/}, }
datanames
get_code()
names
datanames()
join_keys
Kahn
get_code
warning
teal_data() #> ✅︎ verified teal_data object -#> <environment: 0x561a1d7e3020> [L] +#> <environment: 0x5556341aaaf8> [L] #> Parent: <environment: devtools_shims> teal_data(x = iris, code = "x = iris") #> ✖ unverified teal_data object -#> <environment: 0x561a1eb197b8> [L] +#> <environment: 0x555634c78a78> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • x: <df[,5]> [L] verify(teal_data(x = iris, code = "x = iris")) #> ✅︎ verified teal_data object -#> <environment: 0x561a20aaea80> [L] +#> <environment: 0x555634197360> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • x: <df[,5]> [L] diff --git a/main/reference/teal.data-package.html b/main/reference/teal.data-package.html index e4ed52a64..f28e0d3f8 100644 --- a/main/reference/teal.data-package.html +++ b/main/reference/teal.data-package.html @@ -13,7 +13,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -33,23 +33,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report diff --git a/main/reference/teal_data-class.html b/main/reference/teal_data-class.html index b924e8b8e..a562216e2 100644 --- a/main/reference/teal_data-class.html +++ b/main/reference/teal_data-class.html @@ -7,7 +7,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -27,23 +27,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report diff --git a/main/reference/teal_data.html b/main/reference/teal_data.html index 9dd51260e..c1d573286 100644 --- a/main/reference/teal_data.html +++ b/main/reference/teal_data.html @@ -9,7 +9,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -29,23 +29,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report @@ -110,7 +93,7 @@ ValueExamples teal_data(x1 = iris, x2 = mtcars) #> ✖ unverified teal_data object -#> <environment: 0x561a1d873860> [L] +#> <environment: 0x5556324d1390> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • x1: <df[,5]> [L] diff --git a/main/reference/topological_sort.html b/main/reference/topological_sort.html index 694c0a889..5633483f2 100644 --- a/main/reference/topological_sort.html +++ b/main/reference/topological_sort.html @@ -9,7 +9,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -29,23 +29,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report diff --git a/main/reference/update_keys_given_parents.html b/main/reference/update_keys_given_parents.html index 48751baa2..3f337727f 100644 --- a/main/reference/update_keys_given_parents.html +++ b/main/reference/update_keys_given_parents.html @@ -7,7 +7,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -27,23 +27,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report diff --git a/main/reference/verify.html b/main/reference/verify.html index d3a25b6f6..dd9ad1aba 100644 --- a/main/reference/verify.html +++ b/main/reference/verify.html @@ -7,7 +7,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -27,23 +27,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report @@ -104,7 +87,7 @@ Examples}) verify(tdata1) #> ✅︎ verified teal_data object -#> <environment: 0x561a1fea2c38> [L] +#> <environment: 0x55563404e290> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • a: <dbl> [L] @@ -114,7 +97,7 @@ Examplestdata2 <- teal_data(x1 = iris, code = "x1 <- iris") verify(tdata2) #> ✅︎ verified teal_data object -#> <environment: 0x561a20b5b0d0> [L] +#> <environment: 0x555634bfea10> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • x1: <df[,5]> [L] @@ -146,7 +129,7 @@ Examples) tdata4 #> ✖ unverified teal_data object -#> <environment: 0x561a1d6e0fd8> [L] +#> <environment: 0x5556343138a0> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • a: <dbl> [L] diff --git a/main/search.json b/main/search.json index a3f7b5789..b700b1bba 100644 --- a/main/search.json +++ b/main/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Join Keys","text":"teal.data package provides way define primary keys dataset establish relationships datasets. dataset joining keys can characterized : Columns constituting primary key; Foreign/merge keys, analogous SQL foreign keys. Typically, application developer specifies keys manually. However, datasets following ADaM standard, teal.data can automatically assign keys using default_cdisc_join_keys object. Refer section “Joining Keys ADaM Datasets” details using object select specific datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"uses-of-join_keys-class-in-teal-applications","dir":"Articles","previous_headings":"Overview","what":"Uses of join_keys class in teal applications","title":"Join Keys","text":"primary function join_keys class teal applications facilitate seamless merging datasets using teal.transform. Additionally, plays role data filtering using Filter Panel teal application. filters applied (parent) dataset also applied children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"anatomy-of-join_keys","dir":"Articles","previous_headings":"","what":"Anatomy of join_keys","title":"Join Keys","text":"join_keys object contains information foreign/primary keys multiple datasets. key represented pair datasets (name reference) named character vector encodes column name mapping two datasets. addition, foreign key may also contain parent-child attribute used “Filter Panel” mentioned . new join keys can created empty object, defining initial set primary foreign keys. initial object can extended adding/modifying/removing keys establishing parent-child relationships datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join_keys----join-keys-constructor-getter-setter","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_keys(...): Join Keys Constructor / Getter / Setter","title":"Join Keys","text":"Convenient function used constructor getter join_keys objects. Getter used retrieve joining keys contained objects, teal_data object. Constructor used specify collection multiple individual keys (via join_key function described ).","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join_keydataset_1-dataset_2-key-parent-single-join-key-constructor","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_key(dataset_1, dataset_2, key, parent): Single Join Key Constructor","title":"Join Keys","text":"Specifies primary key relationship two datasets. dataset_1, dataset_2: names datasets (dataset_2 dataset_1 omitted, creates primary key); key: named character vector column name mapping datasets (unnamed vector assumes column names datasets ); directed (optional): flag indicates whether parent-child directed relationship dataset_2 dataset_1 (latter parent). Note join keys assumed symmetric, .e., join_key(\"ds1\", \"ds2\", c(\"ds1_col\" = \"ds2_col\")) establishes relationship “x” “y” vice versa. default, new joining key set dataset_1 parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"example-output","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"Example & Output","title":"Join Keys","text":"","code":"library(teal.data) jk <- join_keys( join_key(\"ds1\", keys = \"col_1\"), # ds1: [col_1] join_key(\"ds2\", keys = c(\"col_1\", \"col_2\")), # ds2: [col_1, col_2] join_key(\"ds3\", keys = c(\"col_1\", \"col_3\")), # ds3: [col_1, col_3] join_key(\"ds1\", \"ds2\", keys = \"col_1\"), # ds1 <-- ds2 join_key(\"ds1\", \"ds3\", keys = \"col_1\"), # ds1 <-- ds3 join_key(\"ds4\", \"ds5\", keys = c(\"col_4\" = \"col_5\"), directed = FALSE) # ds4 <--> ds5 ) # The parent-child relationships are created automatically (unless 'parent' parameter is \"none\") jk"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"accessing-and-modifying-keys","dir":"Articles","previous_headings":"","what":"Accessing and Modifying keys","title":"Join Keys","text":"subset operator 2 indices (x[, j]) used retrieve primary/foreign keys. indices must string denoting dataset name. Note symmetry keys ds4 ds5 relationship: 1 argument used operator return join_keys object filtered accordingly. Modifying adding key uses notation assignment operator <-. symmetric relationship created automatically, parent (default) dataset defined first index. Assigning NULL value delete relationship.","code":"# Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting foreign keys between \"ds4\" and \"ds5\" jk[\"ds4\", \"ds5\"] ## col_4 ## \"col_5\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" # Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting keys of \"ds1\" and \"ds2\" jk[c(\"ds1\", \"ds2\")] ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] # Adding a new ds5 <-- ds1 key jk[\"ds1\", \"ds5\"] <- \"a_column\" # Removing an existing key jk[\"ds4\", \"ds5\"] <- NULL"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"merging-join-keys","dir":"Articles","previous_headings":"","what":"Merging Join Keys","title":"Join Keys","text":"combining multiple joining keys achieved using c() generic function, generates symmetric valid join_keys object. encountering identical relationship pairs, operation retains last occurrence pair within specified argument order. added convenience, function also accommodates join_key_set objects created join_key function. objects can provided initial argument position needed.","code":"jk1 <- join_keys(join_key(\"ds1\", \"ds1\", \"col_1\")) jk2 <- join_keys(join_key(\"ds2\", \"ds2\", \"col_1\"), join_key(\"ds1\", \"ds2\", \"col_1\")) # Merging c(jk1, jk2) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1] ## --> ds1: [col_1] # Keeping last occurence c(jk1, jk2, join_keys(join_key(\"ds2\", \"ds2\", \"col_2\"), join_key(\"ds1\", \"ds2\", c(\"col_1\" = \"col_2\")))) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_2] ## ds2: [col_2] ## --> ds1: [col_1] # Merges join_key and join_key_set objects (from join_key function) c(jk1, join_key(\"ds3\", \"ds3\", \"col_3\")) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## ds3: [col_3]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join-keys-relationships","dir":"Articles","previous_headings":"","what":"Join Keys Relationships","title":"Join Keys","text":"2 types relationships encoded joining keys described following sections. primary foreign keys created explicitly using constructor individual keys (join_key). Additionally, join_keys object infers implicit relationships two datasets share foreign keys parent dataset, . implicit relationships available just like another foreign key can used merge datasets, despite defined user.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"primary-key-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Primary Key with teal_data","title":"Join Keys","text":"using teal_data function, simplest method define join keys use join_keys argument. can specify column(s) dataset (together) uniquely identify rows dataset. can extend previous example define primary keys multiple datasets:","code":"library(teal.data) td_pk <- within( teal_data(), ds1 <- transform(iris, id = seq_len(nrow(iris))) ) datanames(td_pk) <- \"ds1\" join_keys(td_pk) <- join_keys(join_key(\"ds1\", keys = \"id\")) join_keys(td_pk) ## A join_keys object containing foreign keys between 1 datasets: ## ds1: [id] td_pk <- within( td_pk, { ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_pk) <- c(datanames(td_pk), \"ds2\", \"ds3\") join_keys(td_pk)[\"ds2\", \"ds2\"] <- c(\"V\", \"W\") join_keys(td_pk)[\"ds3\", \"ds3\"] <- c(\"V\", \"W\") join_keys(td_pk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [id] ## ds2: [V, W] ## ds3: [V, W]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"foreign-keys-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Foreign Keys with teal_data","title":"Join Keys","text":"passing multiple datasets teal_data function, dataset relationships set using join_keys join_key functions, can used merge datasets together within teal apps. users familiar SQL database schema, relationships symmetric strict SQL foreign key relationships teal validate whether values defined foreign key columns present table. example:","code":"library(teal.data) td_fk <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_fk) <- c(\"ds1\", \"ds2\", \"ds3\") join_keys(td_fk) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")) ) join_keys(td_fk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [X] ## <-- ds2: [W] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## ds3: [V] ## --> ds2: [V]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"implicit-relationships","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Implicit Relationships","title":"Join Keys","text":"Two datasets share common foreign keys parent dataset implicit relationship modeled accessible joining keys. special relationship inferred existing foreign keys. need explicitly defined can accessed overwritten just foreign key. implicit relationships can used merge 2 datasets together, just defined manually. Note definition contains join_key \"ds2\" <-> \"ds4\"","code":"library(teal.data) td <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) ds4 <- data.frame(V = 5:14, R = rnorm(10)) } ) datanames(td) <- c(\"ds1\", \"ds2\", \"ds3\", \"ds4\") join_keys(td) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), join_key(\"ds4\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")), join_key(\"ds1\", \"ds4\", c(\"X\" = \"B\")) ) join_keys(td) ## A join_keys object containing foreign keys between 4 datasets: ## ds1: [X] ## <-- ds2: [W] ## <-- ds4: [B] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## --* (implicit via parent with): ds4 ## ds3: [V] ## --> ds2: [V] ## ds4: [V] ## --> ds1: [X] ## --* (implicit via parent with): ds2 join_keys(td)[\"ds2\", \"ds4\"] ## W ## \"B\""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join-keys-in-adam-datasets","dir":"Articles","previous_headings":"","what":"Join Keys in ADaM Datasets","title":"Join Keys","text":"teal.data provides set default join keys (primary foreign) datasets named according ADaM standard. stored default_cdisc_join_keys. default keys required users can select smaller set datasets subsetting (example: default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\")]). Please note, every element selected, parent also returned (one) well pair-wise relationships resulting selection.","code":"names(default_cdisc_join_keys) |> sort() ## [1] \"ADAE\" \"ADAETTE\" \"ADCM\" \"ADCSSRS\" \"ADDV\" \"ADEG\" ## [7] \"ADEQ5D5L\" \"ADEX\" \"ADHY\" \"ADLB\" \"ADMH\" \"ADQLQC\" ## [13] \"ADQS\" \"ADRS\" \"ADSAFTTE\" \"ADSL\" \"ADSUB\" \"ADTTE\" ## [19] \"ADVS\" default_cdisc_join_keys ## A join_keys object containing foreign keys between 19 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADAE: [STUDYID, USUBJID] ## <-- ADEG: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADAETTE: [STUDYID, USUBJID] ## <-- ADCM: [STUDYID, USUBJID] ## <-- ADEX: [STUDYID, USUBJID] ## <-- ADLB: [STUDYID, USUBJID] ## <-- ADMH: [STUDYID, USUBJID] ## <-- ADQS: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## <-- ADSAFTTE: [STUDYID, USUBJID] ## <-- ADVS: [STUDYID, USUBJID] ## <-- ADDV: [STUDYID, USUBJID] ## <-- ADSUB: [STUDYID, USUBJID] ## <-- ADHY: [STUDYID, USUBJID] ## <-- ADQLQC: [STUDYID, USUBJID] ## <-- ADCSSRS: [STUDYID, USUBJID] ## <-- ADEQ5D5L: [STUDYID, USUBJID] ## ADAE: [STUDYID, USUBJID, ASTDTM, AETERM, AESEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEG: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADAETTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADCM: [STUDYID, USUBJID, ASTDTM, CMSEQ, ATC1CD, ATC2CD, ATC3CD, ATC4CD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEX: [STUDYID, USUBJID, PARCAT1, PARAMCD, AVISITN, ASTDTM, EXSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADLB: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADMH: [STUDYID, USUBJID, ASTDTM, MHSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSAFTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADVS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADDV: [STUDYID, USUBJID, ASTDT, DVTERM, DVSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSUB: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADHY: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQLQC: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADCSSRS, ADEQ5D5L ## ADCSSRS: [STUDYID, USUBJID, PARAMCD, BASETYPE, AVISITN, DTYPE, ADTM] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADEQ5D5L ## ADEQ5D5L: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS default_cdisc_join_keys[\"ADSL\"] ## A join_keys object containing foreign keys between 1 datasets: ## ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[\"ADTTE\"] ## A join_keys object containing foreign keys between 2 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ## A join_keys object containing foreign keys between 3 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADRS ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADTTE"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"reproducibility-of-teal_data-objects","dir":"Articles","previous_headings":"","what":"Reproducibility of teal_data objects","title":"teal_data reproducibility","text":"Reproducibility primary function qenv class, teal_data inherits . Every data modification teal_data object performed encapsulated environment, separate global environment. important note reproducibility object limited data-code relationship. aspects reliability data source, reproducibility R session (including package versions), creation use objects environments (e.g. .GlobalEnv) verified properly teal_data. advisable always begin analysis new session run code pertains analysis within teal_data object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"verification-status","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification status","title":"teal_data reproducibility","text":"Every teal_data object verification status, statement whether contents env can reproduced code. perspective, teal_data objects instantiated empty verified ones instantiated data code unverified code need reproducible. Obviously, teal_data objects instantiated data unverified well. evaluating code teal_data object, code stored code executed, reproducible definition. Therefore, evaluating code teal_data object change verification status. verification status always printed inspecting teal_data object. Also, retrieving code, unverified objects add warning code stating passed verification.","code":"library(teal.data) data_empty <- teal_data() data_empty # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: data_empty <- within(data_empty, i <- head(iris)) data_empty # remains verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- teal_data(i = head(iris), code = \"i <- head(iris)\") data_with_data # is unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- within(data_with_data, i$rand <- sample(nrow(i))) data_with_data # remains unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"verification-process","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification process","title":"teal_data reproducibility","text":"order confirm code stored teal_data exactly reproduces contents environment, one must run verify() function. causes code evaluated results compared contents environment. code executes without errors results contents already present environment, verification successful object’s state changed verified. Otherwise error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"verified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"verified","title":"teal_data reproducibility","text":"","code":"library(teal.data) data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) data_right <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) }) ) # is unverified (data_right_verified <- verify(data_right)) # returns verified object ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"unverified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"unverified","title":"teal_data reproducibility","text":"","code":"data_wrong <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) }) ) verify(data_wrong) # fails verification, raises error ## Error: Code verification failed. ## Object(s) recreated with code that have different structure in data_wrong: ## • data"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"retrieving-code","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Retrieving code","title":"teal_data reproducibility","text":"get_code function used retrieve code stored teal_data object. simple get_code() return entirety code using names argument allows obtaining subset code deals objects stored teal_data. Note retrieving code specific dataset, result code used create dataset, code uses .","code":"library(teal.data) data <- within(teal_data(), { i <- iris m <- mtcars head(i) }) cat(get_code(data)) # retrieve all code ## i <- iris ## m <- mtcars ## head(i) cat(get_code(data, names = \"i\")) # retrieve code for `i` ## i <- iris"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"tracking-object-dependencies","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Tracking object dependencies","title":"teal_data reproducibility","text":"Calling get_code datanames specified initiates analysis stored code, object dependencies automatically discovered. object x created expression uses object y, lines create object y must also returned. quite effective objects created simple assignments like x <- foo(y). However, rare cases discovering dependencies impossible, e.g. opening connections databases objects created side effects (functions acting calling environment implicitly rather returning value assigned). cases code author must manually tag code lines required dataset adding special comment lines: # @linksto x cause line included retrieving code x. See ?get_code detailed explanation examples.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Introduction to teal.data","text":"teal.data package specifies data format used teal applications. teal_data class inherits qenv meant used reproducibility purposes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"quick-start","dir":"Articles","previous_headings":"Introduction","what":"Quick Start","title":"Introduction to teal.data","text":"create object class teal_data, use teal_data function. teal_data number methods manage relevant information private class slots.","code":"library(teal.data) # create teal_data object my_data <- teal_data() # run code within teal_data to create data objects my_data <- within( my_data, { data1 <- data.frame(id = 1:10, x = 11:20) data2 <- data.frame(id = 1:10, x = 21:30) } ) # get objects stored in teal_data my_data[[\"data1\"]] my_data[[\"data1\"]] # get reproducible code get_code(my_data) # get or set datanames datanames(my_data) <- c(\"data1\", \"data2\") datanames(my_data) # print print(my_data)"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"teal_data-characteristics","dir":"Articles","previous_headings":"Introduction","what":"teal_data characteristics","title":"Introduction to teal.data","text":"teal_data object keeps following information: env - environment containing data. code - string containing code reproduce env (details reproducibility). datanames - character vector listing objects interest teal modules (details teal vignette). join_keys - join_keys object defining relationships datasets (details Join Keys).","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"reproducibility","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Reproducibility","title":"Introduction to teal.data","text":"primary function teal_data provide reproducibility data. recommend initialize empty teal_data, marks object verified, create datasets evaluating code object, using within eval_code. Read teal_data Reproducibility.","code":"my_data <- teal_data() my_data <- within(my_data, data <- data.frame(x = 11:20)) my_data <- within(my_data, data$id <- seq_len(nrow(data))) my_data # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"relational-data-models","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Relational data models","title":"Introduction to teal.data","text":"teal_data class supports relational data. Relationships datasets can described joining keys stored teal_data object. relationships can read set join_keys function. See join_keys.","code":"my_data <- teal_data() my_data <- within(my_data, { data <- data.frame(id = 1:10, x = 11:20) child <- data.frame(id = 1:20, data_id = c(1:10, 1:10), y = 21:30) }) join_keys(my_data) <- join_keys( join_key(\"data\", \"data\", key = \"id\"), join_key(\"child\", \"child\", key = \"id\"), join_key(\"child\", \"data\", key = c(\"data_id\" = \"id\")) ) join_keys(my_data) ## A join_keys object containing foreign keys between 2 datasets: ## child: [id] ## <-- data: [id] ## data: [id] ## --> child: [data_id]"},{"path":"https://insightsengineering.github.io/teal.data/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Aleksander Chlebowski. Author. Marcin Kosinski. Author. Andre Verissimo. Author. Pawel Rucki. Author. Mahmoud Hallal. Author. Nikolas Burkoff. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Chlebowski , Kosinski M, Verissimo , Rucki P, Hallal M, Burkoff N, Nasinski M, Pagacz K, Zhao J (2024). teal.data: Data Model 'teal' Applications. R package version 0.6.0.9013, https://github.com/insightsengineering/teal.data/, https://insightsengineering.github.io/teal.data/main/.","code":"@Manual{, title = {teal.data: Data Model for 'teal' Applications}, author = {Dawid Kaledkowski and Aleksander Chlebowski and Marcin Kosinski and Andre Verissimo and Pawel Rucki and Mahmoud Hallal and Nikolas Burkoff and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2024}, note = {R package version 0.6.0.9013, https://github.com/insightsengineering/teal.data/}, url = {https://insightsengineering.github.io/teal.data/main/}, }"},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"tealdata","dir":"","previous_headings":"","what":"Data Model for teal Applications","title":"Data Model for teal Applications","text":"package used create data needed teal applications. data can : Independent data frames CDISC data (clinical trial reporting) Relational data MultiAssayExperiment objects package provides: mechanism pulling data existing systems ability mutate (.e. pre-process) data record operations used create data enable reproducibility","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Data Model for teal Applications","text":"Alternatively, might want use development version.","code":"install.packages('teal.data') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.data\")"},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Data Model for teal Applications","text":"understand use package, please refer Introduction teal.data article, provides multiple examples code implementation. showcase example usage.","code":"library(teal.data) # quick start for clinical trial data my_data <- cdisc_data( ADSL = example_cdisc_data(\"ADSL\"), ADTTE = example_cdisc_data(\"ADTTE\"), code = quote({ ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) ) # or my_data <- within(teal_data(), { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) datanames <- c(\"ADSL\", \"ADTTE\") datanames(my_data) <- datanames join_keys(my_data) <- default_cdisc_join_keys[datanames] # quick start for general data my_general_data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) # reproducibility check data <- teal_data(iris = iris, code = \"iris <- mtcars\") verify(data) #> Error: Code verification failed. #> Object(s) recreated with code that have different structure in data: #> • iris # code extraction iris2_data <- within(teal_data(), {iris2 <- iris[1:6, ]}) get_code(iris2_data) #> \"iris2 <- iris[1:6, ]\""},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Data Model for teal Applications","text":"encounter bug feature request, please file issue. questions, discussions, staying date, please use teal channel pharmaverse slack workspace.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated TealData class and related functions — TealData","title":"Deprecated TealData class and related functions — TealData","text":"TealData class associated functions deprecated. Use teal_data() instead. See Migration guide details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated TealData class and related functions — TealData","text":"","code":"as_cdisc(...) callable_code(...) callable_function(...) code_dataset_connector(...) code_cdisc_dataset_connector(...) csv_dataset_connector(...) csv_cdisc_dataset_connector(...) python_code(...) python_dataset_connector(...) python_cdisc_dataset_connector(...) cdisc_data_connector(...) cdisc_dataset(...) cdisc_dataset_connector(...) cdisc_dataset_connector_file(...) cdisc_dataset_file(...) dataset(...) dataset_connector(...) dataset_connector_file(...) dataset_file(...) data_connection(...) fun_dataset_connector(...) fun_cdisc_dataset_connector(...) relational_data_connector(...) mae_dataset(...) get_attrs(...) get_dataset_label(...) get_dataset(...) get_datasets(...) get_dataname(...) get_key_duplicates(...) get_keys(...) get_raw_data(...) is_pulled(...) load_dataset(...) load_datasets(...) mutate_data(...) mutate_dataset(...) set_args(...) rds_dataset_connector(...) rds_cdisc_dataset_connector(...) script_dataset_connector(...) script_cdisc_dataset_connector(...) set_keys(...) read_script(...) to_relational_data(...) validate_metadata(...) get_cdisc_keys(...) cdisc_data_file(...) teal_data_file(...) get_join_keys(...) get_join_keys(...) <- value"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated TealData class and related functions — TealData","text":"... argument supported TealData related functions. value value assign","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deprecated TealData class and related functions — TealData","text":"nothing","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Test if two objects are (nearly) equal — all.equal.join_keys","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":".equal(target, current) utility compare join_keys objects target current testing near equality.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"","code":"# S3 method for class 'equal.join_keys' all(target, current, ...)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"target R object. current R object, compared target. ... arguments different methods. used join_keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"different, comparison still made extent, report differences returned. use .equal directly expressions—either use isTRUE(.equal(....)) identical appropriate. parents attribute comparison tolerates NULL empty lists find difference. list containing relationships treated like map ignores entries NULL exist.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Compatibility of keys — assert_compatible_keys","title":"Check Compatibility of keys — assert_compatible_keys","text":"Helper function assert two key sets contain incompatible keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Compatibility of keys — assert_compatible_keys","text":"","code":"assert_compatible_keys(join_key_1, join_key_2)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Compatibility of keys — assert_compatible_keys","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys2.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify key set compatibility — assert_compatible_keys2","title":"Verify key set compatibility — assert_compatible_keys2","text":"Helper function ensuring compatibility two sets keys","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify key set compatibility — assert_compatible_keys2","text":"","code":"assert_compatible_keys2(x, y)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify key set compatibility — assert_compatible_keys2","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate parent-child key — assert_parent_child","title":"Validate parent-child key — assert_parent_child","text":"Helper function checks parent-child relations valid.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate parent-child key — assert_parent_child","text":"","code":"assert_parent_child(x)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate parent-child key — assert_parent_child","text":"x (join_keys) object assert validity relations","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate parent-child key — assert_parent_child","text":"join_keys invisibly","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data input for teal app — cdisc_data","title":"Data input for teal app — cdisc_data","text":"Function wrapper around teal_data() guesses join_keys given datasets whose names match ADAM datasets names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data input for teal app — cdisc_data","text":"","code":"cdisc_data( ..., join_keys = teal.data::default_cdisc_join_keys[names(rlang::list2(...))], code = character(0), check )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data input for teal app — cdisc_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty automatically derived basing intersection datasets primary keys. ADAM datasets automatically derived. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data input for teal app — cdisc_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data input for teal app — cdisc_data","text":"function checks keys added data sets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data input for teal app — cdisc_data","text":"","code":"data <- cdisc_data( join_keys = join_keys( join_key(\"ADSL\", \"ADTTE\", c(\"STUDYID\" = \"STUDYID\", \"USUBJID\" = \"USUBJID\")) ) ) data <- within(data, { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") })"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Variable labels — col_labels","title":"Variable labels — col_labels","text":"Get set variable labels data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variable labels — col_labels","text":"","code":"col_labels(x, fill = FALSE) col_labels(x) <- value col_relabel(x, ...) get_labels(...)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Variable labels — col_labels","text":"functions taken formatters package, reduce complexity dependency tree rewritten.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Variable labels — col_labels","text":"x (data.frame DataFrame) data object fill (logical(1)) specifying return variable label value (character) vector variable labels length equal number columns x; named, names must match variable names x used key set labels; use NA remove label variable ... name-value pairs, name corresponds variable name x value new variable label; use NA remove label variable","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Variable labels — col_labels","text":"col_labels, named character vector variable labels, names corresponding variable names. label attribute missing, vector elements variable names fill = TRUE NA fill = FALSE. col_labels<- col_relabel, copy x variable labels modified.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Variable labels — col_labels","text":"Variable labels can stored label attribute set individual variables. functions get set attribute, either (col_labels) variables (col_relabel). previous versions teal.data labels managed get_labels(). function deprecated 0.4.0, use col_labels instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Variable labels — col_labels","text":"","code":"x <- iris col_labels(x) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> NA NA NA NA NA col_labels(x) <- paste(\"label for\", names(iris)) col_labels(x) #> Sepal.Length Sepal.Width Petal.Length #> \"label for Sepal.Length\" \"label for Sepal.Width\" \"label for Petal.Length\" #> Petal.Width Species #> \"label for Petal.Width\" \"label for Species\" y <- col_relabel(x, Sepal.Length = \"Sepal Length of iris flower\") col_labels(y) #> Sepal.Length Sepal.Width #> \"Sepal Length of iris flower\" \"label for Sepal.Width\" #> Petal.Length Petal.Width #> \"label for Petal.Length\" \"label for Petal.Width\" #> Species #> \"label for Species\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Names of data sets in teal_data object — datanames","title":"Names of data sets in teal_data object — datanames","text":"Get set value datanames slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Names of data sets in teal_data object — datanames","text":"","code":"datanames(x) datanames(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Names of data sets in teal_data object — datanames","text":"x (teal_data) object access modify value (character) new value @datanames; elements must names variables existing @env","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Names of data sets in teal_data object — datanames","text":"contents @datanames teal_data object updated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Names of data sets in teal_data object — datanames","text":"@datanames slot teal_data object specifies variables stored environment (@env slot) data sets taken consideration. contents @datanames can specified upon creation default variables @env. Variables created later, may well data sets, automatically considered . Use function update slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Names of data sets in teal_data object — datanames","text":"","code":"td <- teal_data(iris = iris) td <- within(td, mtcars <- mtcars) datanames(td) #> [1] \"iris\" datanames(td) <- c(\"iris\", \"mtcars\") datanames(td) #> [1] \"iris\" \"mtcars\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"data object created loading time cdisc_datasets/cdisc_datasets.yaml.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"","code":"default_cdisc_join_keys"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"object class join_keys (inherits list) length 19.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sample CDISC datasets — example_cdisc_data","title":"Generate sample CDISC datasets — example_cdisc_data","text":"Retrieves example CDISC datasets use examples testing.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sample CDISC datasets — example_cdisc_data","text":"","code":"example_cdisc_data( dataname = c(\"ADSL\", \"ADAE\", \"ADLB\", \"ADCM\", \"ADEX\", \"ADRS\", \"ADTR\", \"ADTTE\", \"ADVS\") )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sample CDISC datasets — example_cdisc_data","text":"dataname (character(1)) name CDISC dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sample CDISC datasets — example_cdisc_data","text":"CDISC dataset data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate sample CDISC datasets — example_cdisc_data","text":"function returns dummy dataset used within teal.data. Note datasets created maintained teal.data, retrieved dependencies.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code from teal_data object — get_code,teal_data-method","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"# S4 method for class 'teal_data' get_code( object, deparse = TRUE, names = NULL, datanames = lifecycle::deprecated(), ... )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code from teal_data object — get_code,teal_data-method","text":"object (teal_data) deparse (logical) flag specifying whether return code character (deparse = TRUE) expression (deparse = FALSE). names (character) Successor datanames. Vector dataset names return code . details see \"Extracting dataset-specific code\" section. datanames (character) vector dataset names return code . details see \"Extracting dataset-specific code\" section. Use names instead. ... Parameters passed internal methods. Currently, supported parameter check_names (logical(1)) flag, TRUE default. Function warns missing objects, exist code passed datanames. remove warning, set check_names = FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code from teal_data object — get_code,teal_data-method","text":"Either character string expression. names used request specific dataset, code creates dataset (code uses ) returned. Otherwise, contents @code.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code stored @code, (principle) can used recreate objects found @env. Use names limit code one datasets enumerated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"extracting-dataset-specific-code","dir":"Reference","previous_headings":"","what":"Extracting dataset-specific code","title":"Get code from teal_data object — get_code,teal_data-method","text":"names specified, code returned limited lines needed create requested datasets. code stored @code slot analyzed statically determine lines datasets interest depend upon. analysis works well objects created standard infix assignment operators (see ?assignOps) can fail situations. Consider following examples: Case 1: Usual assignments. x dependencies, get_code(data, names = \"x\") return second call.y depends x foo, get_code(data, names = \"y\") contain three calls. Case 2: objects created function's side effects. , y depends x x modified foo side effect (reassignment) get_code(data, names = \"y\") return foo() call. overcome limitation, code dependencies can specified manually. Lines side effects occur can flagged adding \"# @linksto \" end. Note within evaluates code passed expr comments ignored. order include comments code one must use eval_code function instead. Now foo() call properly included code required recreate y. Note two functions create objects side effects, assign data, handled automatically. known cases manual tagging necessary: non-standard assignment operators, e.g. %<>% objects used conditions statements: () objects used iterate loops: () creating evaluating language objects, e.g. eval()","code":"data <- teal_data() |> within({ foo <- function(x) { x + 1 } x <- 0 y <- foo(x) }) get_code(data, names = \"y\") data <- teal_data() |> within({ foo <- function() { x <<- x + 1 } x <- 0 foo() y <- x }) get_code(data, names = \"y\") data <- teal_data() |> eval_code(\" foo <- function() { x <<- x + 1 } x <- 0 foo() # @linksto x y <- x \") get_code(data, names = \"y\")"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) get_code(tdata1) #> [1] \"a <- 1\\nb <- a^5\\nc <- list(x = 2)\" get_code(tdata1, names = \"a\") #> [1] \"a <- 1\" get_code(tdata1, names = \"b\") #> [1] \"a <- 1\\nb <- a^5\" tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") get_code(tdata2) #> [1] \"x1 <- iris\" get_code(verify(tdata2)) #> [1] \"x1 <- iris\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"Checks whether graph Directed Acyclic Graph (DAG)","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"","code":"is_dag(graph)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"logical(1) TRUE graph DAG; FALSE otherwise","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a relationship between a pair of datasets — join_key","title":"Create a relationship between a pair of datasets — join_key","text":"Create relationship two datasets, dataset_1 dataset_2. default, function establishes directed relationship dataset_1 parent. dataset_2 specified, function creates primary key dataset_1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(dataset_1, dataset_2 = dataset_1, keys, directed = TRUE)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a relationship between a pair of datasets — join_key","text":"dataset_1, dataset_2 (character(1)) Dataset names. dataset_2 omitted, primary key dataset_1 created. keys (optionally named character) Column mapping datasets, names(keys) maps columns dataset_1 corresponding columns dataset_2 given elements keys. unnamed, column names used datasets. element keys vector empty non-empty name, name used datasets. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a relationship between a pair of datasets — join_key","text":"object class join_key_set passed join_keys function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(\"d1\", \"d2\", c(\"A\")) #> $d1 #> $d1$d2 #> A #> \"A\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\")) #> $d1 #> $d1$d2 #> A #> \"B\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\", \"C\")) #> $d1 #> $d1$d2 #> A C #> \"B\" \"C\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #>"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage relationships between datasets using join_keys — join_keys","title":"Manage relationships between datasets using join_keys — join_keys","text":"Facilitates creation retrieval relationships datasets. join_keys class extends list contains keys connecting pairs datasets. element list contains keys specific dataset. dataset can relationship (primary key) datasets. Note join_keys list symmetrical assumes default direction, : keys set ds1 ds2, defines ds1 parent parent-child relationship mapping automatically mirrored ds2 ds1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"## Constructor, getter and setter join_keys(...) # Default S3 method join_keys(...) # S3 method for class 'join_keys' join_keys(...) # S3 method for class 'teal_data' join_keys(...) # S3 method for class 'join_keys' x[i, j] # S3 method for class 'join_keys' x[i, j, directed = TRUE] <- value # S3 method for class 'join_keys' c(...) # S3 method for class 'join_key_set' c(...) join_keys(x) <- value # S3 method for class 'join_keys' join_keys(x) <- value # S3 method for class 'teal_data' join_keys(x) <- value # S3 method for class 'join_keys' format(x, ...) # S3 method for class 'join_keys' print(x, ...)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage relationships between datasets using join_keys — join_keys","text":"... optional, either teal_data join_keys object extract join_keys number join_key_set objects create join_keys nothing create empty join_keys x (join_keys) empty object set new relationship pairs. x typically object join_keys class. called join_keys(x) join_keys(x) <- value can also take supported class (teal_data, join_keys) , j indices specifying elements extract replace. Index character vector, can also take numeric, logical, NULL missing. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected. value x[, j, directed = TRUE)] <- value (named/unnamed character) Column mapping datasets. join_keys(x) <- value: (join_key_set list join_key_set) relationship pairs add join_keys list. [, j, directed = TRUE)]: R:,%20j,%20directed%20=%20TRUE)","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys(): Returns empty join_keys object called without arguments. join_keys(join_keys): Returns . join_keys(teal_data): Returns join_keys object contained teal_data object. join_keys(...): Creates new object one join_key_set parameters.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Manage relationships between datasets using join_keys — join_keys","text":"x[datanames]: Returns subset join_keys object given datanames, including parent datanames symmetric mirror keys datanames result. x[, j]: Returns join keys datasets j, including implicit keys inferred relationship parent. x[, j] <- value: Assignment key pair (, j). x[] <- value: (without j parameter) supported operation join_keys. join_keys(x)[, j] <- value: Assignment join_keys object stored x, teal_data object join_keys object . join_keys(x) <- value: Assignment join_keys object value. value needs object class join_keys join_key_set.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"# Creating a new join keys ---- jk <- join_keys( join_key(\"ds1\", \"ds1\", \"pk1\"), join_key(\"ds2\", \"ds2\", \"pk2\"), join_key(\"ds3\", \"ds3\", \"pk3\"), join_key(\"ds1\", \"ds2\", c(pk1 = \"pk2\")), join_key(\"ds1\", \"ds3\", c(pk1 = \"pk3\")) ) jk #> A join_keys object containing foreign keys between 3 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> <-- ds3: [pk3] #> ds2: [pk2] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3 #> ds3: [pk3] #> --> ds1: [pk1] #> --* (implicit via parent with): ds2 # Getter for join_keys --- jk[\"ds1\", \"ds2\"] #> pk1 #> \"pk2\" # Subsetting join_keys ---- jk[\"ds1\"] #> A join_keys object containing foreign keys between 1 datasets: #> ds1: [pk1] jk[1:2] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] jk[c(\"ds1\", \"ds2\")] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] # Setting a new primary key --- jk[\"ds4\", \"ds4\"] <- \"pk4\" jk[\"ds5\", \"ds5\"] <- \"pk5\" # Setting a single relationship pair --- jk[\"ds1\", \"ds4\"] <- c(\"pk1\" = \"pk4\") # Removing a key --- jk[\"ds5\", \"ds5\"] <- NULL # Merging multiple `join_keys` objects --- jk_merged <- c( jk, join_keys( join_key(\"ds4\", keys = c(\"pk4\", \"pk4_2\")), join_key(\"ds3\", \"ds4\", c(pk3 = \"pk4_2\")) ) ) # note: merge can be performed with both join_keys and join_key_set jk_merged <- c( jk_merged, join_key(\"ds5\", keys = \"pk5\"), join_key(\"ds1\", \"ds5\", c(pk1 = \"pk5\")) ) # Assigning keys via join_keys(x)[i, j] <- value ---- obj <- join_keys() # or obj <- teal_data() join_keys(obj)[\"ds1\", \"ds1\"] <- \"pk1\" join_keys(obj)[\"ds2\", \"ds2\"] <- \"pk2\" join_keys(obj)[\"ds3\", \"ds3\"] <- \"pk3\" join_keys(obj)[\"ds1\", \"ds2\"] <- c(pk1 = \"pk2\") join_keys(obj)[\"ds1\", \"ds3\"] <- c(pk1 = \"pk3\") identical(jk, join_keys(obj)) #> [1] FALSE # Setter for join_keys within teal_data ---- td <- teal_data() join_keys(td) <- jk join_keys(td)[\"ds1\", \"ds2\"] <- \"new_key\" join_keys(td) <- c(join_keys(td), join_keys(join_key(\"ds3\", \"ds2\", \"key3\"))) join_keys(td) #> A join_keys object containing foreign keys between 4 datasets: #> ds1: [pk1] #> <-> ds2: [new_key] #> <-- ds3: [pk3] #> <-- ds4: [pk4] #> ds3: [pk3] #> --> ds1: [pk1] #> <-- ds2: [key3] #> --* (implicit via parent with): ds4 #> ds2: [pk2] #> <-> ds1: [new_key] #> --> ds3: [key3] #> ds4: [pk4] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/names-set-.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"The names of a join_keys object — names<-.join_keys","title":"The names of a join_keys object — names<-.join_keys","text":"names join_keys object","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/names-set-.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The names of a join_keys object — names<-.join_keys","text":"","code":"# S3 method for class 'join_keys' names(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/names-set-.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The names of a join_keys object — names<-.join_keys","text":"x R object. value character vector length x, NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal constructor — new_join_keys","title":"Internal constructor — new_join_keys","text":"Internal constructor","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal constructor — new_join_keys","text":"","code":"new_join_keys()"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Internal constructor — new_join_keys","text":"empty join_keys list","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize teal_data object — new_teal_data","title":"Initialize teal_data object — new_teal_data","text":"Initialize teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize teal_data object — new_teal_data","text":"","code":"new_teal_data( data, code = character(0), join_keys = join_keys(), datanames = names(data) )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize teal_data object — new_teal_data","text":"data (named list) data objects. code (character language) code reproduce data. Accepts stores comments also. join_keys (join_keys) object datanames (character) names datasets passed data. Needed non-dataset objects needed env slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Get and set parents in join_keys object — parents","title":"Get and set parents in join_keys object — parents","text":"parents() facilitates creation dependencies datasets assigning parent-child relationship.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get and set parents in join_keys object — parents","text":"","code":"parents(x) # S3 method for class 'join_keys' parents(x) # S3 method for class 'teal_data' parents(x) parents(x) <- value # S3 method for class 'join_keys' parents(x) <- value # S3 method for class 'teal_data' parents(x) <- value parent(x, dataset_name)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get and set parents in join_keys object — parents","text":"x (join_keys teal_data) object contains \"parents\" information retrieve manipulate. value (named list) character vectors. dataset_name (character(1)) Name dataset query parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get and set parents in join_keys object — parents","text":"list character representing parents. parent(x, dataset_name) returns NULL parent exist.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get and set parents in join_keys object — parents","text":"element defined list element, list(\"child\" = \"parent\").","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Get and set parents in join_keys object — parents","text":"parents(join_keys): Retrieves parents join_keys object. parents(teal_data): Retrieves parents join_keys inside teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Get and set parents in join_keys object — parents","text":"parents(x) <- value: Assignment parents join_keys object. parents(join_keys) <- value: Assignment parents join_keys object. parents(teal_data) <- value: Assignment parents join_keys inside teal_data object. parent(): Getter individual parent.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get and set parents in join_keys object — parents","text":"","code":"# Get parents of join_keys --- jk <- default_cdisc_join_keys[\"ADEX\"] parents(jk) #> $ADEX #> [1] \"ADSL\" #> # Get parents of join_keys inside teal_data object --- td <- teal_data( ADSL = rADSL, ADTTE = rADTTE, ADRS = rADRS, join_keys = default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ) parents(td) #> $ADTTE #> [1] \"ADSL\" #> #> $ADRS #> [1] \"ADSL\" #> # Assignment of parents --- jk <- join_keys( join_key(\"ds1\", \"ds2\", \"id\"), join_key(\"ds5\", \"ds6\", \"id\"), join_key(\"ds7\", \"ds6\", \"id\") ) parents(jk) <- list(ds2 = \"ds1\") # Setting individual parent-child relationship parents(jk)[\"ds6\"] <- \"ds5\" parents(jk)[\"ds7\"] <- \"ds6\" # Assignment of parents of join_keys inside teal_data object --- parents(td) <- list(\"ADTTE\" = \"ADSL\") # replace existing parents(td)[\"ADRS\"] <- \"ADSL\" # add new parent # Get individual parent --- parent(jk, \"ds2\") #> [1] \"ds1\" parent(td, \"ADTTE\") #> [1] \"ADSL\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random adverse events — rADAE","title":"Random adverse events — rADAE","text":"Random adverse events","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random adverse events — rADAE","text":"","code":"rADAE"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random adverse events — rADAE","text":"object class tbl_df (inherits tbl, data.frame) 1934 rows 92 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random adverse events — rADAE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":null,"dir":"Reference","previous_headings":"","what":"Random concomitant medications — rADCM","title":"Random concomitant medications — rADCM","text":"Random concomitant medications","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random concomitant medications — rADCM","text":"","code":"rADCM"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random concomitant medications — rADCM","text":"object class tbl_df (inherits tbl, data.frame) 3685 rows 83 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random concomitant medications — rADCM","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADEX","title":"Random response — rADEX","text":"Random exposure.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADEX","text":"","code":"rADEX"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADEX","text":"object class tbl_df (inherits tbl, data.frame) 6400 rows 79 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADEX","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":null,"dir":"Reference","previous_headings":"","what":"Random lab analysis — rADLB","title":"Random lab analysis — rADLB","text":"Random lab analysis","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random lab analysis — rADLB","text":"","code":"rADLB"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random lab analysis — rADLB","text":"object class tbl_df (inherits tbl, data.frame) 8400 rows 102 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random lab analysis — rADLB","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADRS","title":"Random response — rADRS","text":"Random response","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADRS","text":"","code":"rADRS"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADRS","text":"object class tbl_df (inherits tbl, data.frame) 3200 rows 65 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADRS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":null,"dir":"Reference","previous_headings":"","what":"Random patient listing — rADSL","title":"Random patient listing — rADSL","text":"Random patient listing","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random patient listing — rADSL","text":"","code":"rADSL"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random patient listing — rADSL","text":"object class tbl_df (inherits tbl, data.frame) 400 rows 55 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random patient listing — rADSL","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADTR — rADTR","title":"Random data rADTR — rADTR","text":"Random data rADTR","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADTR — rADTR","text":"","code":"rADTR"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADTR — rADTR","text":"object class data.frame 2800 rows 76 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADTR — rADTR","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random time to event analysis dataset — rADTTE","title":"Random time to event analysis dataset — rADTTE","text":"Random time event analysis dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random time to event analysis dataset — rADTTE","text":"","code":"rADTTE"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random time to event analysis dataset — rADTTE","text":"object class tbl_df (inherits tbl, data.frame) 2000 rows 67 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random time to event analysis dataset — rADTTE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADVS — rADVS","title":"Random data rADVS — rADVS","text":"Random data rADVS","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADVS — rADVS","text":"","code":"rADVS"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADVS — rADVS","text":"object class tbl_df (inherits tbl, data.frame) 16800 rows 87 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADVS — rADVS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Show teal_data object — show,teal_data-method","title":"Show teal_data object — show,teal_data-method","text":"Prints teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show teal_data object — show,teal_data-method","text":"","code":"# S4 method for class 'teal_data' show(object)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show teal_data object — show,teal_data-method","text":"object (teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show teal_data object — show,teal_data-method","text":"Input teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show teal_data object — show,teal_data-method","text":"","code":"teal_data() #> ✅︎ verified teal_data object #> [L] #> Parent: teal_data(x = iris, code = \"x = iris\") #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L] verify(teal_data(x = iris, code = \"x = iris\")) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal.data-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal.data: Reproducible data model for teal applications — teal.data-package","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"package extends teal applications module stores data relationships (keys) reproducible code. Package offers also load data files, databases easily extendable another data sources.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal.data-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID) Authors: Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com (ORCID) Marcin Kosinski marcin.kosinski.mk1@roche.com Andre Verissimo andre.verissimo@roche.com (ORCID) Pawel Rucki pawel.rucki@roche.com Mahmoud Hallal mahmoud.hallal@roche.com Nikolas Burkoff Maciej Nasinski Konrad Pagacz Junlue Zhao contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproducible data — teal_data-class","title":"Reproducible data — teal_data-class","text":"Reproducible data container class. Inherits code tracking behavior teal.code::qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reproducible data — teal_data-class","text":"class provides isolated environment store process data code recorded. environment, code, data set names, data joining keys stored respective slots. slots never accessed directly, use provided get/set functions. code evaluated teal_data, messages warnings stored respective slots. errors raised, qenv.error object returned.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Reproducible data — teal_data-class","text":"env (environment) environment containing data sets possibly auxiliary variables. Access variables get_var() [[[]. setter provided. Evaluate code add variables @env. code (character) vector representing code necessary reproduce contents @env. Access get_code(). setter provided. Evaluate code append code slot. id (integer) random identifier assigned element @code. Used internally. warnings (character) vector warnings raised evaluating code. Access get_warnings(). messages (character) vector messages raised evaluating code. join_keys (join_keys) object specifying joining keys data sets @env. Access modify join_keys(). datanames (character) vector names data sets @env. Used internally distinguish auxiliary variables. Access modify datanames(). verified (logical(1)) flag signifying code @code proven yield contents @env. Used internally. See verify() details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Comprehensive data integration function for teal applications — teal_data","title":"Comprehensive data integration function for teal applications — teal_data","text":"Universal function pass data teal application.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(..., join_keys = teal.data::join_keys(), code = character(0), check)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comprehensive data integration function for teal applications — teal_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty joins pairs objects. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comprehensive data integration function for teal applications — teal_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(x1 = iris, x2 = mtcars) #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] #> • x2: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological graph sort — topological_sort","title":"Topological graph sort — topological_sort","text":"Graph list node contains vector child nodes returned list, parents appear children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological graph sort — topological_sort","text":"","code":"topological_sort(graph)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological graph sort — topological_sort","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Topological graph sort — topological_sort","text":"Implementation Kahn algorithm modification maintain order input elements.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Updates the keys of the datasets based on the parents — update_keys_given_parents","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"Updates keys datasets based parents","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"","code":"update_keys_given_parents(x)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"x (join_keys) object update keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"(self) invisibly chaining","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify code reproducibility — verify","title":"Verify code reproducibility — verify","text":"Checks whether code teal_data object reproduces stored objects.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify code reproducibility — verify","text":"","code":"verify(x)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify code reproducibility — verify","text":"x teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify code reproducibility — verify","text":"Input teal_data object error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Verify code reproducibility — verify","text":"objects created code @code slot x all_equal contents @env slot, function updates @verified slot TRUE returned teal_data object. verified, slot always set TRUE. @code fails recreate objects teal_data@env, error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Verify code reproducibility — verify","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) verify(tdata1) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") verify(tdata2) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] verify(tdata2)@verified #> [1] TRUE tdata2@verified #> [1] FALSE tdata3 <- teal_data() tdata3 <- within(tdata3, { stop(\"error\") }) try(verify(tdata3)) # fails #> Error : error #> when evaluating qenv code: #> stop(\"error\") a <- 1 b <- a + 2 c <- list(x = 2) d <- 5 tdata4 <- teal_data( a = a, b = b, c = c, d = d, code = \"a <- 1 b <- a c <- list(x = 2) e <- 1\" ) tdata4 #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] #> • d: [L] if (FALSE) { # \\dontrun{ verify(tdata4) # fails } # }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"breaking-changes-0-6-0-9013","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.6.0.9013","text":"soft deprecate datanames argument get_code(). Use names instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-6-0-9013","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0.9013","text":"join_keys provided, datanames() now sorted topological way (Kahn algorithm), means parent dataset always precedes child dataset. extended parent dataset name, one child dataset exist datanames() connection child-parent set join_keys parent exist teal_data environment. allow set dataset name exist teal_data environment. teal_data longer set default datanames() based join_keys names - uses data names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-6-0-9013","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.6.0.9013","text":"get_code longer adds warning message failed verification.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-060","dir":"Changelog","previous_headings":"","what":"teal.data 0.6.0","title":"teal.data 0.6.0","text":"CRAN release: 2024-04-30","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-6-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0","text":"col_relabel supports NA remove labels (similar col_labels<-).","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"bug-fixes-0-6-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.6.0","text":"Fixed bug get_code causing incorrect lines order returned code. Fixed bug col_labels causing incorrect label names returned input data contains named label attributes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-050","dir":"Changelog","previous_headings":"","what":"teal.data 0.5.0","title":"teal.data 0.5.0","text":"CRAN release: 2024-02-13","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"bug-fixes-0-5-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.5.0","text":"Fix get_code_dependency bug detect usage objects functions left right-hand sides code reproducibility. Remove duplicate entries code_graph.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-5-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.5.0","text":"Extended get_code.teal_data() possibility steer internal methods ... parameter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-040","dir":"Changelog","previous_headings":"","what":"teal.data 0.4.0","title":"teal.data 0.4.0","text":"CRAN release: 2024-01-31","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-4-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.4.0","text":"Simplified join_key better support primary keys. JoinKey R6 object removed favor list-like object class name join_keys. Subset operators assignments supported ([, [[, [<- [[<-) join_keys function works constructor, getter setter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.4.0","text":"teal_data() cdisc_data() return now teal_data class object replaces TealData class object. teal_data becomes standard input entire teal framework. TealDataset, TealDatasetConnector TealDataConnector classes removed. Delayed-data-loading longer supported teal.data. called connectors now supported teal package (see ?teal::teal_data_module). join_keys() join_key() return now join_keys object replace JoinKeys class.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-4-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.4.0","text":"Specified minimal version package dependencies. Upgraded teal.code dependency Imports Depends. Deprecated get_labels function removed supporting function data_label.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-3-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.3.0","text":"Removed scda package dependency examples. Added col_labels function removed formatters dependency.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-3-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.3.0","text":"Update installation instructions.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-2-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.2.0","text":"Added ADQLQC, ADCSSRS, ADEQ5D5L supported data sets. Improved error message get_cdisc_keys. Examples now use scda.2022 instead scda.2021. Fixed help files TealDataset MAETealDataset. Added backstop missing reticulate package teal.data Python vignette.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-2-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.2.0","text":"Modified teal.Dataset$print method less cluttered output. Transferred data hashing step TealDataset MAETealDataset teal. Removed CDISCTealData class updated TealData account removed functionality. Added datasets parents information JoinKeys class. Updated cdisc_data teal_data wrappers handle join_keys creation updating instead CDISCTealData TealData. Removed join_keys methods TealDataset, TealDatasetConnector.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-1-2","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.1.2","text":"Updated vignettes README content.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-1-2","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.2","text":"Exported validate_metadata function. Replaced argument name archive_name comply latest version synthetic_cdisc_dataset function. Replaced use scda random.cdisc.data","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"bug-fixes-0-1-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.1.2","text":"Fixed get_raw_data examples.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-1-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.1","text":"Added template pkgdown site. Removed usage .Globalenv Python code execution. Updated package authors. Added package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-010","dir":"Changelog","previous_headings":"","what":"teal.data 0.1.0","title":"teal.data 0.1.0","text":"Initial release teal.data package data model used teal applications.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"New features","title":"teal.data 0.1.0","text":"Added metadata field TealDataset store named list metadata items. available module developers FilteredData$get_metadata(\"<>\") can pulled added directly datasets derived TealDatasetConnectors.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"breaking-changes-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Breaking changes","title":"teal.data 0.1.0","text":"get_key_duplicates returns data.frame instead tibble. get_call() function CallableFunction now returns call namespace included. MultiAssayExperiment SummarizedExperiment now suggested packages, required. Objects dependent MultiAssayExperiment changed lazy-load now suggested packages. Minor changes interface TealDataset, example active fields replaced explicit “get” calls.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Miscellaneous","title":"teal.data 0.1.0","text":"reticulate Suggests, added requireNamespace call whenever needed. dplyr moved imports suggests. Removed redundant calling JoinKeys$mutate method inside -loops. Removed rtables dependency package.","code":""}] +[{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.data/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Join Keys","text":"teal.data package provides way define primary keys dataset establish relationships datasets. dataset joining keys can characterized : Columns constituting primary key; Foreign/merge keys, analogous SQL foreign keys. Typically, application developer specifies keys manually. However, datasets following ADaM standard, teal.data can automatically assign keys using default_cdisc_join_keys object. Refer section “Joining Keys ADaM Datasets” details using object select specific datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"uses-of-join_keys-class-in-teal-applications","dir":"Articles","previous_headings":"Overview","what":"Uses of join_keys class in teal applications","title":"Join Keys","text":"primary function join_keys class teal applications facilitate seamless merging datasets using teal.transform. Additionally, plays role data filtering using Filter Panel teal application. filters applied (parent) dataset also applied children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"anatomy-of-join_keys","dir":"Articles","previous_headings":"","what":"Anatomy of join_keys","title":"Join Keys","text":"join_keys object contains information foreign/primary keys multiple datasets. key represented pair datasets (name reference) named character vector encodes column name mapping two datasets. addition, foreign key may also contain parent-child attribute used “Filter Panel” mentioned . new join keys can created empty object, defining initial set primary foreign keys. initial object can extended adding/modifying/removing keys establishing parent-child relationships datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join_keys----join-keys-constructor-getter-setter","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_keys(...): Join Keys Constructor / Getter / Setter","title":"Join Keys","text":"Convenient function used constructor getter join_keys objects. Getter used retrieve joining keys contained objects, teal_data object. Constructor used specify collection multiple individual keys (via join_key function described ).","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join_keydataset_1-dataset_2-key-parent-single-join-key-constructor","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_key(dataset_1, dataset_2, key, parent): Single Join Key Constructor","title":"Join Keys","text":"Specifies primary key relationship two datasets. dataset_1, dataset_2: names datasets (dataset_2 dataset_1 omitted, creates primary key); key: named character vector column name mapping datasets (unnamed vector assumes column names datasets ); directed (optional): flag indicates whether parent-child directed relationship dataset_2 dataset_1 (latter parent). Note join keys assumed symmetric, .e., join_key(\"ds1\", \"ds2\", c(\"ds1_col\" = \"ds2_col\")) establishes relationship “x” “y” vice versa. default, new joining key set dataset_1 parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"example-output","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"Example & Output","title":"Join Keys","text":"","code":"library(teal.data) jk <- join_keys( join_key(\"ds1\", keys = \"col_1\"), # ds1: [col_1] join_key(\"ds2\", keys = c(\"col_1\", \"col_2\")), # ds2: [col_1, col_2] join_key(\"ds3\", keys = c(\"col_1\", \"col_3\")), # ds3: [col_1, col_3] join_key(\"ds1\", \"ds2\", keys = \"col_1\"), # ds1 <-- ds2 join_key(\"ds1\", \"ds3\", keys = \"col_1\"), # ds1 <-- ds3 join_key(\"ds4\", \"ds5\", keys = c(\"col_4\" = \"col_5\"), directed = FALSE) # ds4 <--> ds5 ) # The parent-child relationships are created automatically (unless 'parent' parameter is \"none\") jk"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"accessing-and-modifying-keys","dir":"Articles","previous_headings":"","what":"Accessing and Modifying keys","title":"Join Keys","text":"subset operator 2 indices (x[, j]) used retrieve primary/foreign keys. indices must string denoting dataset name. Note symmetry keys ds4 ds5 relationship: 1 argument used operator return join_keys object filtered accordingly. Modifying adding key uses notation assignment operator <-. symmetric relationship created automatically, parent (default) dataset defined first index. Assigning NULL value delete relationship.","code":"# Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting foreign keys between \"ds4\" and \"ds5\" jk[\"ds4\", \"ds5\"] ## col_4 ## \"col_5\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" # Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting keys of \"ds1\" and \"ds2\" jk[c(\"ds1\", \"ds2\")] ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] # Adding a new ds5 <-- ds1 key jk[\"ds1\", \"ds5\"] <- \"a_column\" # Removing an existing key jk[\"ds4\", \"ds5\"] <- NULL"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"merging-join-keys","dir":"Articles","previous_headings":"","what":"Merging Join Keys","title":"Join Keys","text":"combining multiple joining keys achieved using c() generic function, generates symmetric valid join_keys object. encountering identical relationship pairs, operation retains last occurrence pair within specified argument order. added convenience, function also accommodates join_key_set objects created join_key function. objects can provided initial argument position needed.","code":"jk1 <- join_keys(join_key(\"ds1\", \"ds1\", \"col_1\")) jk2 <- join_keys(join_key(\"ds2\", \"ds2\", \"col_1\"), join_key(\"ds1\", \"ds2\", \"col_1\")) # Merging c(jk1, jk2) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1] ## --> ds1: [col_1] # Keeping last occurence c(jk1, jk2, join_keys(join_key(\"ds2\", \"ds2\", \"col_2\"), join_key(\"ds1\", \"ds2\", c(\"col_1\" = \"col_2\")))) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_2] ## ds2: [col_2] ## --> ds1: [col_1] # Merges join_key and join_key_set objects (from join_key function) c(jk1, join_key(\"ds3\", \"ds3\", \"col_3\")) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## ds3: [col_3]"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join-keys-relationships","dir":"Articles","previous_headings":"","what":"Join Keys Relationships","title":"Join Keys","text":"2 types relationships encoded joining keys described following sections. primary foreign keys created explicitly using constructor individual keys (join_key). Additionally, join_keys object infers implicit relationships two datasets share foreign keys parent dataset, . implicit relationships available just like another foreign key can used merge datasets, despite defined user.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"primary-key-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Primary Key with teal_data","title":"Join Keys","text":"using teal_data function, simplest method define join keys use join_keys argument. can specify column(s) dataset (together) uniquely identify rows dataset. can extend previous example define primary keys multiple datasets:","code":"library(teal.data) td_pk <- within( teal_data(), ds1 <- transform(iris, id = seq_len(nrow(iris))) ) datanames(td_pk) <- \"ds1\" join_keys(td_pk) <- join_keys(join_key(\"ds1\", keys = \"id\")) join_keys(td_pk) ## A join_keys object containing foreign keys between 1 datasets: ## ds1: [id] td_pk <- within( td_pk, { ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_pk) <- c(datanames(td_pk), \"ds2\", \"ds3\") join_keys(td_pk)[\"ds2\", \"ds2\"] <- c(\"V\", \"W\") join_keys(td_pk)[\"ds3\", \"ds3\"] <- c(\"V\", \"W\") join_keys(td_pk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [id] ## ds2: [V, W] ## ds3: [V, W]"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"foreign-keys-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Foreign Keys with teal_data","title":"Join Keys","text":"passing multiple datasets teal_data function, dataset relationships set using join_keys join_key functions, can used merge datasets together within teal apps. users familiar SQL database schema, relationships symmetric strict SQL foreign key relationships teal validate whether values defined foreign key columns present table. example:","code":"library(teal.data) td_fk <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_fk) <- c(\"ds1\", \"ds2\", \"ds3\") join_keys(td_fk) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")) ) join_keys(td_fk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [X] ## <-- ds2: [W] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## ds3: [V] ## --> ds2: [V]"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"implicit-relationships","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Implicit Relationships","title":"Join Keys","text":"Two datasets share common foreign keys parent dataset implicit relationship modeled accessible joining keys. special relationship inferred existing foreign keys. need explicitly defined can accessed overwritten just foreign key. implicit relationships can used merge 2 datasets together, just defined manually. Note definition contains join_key \"ds2\" <-> \"ds4\"","code":"library(teal.data) td <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) ds4 <- data.frame(V = 5:14, R = rnorm(10)) } ) datanames(td) <- c(\"ds1\", \"ds2\", \"ds3\", \"ds4\") join_keys(td) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), join_key(\"ds4\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")), join_key(\"ds1\", \"ds4\", c(\"X\" = \"B\")) ) join_keys(td) ## A join_keys object containing foreign keys between 4 datasets: ## ds1: [X] ## <-- ds2: [W] ## <-- ds4: [B] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## --* (implicit via parent with): ds4 ## ds3: [V] ## --> ds2: [V] ## ds4: [V] ## --> ds1: [X] ## --* (implicit via parent with): ds2 join_keys(td)[\"ds2\", \"ds4\"] ## W ## \"B\""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join-keys-in-adam-datasets","dir":"Articles","previous_headings":"","what":"Join Keys in ADaM Datasets","title":"Join Keys","text":"teal.data provides set default join keys (primary foreign) datasets named according ADaM standard. stored default_cdisc_join_keys. default keys required users can select smaller set datasets subsetting (example: default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\")]). Please note, every element selected, parent also returned (one) well pair-wise relationships resulting selection.","code":"names(default_cdisc_join_keys) |> sort() ## [1] \"ADAE\" \"ADAETTE\" \"ADCM\" \"ADCSSRS\" \"ADDV\" \"ADEG\" ## [7] \"ADEQ5D5L\" \"ADEX\" \"ADHY\" \"ADLB\" \"ADMH\" \"ADQLQC\" ## [13] \"ADQS\" \"ADRS\" \"ADSAFTTE\" \"ADSL\" \"ADSUB\" \"ADTTE\" ## [19] \"ADVS\" default_cdisc_join_keys ## A join_keys object containing foreign keys between 19 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADAE: [STUDYID, USUBJID] ## <-- ADEG: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADAETTE: [STUDYID, USUBJID] ## <-- ADCM: [STUDYID, USUBJID] ## <-- ADEX: [STUDYID, USUBJID] ## <-- ADLB: [STUDYID, USUBJID] ## <-- ADMH: [STUDYID, USUBJID] ## <-- ADQS: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## <-- ADSAFTTE: [STUDYID, USUBJID] ## <-- ADVS: [STUDYID, USUBJID] ## <-- ADDV: [STUDYID, USUBJID] ## <-- ADSUB: [STUDYID, USUBJID] ## <-- ADHY: [STUDYID, USUBJID] ## <-- ADQLQC: [STUDYID, USUBJID] ## <-- ADCSSRS: [STUDYID, USUBJID] ## <-- ADEQ5D5L: [STUDYID, USUBJID] ## ADAE: [STUDYID, USUBJID, ASTDTM, AETERM, AESEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEG: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADAETTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADCM: [STUDYID, USUBJID, ASTDTM, CMSEQ, ATC1CD, ATC2CD, ATC3CD, ATC4CD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEX: [STUDYID, USUBJID, PARCAT1, PARAMCD, AVISITN, ASTDTM, EXSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADLB: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADMH: [STUDYID, USUBJID, ASTDTM, MHSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSAFTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADVS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADDV: [STUDYID, USUBJID, ASTDT, DVTERM, DVSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSUB: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADHY: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQLQC: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADCSSRS, ADEQ5D5L ## ADCSSRS: [STUDYID, USUBJID, PARAMCD, BASETYPE, AVISITN, DTYPE, ADTM] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADEQ5D5L ## ADEQ5D5L: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS default_cdisc_join_keys[\"ADSL\"] ## A join_keys object containing foreign keys between 1 datasets: ## ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[\"ADTTE\"] ## A join_keys object containing foreign keys between 2 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ## A join_keys object containing foreign keys between 3 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADRS ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADTTE"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"reproducibility-of-teal_data-objects","dir":"Articles","previous_headings":"","what":"Reproducibility of teal_data objects","title":"teal_data reproducibility","text":"Reproducibility primary function qenv class, teal_data inherits . Every data modification teal_data object performed encapsulated environment, separate global environment. important note reproducibility object limited data-code relationship. aspects reliability data source, reproducibility R session (including package versions), creation use objects environments (e.g. .GlobalEnv) verified properly teal_data. advisable always begin analysis new session run code pertains analysis within teal_data object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"verification-status","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification status","title":"teal_data reproducibility","text":"Every teal_data object verification status, statement whether contents env can reproduced code. perspective, teal_data objects instantiated empty verified ones instantiated data code unverified code need reproducible. Obviously, teal_data objects instantiated data unverified well. evaluating code teal_data object, code stored code executed, reproducible definition. Therefore, evaluating code teal_data object change verification status. verification status always printed inspecting teal_data object. Also, retrieving code, unverified objects add warning code stating passed verification.","code":"library(teal.data) data_empty <- teal_data() data_empty # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: data_empty <- within(data_empty, i <- head(iris)) data_empty # remains verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- teal_data(i = head(iris), code = \"i <- head(iris)\") data_with_data # is unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- within(data_with_data, i$rand <- sample(nrow(i))) data_with_data # remains unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L]"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"verification-process","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification process","title":"teal_data reproducibility","text":"order confirm code stored teal_data exactly reproduces contents environment, one must run verify() function. causes code evaluated results compared contents environment. code executes without errors results contents already present environment, verification successful object’s state changed verified. Otherwise error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"verified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"verified","title":"teal_data reproducibility","text":"","code":"library(teal.data) data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) data_right <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) }) ) # is unverified (data_right_verified <- verify(data_right)) # returns verified object ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"unverified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"unverified","title":"teal_data reproducibility","text":"","code":"data_wrong <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) }) ) verify(data_wrong) # fails verification, raises error ## Error: Code verification failed. ## Object(s) recreated with code that have different structure in data_wrong: ## • data"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"retrieving-code","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Retrieving code","title":"teal_data reproducibility","text":"get_code function used retrieve code stored teal_data object. simple get_code() return entirety code using names argument allows obtaining subset code deals objects stored teal_data. Note retrieving code specific dataset, result code used create dataset, code uses .","code":"library(teal.data) data <- within(teal_data(), { i <- iris m <- mtcars head(i) }) cat(get_code(data)) # retrieve all code ## i <- iris ## m <- mtcars ## head(i) cat(get_code(data, names = \"i\")) # retrieve code for `i` ## i <- iris"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"tracking-object-dependencies","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Tracking object dependencies","title":"teal_data reproducibility","text":"Calling get_code datanames specified initiates analysis stored code, object dependencies automatically discovered. object x created expression uses object y, lines create object y must also returned. quite effective objects created simple assignments like x <- foo(y). However, rare cases discovering dependencies impossible, e.g. opening connections databases objects created side effects (functions acting calling environment implicitly rather returning value assigned). cases code author must manually tag code lines required dataset adding special comment lines: # @linksto x cause line included retrieving code x. See ?get_code detailed explanation examples.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Introduction to teal.data","text":"teal.data package specifies data format used teal applications. teal_data class inherits qenv meant used reproducibility purposes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"quick-start","dir":"Articles","previous_headings":"Introduction","what":"Quick Start","title":"Introduction to teal.data","text":"create object class teal_data, use teal_data function. teal_data number methods manage relevant information private class slots.","code":"library(teal.data) # create teal_data object my_data <- teal_data() # run code within teal_data to create data objects my_data <- within( my_data, { data1 <- data.frame(id = 1:10, x = 11:20) data2 <- data.frame(id = 1:10, x = 21:30) } ) # get objects stored in teal_data my_data[[\"data1\"]] my_data[[\"data1\"]] # get reproducible code get_code(my_data) # get or set datanames datanames(my_data) <- c(\"data1\", \"data2\") datanames(my_data) # print print(my_data)"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"teal_data-characteristics","dir":"Articles","previous_headings":"Introduction","what":"teal_data characteristics","title":"Introduction to teal.data","text":"teal_data object keeps following information: env - environment containing data. code - string containing code reproduce env (details reproducibility). datanames - character vector listing objects interest teal modules (details teal vignette). join_keys - join_keys object defining relationships datasets (details Join Keys).","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"reproducibility","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Reproducibility","title":"Introduction to teal.data","text":"primary function teal_data provide reproducibility data. recommend initialize empty teal_data, marks object verified, create datasets evaluating code object, using within eval_code. Read teal_data Reproducibility.","code":"my_data <- teal_data() my_data <- within(my_data, data <- data.frame(x = 11:20)) my_data <- within(my_data, data$id <- seq_len(nrow(data))) my_data # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"relational-data-models","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Relational data models","title":"Introduction to teal.data","text":"teal_data class supports relational data. Relationships datasets can described joining keys stored teal_data object. relationships can read set join_keys function. See join_keys.","code":"my_data <- teal_data() my_data <- within(my_data, { data <- data.frame(id = 1:10, x = 11:20) child <- data.frame(id = 1:20, data_id = c(1:10, 1:10), y = 21:30) }) join_keys(my_data) <- join_keys( join_key(\"data\", \"data\", key = \"id\"), join_key(\"child\", \"child\", key = \"id\"), join_key(\"child\", \"data\", key = c(\"data_id\" = \"id\")) ) join_keys(my_data) ## A join_keys object containing foreign keys between 2 datasets: ## child: [id] ## <-- data: [id] ## data: [id] ## --> child: [data_id]"},{"path":"https://insightsengineering.github.io/teal.data/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Aleksander Chlebowski. Author. Marcin Kosinski. Author. Andre Verissimo. Author. Pawel Rucki. Author. Mahmoud Hallal. Author. Nikolas Burkoff. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.data/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Chlebowski , Kosinski M, Verissimo , Rucki P, Hallal M, Burkoff N, Nasinski M, Pagacz K, Zhao J (2024). teal.data: Data Model 'teal' Applications. R package version 0.6.0.9014, https://github.com/insightsengineering/teal.data/, https://insightsengineering.github.io/teal.data/.","code":"@Manual{, title = {teal.data: Data Model for 'teal' Applications}, author = {Dawid Kaledkowski and Aleksander Chlebowski and Marcin Kosinski and Andre Verissimo and Pawel Rucki and Mahmoud Hallal and Nikolas Burkoff and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2024}, note = {R package version 0.6.0.9014, https://github.com/insightsengineering/teal.data/}, url = {https://insightsengineering.github.io/teal.data/}, }"},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"tealdata","dir":"","previous_headings":"","what":"Data Model for teal Applications","title":"Data Model for teal Applications","text":"package used create data needed teal applications. data can : Independent data frames CDISC data (clinical trial reporting) Relational data MultiAssayExperiment objects package provides: mechanism pulling data existing systems ability mutate (.e. pre-process) data record operations used create data enable reproducibility","code":""},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Data Model for teal Applications","text":"Alternatively, might want use development version.","code":"install.packages('teal.data') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.data\")"},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Data Model for teal Applications","text":"understand use package, please refer Introduction teal.data article, provides multiple examples code implementation. showcase example usage.","code":"library(teal.data) # quick start for clinical trial data my_data <- cdisc_data( ADSL = example_cdisc_data(\"ADSL\"), ADTTE = example_cdisc_data(\"ADTTE\"), code = quote({ ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) ) # or my_data <- within(teal_data(), { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) datanames <- c(\"ADSL\", \"ADTTE\") datanames(my_data) <- datanames join_keys(my_data) <- default_cdisc_join_keys[datanames] # quick start for general data my_general_data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) # reproducibility check data <- teal_data(iris = iris, code = \"iris <- mtcars\") verify(data) #> Error: Code verification failed. #> Object(s) recreated with code that have different structure in data: #> • iris # code extraction iris2_data <- within(teal_data(), {iris2 <- iris[1:6, ]}) get_code(iris2_data) #> \"iris2 <- iris[1:6, ]\""},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Data Model for teal Applications","text":"encounter bug feature request, please file issue. questions, discussions, staying date, please use teal channel pharmaverse slack workspace.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated TealData class and related functions — TealData","title":"Deprecated TealData class and related functions — TealData","text":"TealData class associated functions deprecated. Use teal_data() instead. See Migration guide details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated TealData class and related functions — TealData","text":"","code":"as_cdisc(...) callable_code(...) callable_function(...) code_dataset_connector(...) code_cdisc_dataset_connector(...) csv_dataset_connector(...) csv_cdisc_dataset_connector(...) python_code(...) python_dataset_connector(...) python_cdisc_dataset_connector(...) cdisc_data_connector(...) cdisc_dataset(...) cdisc_dataset_connector(...) cdisc_dataset_connector_file(...) cdisc_dataset_file(...) dataset(...) dataset_connector(...) dataset_connector_file(...) dataset_file(...) data_connection(...) fun_dataset_connector(...) fun_cdisc_dataset_connector(...) relational_data_connector(...) mae_dataset(...) get_attrs(...) get_dataset_label(...) get_dataset(...) get_datasets(...) get_dataname(...) get_key_duplicates(...) get_keys(...) get_raw_data(...) is_pulled(...) load_dataset(...) load_datasets(...) mutate_data(...) mutate_dataset(...) set_args(...) rds_dataset_connector(...) rds_cdisc_dataset_connector(...) script_dataset_connector(...) script_cdisc_dataset_connector(...) set_keys(...) read_script(...) to_relational_data(...) validate_metadata(...) get_cdisc_keys(...) cdisc_data_file(...) teal_data_file(...) get_join_keys(...) get_join_keys(...) <- value"},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated TealData class and related functions — TealData","text":"... argument supported TealData related functions. value value assign","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deprecated TealData class and related functions — TealData","text":"nothing","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Test if two objects are (nearly) equal — all.equal.join_keys","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":".equal(target, current) utility compare join_keys objects target current testing near equality.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"","code":"# S3 method for class 'equal.join_keys' all(target, current, ...)"},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"target R object. current R object, compared target. ... arguments different methods. used join_keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"different, comparison still made extent, report differences returned. use .equal directly expressions—either use isTRUE(.equal(....)) identical appropriate. parents attribute comparison tolerates NULL empty lists find difference. list containing relationships treated like map ignores entries NULL exist.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Compatibility of keys — assert_compatible_keys","title":"Check Compatibility of keys — assert_compatible_keys","text":"Helper function assert two key sets contain incompatible keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Compatibility of keys — assert_compatible_keys","text":"","code":"assert_compatible_keys(join_key_1, join_key_2)"},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Compatibility of keys — assert_compatible_keys","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys2.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify key set compatibility — assert_compatible_keys2","title":"Verify key set compatibility — assert_compatible_keys2","text":"Helper function ensuring compatibility two sets keys","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify key set compatibility — assert_compatible_keys2","text":"","code":"assert_compatible_keys2(x, y)"},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify key set compatibility — assert_compatible_keys2","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate parent-child key — assert_parent_child","title":"Validate parent-child key — assert_parent_child","text":"Helper function checks parent-child relations valid.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate parent-child key — assert_parent_child","text":"","code":"assert_parent_child(x)"},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate parent-child key — assert_parent_child","text":"x (join_keys) object assert validity relations","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate parent-child key — assert_parent_child","text":"join_keys invisibly","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data input for teal app — cdisc_data","title":"Data input for teal app — cdisc_data","text":"Function wrapper around teal_data() guesses join_keys given datasets whose names match ADAM datasets names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data input for teal app — cdisc_data","text":"","code":"cdisc_data( ..., join_keys = teal.data::default_cdisc_join_keys[names(rlang::list2(...))], code = character(0), check )"},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data input for teal app — cdisc_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty automatically derived basing intersection datasets primary keys. ADAM datasets automatically derived. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data input for teal app — cdisc_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data input for teal app — cdisc_data","text":"function checks keys added data sets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data input for teal app — cdisc_data","text":"","code":"data <- cdisc_data( join_keys = join_keys( join_key(\"ADSL\", \"ADTTE\", c(\"STUDYID\" = \"STUDYID\", \"USUBJID\" = \"USUBJID\")) ) ) data <- within(data, { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") })"},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Variable labels — col_labels","title":"Variable labels — col_labels","text":"Get set variable labels data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variable labels — col_labels","text":"","code":"col_labels(x, fill = FALSE) col_labels(x) <- value col_relabel(x, ...) get_labels(...)"},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Variable labels — col_labels","text":"functions taken formatters package, reduce complexity dependency tree rewritten.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Variable labels — col_labels","text":"x (data.frame DataFrame) data object fill (logical(1)) specifying return variable label value (character) vector variable labels length equal number columns x; named, names must match variable names x used key set labels; use NA remove label variable ... name-value pairs, name corresponds variable name x value new variable label; use NA remove label variable","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Variable labels — col_labels","text":"col_labels, named character vector variable labels, names corresponding variable names. label attribute missing, vector elements variable names fill = TRUE NA fill = FALSE. col_labels<- col_relabel, copy x variable labels modified.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Variable labels — col_labels","text":"Variable labels can stored label attribute set individual variables. functions get set attribute, either (col_labels) variables (col_relabel). previous versions teal.data labels managed get_labels(). function deprecated 0.4.0, use col_labels instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Variable labels — col_labels","text":"","code":"x <- iris col_labels(x) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> NA NA NA NA NA col_labels(x) <- paste(\"label for\", names(iris)) col_labels(x) #> Sepal.Length Sepal.Width Petal.Length #> \"label for Sepal.Length\" \"label for Sepal.Width\" \"label for Petal.Length\" #> Petal.Width Species #> \"label for Petal.Width\" \"label for Species\" y <- col_relabel(x, Sepal.Length = \"Sepal Length of iris flower\") col_labels(y) #> Sepal.Length Sepal.Width #> \"Sepal Length of iris flower\" \"label for Sepal.Width\" #> Petal.Length Petal.Width #> \"label for Petal.Length\" \"label for Petal.Width\" #> Species #> \"label for Species\""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Names of data sets in teal_data object — datanames","title":"Names of data sets in teal_data object — datanames","text":"Get set value datanames slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Names of data sets in teal_data object — datanames","text":"","code":"datanames(x) datanames(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Names of data sets in teal_data object — datanames","text":"x (teal_data) object access modify value (character) new value @datanames; elements must names variables existing @env","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Names of data sets in teal_data object — datanames","text":"contents @datanames teal_data object updated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Names of data sets in teal_data object — datanames","text":"@datanames slot teal_data object specifies variables stored environment (@env slot) data sets taken consideration. contents @datanames can specified upon creation default variables @env. Variables created later, may well data sets, automatically considered . Use function update slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Names of data sets in teal_data object — datanames","text":"","code":"td <- teal_data(iris = iris) td <- within(td, mtcars <- mtcars) datanames(td) #> [1] \"iris\" datanames(td) <- c(\"iris\", \"mtcars\") datanames(td) #> [1] \"iris\" \"mtcars\""},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"data object created loading time cdisc_datasets/cdisc_datasets.yaml.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"","code":"default_cdisc_join_keys"},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"object class join_keys (inherits list) length 19.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sample CDISC datasets — example_cdisc_data","title":"Generate sample CDISC datasets — example_cdisc_data","text":"Retrieves example CDISC datasets use examples testing.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sample CDISC datasets — example_cdisc_data","text":"","code":"example_cdisc_data( dataname = c(\"ADSL\", \"ADAE\", \"ADLB\", \"ADCM\", \"ADEX\", \"ADRS\", \"ADTR\", \"ADTTE\", \"ADVS\") )"},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sample CDISC datasets — example_cdisc_data","text":"dataname (character(1)) name CDISC dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sample CDISC datasets — example_cdisc_data","text":"CDISC dataset data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate sample CDISC datasets — example_cdisc_data","text":"function returns dummy dataset used within teal.data. Note datasets created maintained teal.data, retrieved dependencies.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code from teal_data object — get_code,teal_data-method","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"# S4 method for class 'teal_data' get_code( object, deparse = TRUE, names = NULL, datanames = lifecycle::deprecated(), ... )"},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code from teal_data object — get_code,teal_data-method","text":"object (teal_data) deparse (logical) flag specifying whether return code character (deparse = TRUE) expression (deparse = FALSE). names (character) Successor datanames. Vector dataset names return code . details see \"Extracting dataset-specific code\" section. datanames (character) vector dataset names return code . details see \"Extracting dataset-specific code\" section. Use names instead. ... Parameters passed internal methods. Currently, supported parameter check_names (logical(1)) flag, TRUE default. Function warns missing objects, exist code passed datanames. remove warning, set check_names = FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code from teal_data object — get_code,teal_data-method","text":"Either character string expression. names used request specific dataset, code creates dataset (code uses ) returned. Otherwise, contents @code.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code stored @code, (principle) can used recreate objects found @env. Use names limit code one datasets enumerated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"extracting-dataset-specific-code","dir":"Reference","previous_headings":"","what":"Extracting dataset-specific code","title":"Get code from teal_data object — get_code,teal_data-method","text":"names specified, code returned limited lines needed create requested datasets. code stored @code slot analyzed statically determine lines datasets interest depend upon. analysis works well objects created standard infix assignment operators (see ?assignOps) can fail situations. Consider following examples: Case 1: Usual assignments. x dependencies, get_code(data, names = \"x\") return second call.y depends x foo, get_code(data, names = \"y\") contain three calls. Case 2: objects created function's side effects. , y depends x x modified foo side effect (reassignment) get_code(data, names = \"y\") return foo() call. overcome limitation, code dependencies can specified manually. Lines side effects occur can flagged adding \"# @linksto \" end. Note within evaluates code passed expr comments ignored. order include comments code one must use eval_code function instead. Now foo() call properly included code required recreate y. Note two functions create objects side effects, assign data, handled automatically. known cases manual tagging necessary: non-standard assignment operators, e.g. %<>% objects used conditions statements: () objects used iterate loops: () creating evaluating language objects, e.g. eval()","code":"data <- teal_data() |> within({ foo <- function(x) { x + 1 } x <- 0 y <- foo(x) }) get_code(data, names = \"y\") data <- teal_data() |> within({ foo <- function() { x <<- x + 1 } x <- 0 foo() y <- x }) get_code(data, names = \"y\") data <- teal_data() |> eval_code(\" foo <- function() { x <<- x + 1 } x <- 0 foo() # @linksto x y <- x \") get_code(data, names = \"y\")"},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) get_code(tdata1) #> [1] \"a <- 1\\nb <- a^5\\nc <- list(x = 2)\" get_code(tdata1, names = \"a\") #> [1] \"a <- 1\" get_code(tdata1, names = \"b\") #> [1] \"a <- 1\\nb <- a^5\" tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") get_code(tdata2) #> [1] \"x1 <- iris\" get_code(verify(tdata2)) #> [1] \"x1 <- iris\""},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"Checks whether graph Directed Acyclic Graph (DAG)","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"","code":"is_dag(graph)"},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"logical(1) TRUE graph DAG; FALSE otherwise","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a relationship between a pair of datasets — join_key","title":"Create a relationship between a pair of datasets — join_key","text":"Create relationship two datasets, dataset_1 dataset_2. default, function establishes directed relationship dataset_1 parent. dataset_2 specified, function creates primary key dataset_1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(dataset_1, dataset_2 = dataset_1, keys, directed = TRUE)"},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a relationship between a pair of datasets — join_key","text":"dataset_1, dataset_2 (character(1)) Dataset names. dataset_2 omitted, primary key dataset_1 created. keys (optionally named character) Column mapping datasets, names(keys) maps columns dataset_1 corresponding columns dataset_2 given elements keys. unnamed, column names used datasets. element keys vector empty non-empty name, name used datasets. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a relationship between a pair of datasets — join_key","text":"object class join_key_set passed join_keys function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(\"d1\", \"d2\", c(\"A\")) #> $d1 #> $d1$d2 #> A #> \"A\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\")) #> $d1 #> $d1$d2 #> A #> \"B\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\", \"C\")) #> $d1 #> $d1$d2 #> A C #> \"B\" \"C\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #>"},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage relationships between datasets using join_keys — join_keys","title":"Manage relationships between datasets using join_keys — join_keys","text":"Facilitates creation retrieval relationships datasets. join_keys class extends list contains keys connecting pairs datasets. element list contains keys specific dataset. dataset can relationship (primary key) datasets. Note join_keys list symmetrical assumes default direction, : keys set ds1 ds2, defines ds1 parent parent-child relationship mapping automatically mirrored ds2 ds1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"## Constructor, getter and setter join_keys(...) # Default S3 method join_keys(...) # S3 method for class 'join_keys' join_keys(...) # S3 method for class 'teal_data' join_keys(...) # S3 method for class 'join_keys' x[i, j] # S3 method for class 'join_keys' x[i, j, directed = TRUE] <- value # S3 method for class 'join_keys' c(...) # S3 method for class 'join_key_set' c(...) join_keys(x) <- value # S3 method for class 'join_keys' join_keys(x) <- value # S3 method for class 'teal_data' join_keys(x) <- value # S3 method for class 'join_keys' format(x, ...) # S3 method for class 'join_keys' print(x, ...)"},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage relationships between datasets using join_keys — join_keys","text":"... optional, either teal_data join_keys object extract join_keys number join_key_set objects create join_keys nothing create empty join_keys x (join_keys) empty object set new relationship pairs. x typically object join_keys class. called join_keys(x) join_keys(x) <- value can also take supported class (teal_data, join_keys) , j indices specifying elements extract replace. Index character vector, can also take numeric, logical, NULL missing. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected. value x[, j, directed = TRUE)] <- value (named/unnamed character) Column mapping datasets. join_keys(x) <- value: (join_key_set list join_key_set) relationship pairs add join_keys list. [, j, directed = TRUE)]: R:,%20j,%20directed%20=%20TRUE)","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys(): Returns empty join_keys object called without arguments. join_keys(join_keys): Returns . join_keys(teal_data): Returns join_keys object contained teal_data object. join_keys(...): Creates new object one join_key_set parameters.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Manage relationships between datasets using join_keys — join_keys","text":"x[datanames]: Returns subset join_keys object given datanames, including parent datanames symmetric mirror keys datanames result. x[, j]: Returns join keys datasets j, including implicit keys inferred relationship parent. x[, j] <- value: Assignment key pair (, j). x[] <- value: (without j parameter) supported operation join_keys. join_keys(x)[, j] <- value: Assignment join_keys object stored x, teal_data object join_keys object . join_keys(x) <- value: Assignment join_keys object value. value needs object class join_keys join_key_set.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"# Creating a new join keys ---- jk <- join_keys( join_key(\"ds1\", \"ds1\", \"pk1\"), join_key(\"ds2\", \"ds2\", \"pk2\"), join_key(\"ds3\", \"ds3\", \"pk3\"), join_key(\"ds1\", \"ds2\", c(pk1 = \"pk2\")), join_key(\"ds1\", \"ds3\", c(pk1 = \"pk3\")) ) jk #> A join_keys object containing foreign keys between 3 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> <-- ds3: [pk3] #> ds2: [pk2] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3 #> ds3: [pk3] #> --> ds1: [pk1] #> --* (implicit via parent with): ds2 # Getter for join_keys --- jk[\"ds1\", \"ds2\"] #> pk1 #> \"pk2\" # Subsetting join_keys ---- jk[\"ds1\"] #> A join_keys object containing foreign keys between 1 datasets: #> ds1: [pk1] jk[1:2] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] jk[c(\"ds1\", \"ds2\")] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] # Setting a new primary key --- jk[\"ds4\", \"ds4\"] <- \"pk4\" jk[\"ds5\", \"ds5\"] <- \"pk5\" # Setting a single relationship pair --- jk[\"ds1\", \"ds4\"] <- c(\"pk1\" = \"pk4\") # Removing a key --- jk[\"ds5\", \"ds5\"] <- NULL # Merging multiple `join_keys` objects --- jk_merged <- c( jk, join_keys( join_key(\"ds4\", keys = c(\"pk4\", \"pk4_2\")), join_key(\"ds3\", \"ds4\", c(pk3 = \"pk4_2\")) ) ) # note: merge can be performed with both join_keys and join_key_set jk_merged <- c( jk_merged, join_key(\"ds5\", keys = \"pk5\"), join_key(\"ds1\", \"ds5\", c(pk1 = \"pk5\")) ) # Assigning keys via join_keys(x)[i, j] <- value ---- obj <- join_keys() # or obj <- teal_data() join_keys(obj)[\"ds1\", \"ds1\"] <- \"pk1\" join_keys(obj)[\"ds2\", \"ds2\"] <- \"pk2\" join_keys(obj)[\"ds3\", \"ds3\"] <- \"pk3\" join_keys(obj)[\"ds1\", \"ds2\"] <- c(pk1 = \"pk2\") join_keys(obj)[\"ds1\", \"ds3\"] <- c(pk1 = \"pk3\") identical(jk, join_keys(obj)) #> [1] FALSE # Setter for join_keys within teal_data ---- td <- teal_data() join_keys(td) <- jk join_keys(td)[\"ds1\", \"ds2\"] <- \"new_key\" join_keys(td) <- c(join_keys(td), join_keys(join_key(\"ds3\", \"ds2\", \"key3\"))) join_keys(td) #> A join_keys object containing foreign keys between 4 datasets: #> ds1: [pk1] #> <-> ds2: [new_key] #> <-- ds3: [pk3] #> <-- ds4: [pk4] #> ds3: [pk3] #> --> ds1: [pk1] #> <-- ds2: [key3] #> --* (implicit via parent with): ds4 #> ds2: [pk2] #> <-> ds1: [new_key] #> --> ds3: [key3] #> ds4: [pk4] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3"},{"path":"https://insightsengineering.github.io/teal.data/reference/names-set-.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"The names of a join_keys object — names<-.join_keys","title":"The names of a join_keys object — names<-.join_keys","text":"names join_keys object","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/names-set-.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The names of a join_keys object — names<-.join_keys","text":"","code":"# S3 method for class 'join_keys' names(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/reference/names-set-.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The names of a join_keys object — names<-.join_keys","text":"x R object. value character vector length x, NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal constructor — new_join_keys","title":"Internal constructor — new_join_keys","text":"Internal constructor","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal constructor — new_join_keys","text":"","code":"new_join_keys()"},{"path":"https://insightsengineering.github.io/teal.data/reference/new_join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Internal constructor — new_join_keys","text":"empty join_keys list","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize teal_data object — new_teal_data","title":"Initialize teal_data object — new_teal_data","text":"Initialize teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize teal_data object — new_teal_data","text":"","code":"new_teal_data( data, code = character(0), join_keys = join_keys(), datanames = names(data) )"},{"path":"https://insightsengineering.github.io/teal.data/reference/new_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize teal_data object — new_teal_data","text":"data (named list) data objects. code (character language) code reproduce data. Accepts stores comments also. join_keys (join_keys) object datanames (character) names datasets passed data. Needed non-dataset objects needed env slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Get and set parents in join_keys object — parents","title":"Get and set parents in join_keys object — parents","text":"parents() facilitates creation dependencies datasets assigning parent-child relationship.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get and set parents in join_keys object — parents","text":"","code":"parents(x) # S3 method for class 'join_keys' parents(x) # S3 method for class 'teal_data' parents(x) parents(x) <- value # S3 method for class 'join_keys' parents(x) <- value # S3 method for class 'teal_data' parents(x) <- value parent(x, dataset_name)"},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get and set parents in join_keys object — parents","text":"x (join_keys teal_data) object contains \"parents\" information retrieve manipulate. value (named list) character vectors. dataset_name (character(1)) Name dataset query parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get and set parents in join_keys object — parents","text":"list character representing parents. parent(x, dataset_name) returns NULL parent exist.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get and set parents in join_keys object — parents","text":"element defined list element, list(\"child\" = \"parent\").","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Get and set parents in join_keys object — parents","text":"parents(join_keys): Retrieves parents join_keys object. parents(teal_data): Retrieves parents join_keys inside teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Get and set parents in join_keys object — parents","text":"parents(x) <- value: Assignment parents join_keys object. parents(join_keys) <- value: Assignment parents join_keys object. parents(teal_data) <- value: Assignment parents join_keys inside teal_data object. parent(): Getter individual parent.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get and set parents in join_keys object — parents","text":"","code":"# Get parents of join_keys --- jk <- default_cdisc_join_keys[\"ADEX\"] parents(jk) #> $ADEX #> [1] \"ADSL\" #> # Get parents of join_keys inside teal_data object --- td <- teal_data( ADSL = rADSL, ADTTE = rADTTE, ADRS = rADRS, join_keys = default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ) parents(td) #> $ADTTE #> [1] \"ADSL\" #> #> $ADRS #> [1] \"ADSL\" #> # Assignment of parents --- jk <- join_keys( join_key(\"ds1\", \"ds2\", \"id\"), join_key(\"ds5\", \"ds6\", \"id\"), join_key(\"ds7\", \"ds6\", \"id\") ) parents(jk) <- list(ds2 = \"ds1\") # Setting individual parent-child relationship parents(jk)[\"ds6\"] <- \"ds5\" parents(jk)[\"ds7\"] <- \"ds6\" # Assignment of parents of join_keys inside teal_data object --- parents(td) <- list(\"ADTTE\" = \"ADSL\") # replace existing parents(td)[\"ADRS\"] <- \"ADSL\" # add new parent # Get individual parent --- parent(jk, \"ds2\") #> [1] \"ds1\" parent(td, \"ADTTE\") #> [1] \"ADSL\""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random adverse events — rADAE","title":"Random adverse events — rADAE","text":"Random adverse events","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random adverse events — rADAE","text":"","code":"rADAE"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random adverse events — rADAE","text":"object class tbl_df (inherits tbl, data.frame) 1934 rows 92 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random adverse events — rADAE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":null,"dir":"Reference","previous_headings":"","what":"Random concomitant medications — rADCM","title":"Random concomitant medications — rADCM","text":"Random concomitant medications","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random concomitant medications — rADCM","text":"","code":"rADCM"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random concomitant medications — rADCM","text":"object class tbl_df (inherits tbl, data.frame) 3685 rows 83 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random concomitant medications — rADCM","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADEX","title":"Random response — rADEX","text":"Random exposure.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADEX","text":"","code":"rADEX"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADEX","text":"object class tbl_df (inherits tbl, data.frame) 6400 rows 79 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADEX","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":null,"dir":"Reference","previous_headings":"","what":"Random lab analysis — rADLB","title":"Random lab analysis — rADLB","text":"Random lab analysis","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random lab analysis — rADLB","text":"","code":"rADLB"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random lab analysis — rADLB","text":"object class tbl_df (inherits tbl, data.frame) 8400 rows 102 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random lab analysis — rADLB","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADRS","title":"Random response — rADRS","text":"Random response","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADRS","text":"","code":"rADRS"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADRS","text":"object class tbl_df (inherits tbl, data.frame) 3200 rows 65 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADRS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":null,"dir":"Reference","previous_headings":"","what":"Random patient listing — rADSL","title":"Random patient listing — rADSL","text":"Random patient listing","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random patient listing — rADSL","text":"","code":"rADSL"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random patient listing — rADSL","text":"object class tbl_df (inherits tbl, data.frame) 400 rows 55 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random patient listing — rADSL","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADTR — rADTR","title":"Random data rADTR — rADTR","text":"Random data rADTR","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADTR — rADTR","text":"","code":"rADTR"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADTR — rADTR","text":"object class data.frame 2800 rows 76 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADTR — rADTR","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random time to event analysis dataset — rADTTE","title":"Random time to event analysis dataset — rADTTE","text":"Random time event analysis dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random time to event analysis dataset — rADTTE","text":"","code":"rADTTE"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random time to event analysis dataset — rADTTE","text":"object class tbl_df (inherits tbl, data.frame) 2000 rows 67 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random time to event analysis dataset — rADTTE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADVS — rADVS","title":"Random data rADVS — rADVS","text":"Random data rADVS","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADVS — rADVS","text":"","code":"rADVS"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADVS — rADVS","text":"object class tbl_df (inherits tbl, data.frame) 16800 rows 87 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADVS — rADVS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Show teal_data object — show,teal_data-method","title":"Show teal_data object — show,teal_data-method","text":"Prints teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show teal_data object — show,teal_data-method","text":"","code":"# S4 method for class 'teal_data' show(object)"},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show teal_data object — show,teal_data-method","text":"object (teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show teal_data object — show,teal_data-method","text":"Input teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show teal_data object — show,teal_data-method","text":"","code":"teal_data() #> ✅︎ verified teal_data object #> [L] #> Parent: teal_data(x = iris, code = \"x = iris\") #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L] verify(teal_data(x = iris, code = \"x = iris\")) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L]"},{"path":"https://insightsengineering.github.io/teal.data/reference/teal.data-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal.data: Reproducible data model for teal applications — teal.data-package","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"package extends teal applications module stores data relationships (keys) reproducible code. Package offers also load data files, databases easily extendable another data sources.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/teal.data-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID) Authors: Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com (ORCID) Marcin Kosinski marcin.kosinski.mk1@roche.com Andre Verissimo andre.verissimo@roche.com (ORCID) Pawel Rucki pawel.rucki@roche.com Mahmoud Hallal mahmoud.hallal@roche.com Nikolas Burkoff Maciej Nasinski Konrad Pagacz Junlue Zhao contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproducible data — teal_data-class","title":"Reproducible data — teal_data-class","text":"Reproducible data container class. Inherits code tracking behavior teal.code::qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reproducible data — teal_data-class","text":"class provides isolated environment store process data code recorded. environment, code, data set names, data joining keys stored respective slots. slots never accessed directly, use provided get/set functions. code evaluated teal_data, messages warnings stored respective slots. errors raised, qenv.error object returned.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Reproducible data — teal_data-class","text":"env (environment) environment containing data sets possibly auxiliary variables. Access variables get_var() [[[]. setter provided. Evaluate code add variables @env. code (character) vector representing code necessary reproduce contents @env. Access get_code(). setter provided. Evaluate code append code slot. id (integer) random identifier assigned element @code. Used internally. warnings (character) vector warnings raised evaluating code. Access get_warnings(). messages (character) vector messages raised evaluating code. join_keys (join_keys) object specifying joining keys data sets @env. Access modify join_keys(). datanames (character) vector names data sets @env. Used internally distinguish auxiliary variables. Access modify datanames(). verified (logical(1)) flag signifying code @code proven yield contents @env. Used internally. See verify() details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Comprehensive data integration function for teal applications — teal_data","title":"Comprehensive data integration function for teal applications — teal_data","text":"Universal function pass data teal application.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(..., join_keys = teal.data::join_keys(), code = character(0), check)"},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comprehensive data integration function for teal applications — teal_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty joins pairs objects. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comprehensive data integration function for teal applications — teal_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(x1 = iris, x2 = mtcars) #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] #> • x2: [L]"},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological graph sort — topological_sort","title":"Topological graph sort — topological_sort","text":"Graph list node contains vector child nodes returned list, parents appear children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological graph sort — topological_sort","text":"","code":"topological_sort(graph)"},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological graph sort — topological_sort","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Topological graph sort — topological_sort","text":"Implementation Kahn algorithm modification maintain order input elements.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Updates the keys of the datasets based on the parents — update_keys_given_parents","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"Updates keys datasets based parents","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"","code":"update_keys_given_parents(x)"},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"x (join_keys) object update keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"(self) invisibly chaining","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify code reproducibility — verify","title":"Verify code reproducibility — verify","text":"Checks whether code teal_data object reproduces stored objects.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify code reproducibility — verify","text":"","code":"verify(x)"},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify code reproducibility — verify","text":"x teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify code reproducibility — verify","text":"Input teal_data object error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Verify code reproducibility — verify","text":"objects created code @code slot x all_equal contents @env slot, function updates @verified slot TRUE returned teal_data object. verified, slot always set TRUE. @code fails recreate objects teal_data@env, error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Verify code reproducibility — verify","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) verify(tdata1) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") verify(tdata2) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] verify(tdata2)@verified #> [1] TRUE tdata2@verified #> [1] FALSE tdata3 <- teal_data() tdata3 <- within(tdata3, { stop(\"error\") }) try(verify(tdata3)) # fails #> Error : error #> when evaluating qenv code: #> stop(\"error\") a <- 1 b <- a + 2 c <- list(x = 2) d <- 5 tdata4 <- teal_data( a = a, b = b, c = c, d = d, code = \"a <- 1 b <- a c <- list(x = 2) e <- 1\" ) tdata4 #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] #> • d: [L] if (FALSE) { # \\dontrun{ verify(tdata4) # fails } # }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"breaking-changes-0-6-0-9014","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.6.0.9014","text":"soft deprecate datanames argument get_code(). Use names instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-6-0-9014","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0.9014","text":"join_keys provided, datanames() now sorted topological way (Kahn algorithm), means parent dataset always precedes child dataset. extended parent dataset name, one child dataset exist datanames() connection child-parent set join_keys parent exist teal_data environment. allow set dataset name exist teal_data environment. teal_data longer set default datanames() based join_keys names - uses data names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-6-0-9014","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.6.0.9014","text":"get_code longer adds warning message failed verification.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-060","dir":"Changelog","previous_headings":"","what":"teal.data 0.6.0","title":"teal.data 0.6.0","text":"CRAN release: 2024-04-30","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-6-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0","text":"col_relabel supports NA remove labels (similar col_labels<-).","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"bug-fixes-0-6-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.6.0","text":"Fixed bug get_code causing incorrect lines order returned code. Fixed bug col_labels causing incorrect label names returned input data contains named label attributes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-050","dir":"Changelog","previous_headings":"","what":"teal.data 0.5.0","title":"teal.data 0.5.0","text":"CRAN release: 2024-02-13","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"bug-fixes-0-5-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.5.0","text":"Fix get_code_dependency bug detect usage objects functions left right-hand sides code reproducibility. Remove duplicate entries code_graph.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-5-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.5.0","text":"Extended get_code.teal_data() possibility steer internal methods ... parameter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-040","dir":"Changelog","previous_headings":"","what":"teal.data 0.4.0","title":"teal.data 0.4.0","text":"CRAN release: 2024-01-31","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-4-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.4.0","text":"Simplified join_key better support primary keys. JoinKey R6 object removed favor list-like object class name join_keys. Subset operators assignments supported ([, [[, [<- [[<-) join_keys function works constructor, getter setter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.4.0","text":"teal_data() cdisc_data() return now teal_data class object replaces TealData class object. teal_data becomes standard input entire teal framework. TealDataset, TealDatasetConnector TealDataConnector classes removed. Delayed-data-loading longer supported teal.data. called connectors now supported teal package (see ?teal::teal_data_module). join_keys() join_key() return now join_keys object replace JoinKeys class.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-4-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.4.0","text":"Specified minimal version package dependencies. Upgraded teal.code dependency Imports Depends. Deprecated get_labels function removed supporting function data_label.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-3-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.3.0","text":"Removed scda package dependency examples. Added col_labels function removed formatters dependency.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-3-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.3.0","text":"Update installation instructions.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-2-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.2.0","text":"Added ADQLQC, ADCSSRS, ADEQ5D5L supported data sets. Improved error message get_cdisc_keys. Examples now use scda.2022 instead scda.2021. Fixed help files TealDataset MAETealDataset. Added backstop missing reticulate package teal.data Python vignette.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-2-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.2.0","text":"Modified teal.Dataset$print method less cluttered output. Transferred data hashing step TealDataset MAETealDataset teal. Removed CDISCTealData class updated TealData account removed functionality. Added datasets parents information JoinKeys class. Updated cdisc_data teal_data wrappers handle join_keys creation updating instead CDISCTealData TealData. Removed join_keys methods TealDataset, TealDatasetConnector.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-1-2","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.1.2","text":"Updated vignettes README content.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-1-2","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.2","text":"Exported validate_metadata function. Replaced argument name archive_name comply latest version synthetic_cdisc_dataset function. Replaced use scda random.cdisc.data","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"bug-fixes-0-1-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.1.2","text":"Fixed get_raw_data examples.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-1-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.1","text":"Added template pkgdown site. Removed usage .Globalenv Python code execution. Updated package authors. Added package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-010","dir":"Changelog","previous_headings":"","what":"teal.data 0.1.0","title":"teal.data 0.1.0","text":"Initial release teal.data package data model used teal applications.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"New features","title":"teal.data 0.1.0","text":"Added metadata field TealDataset store named list metadata items. available module developers FilteredData$get_metadata(\"<>\") can pulled added directly datasets derived TealDatasetConnectors.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"breaking-changes-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Breaking changes","title":"teal.data 0.1.0","text":"get_key_duplicates returns data.frame instead tibble. get_call() function CallableFunction now returns call namespace included. MultiAssayExperiment SummarizedExperiment now suggested packages, required. Objects dependent MultiAssayExperiment changed lazy-load now suggested packages. Minor changes interface TealDataset, example active fields replaced explicit “get” calls.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Miscellaneous","title":"teal.data 0.1.0","text":"reticulate Suggests, added requireNamespace call whenever needed. dplyr moved imports suggests. Removed redundant calling JoinKeys$mutate method inside -loops. Removed rtables dependency package.","code":""}]
teal_data(x1 = iris, x2 = mtcars) #> ✖ unverified teal_data object -#> <environment: 0x561a1d873860> [L] +#> <environment: 0x5556324d1390> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • x1: <df[,5]> [L] diff --git a/main/reference/topological_sort.html b/main/reference/topological_sort.html index 694c0a889..5633483f2 100644 --- a/main/reference/topological_sort.html +++ b/main/reference/topological_sort.html @@ -9,7 +9,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -29,23 +29,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report diff --git a/main/reference/update_keys_given_parents.html b/main/reference/update_keys_given_parents.html index 48751baa2..3f337727f 100644 --- a/main/reference/update_keys_given_parents.html +++ b/main/reference/update_keys_given_parents.html @@ -7,7 +7,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -27,23 +27,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report diff --git a/main/reference/verify.html b/main/reference/verify.html index d3a25b6f6..dd9ad1aba 100644 --- a/main/reference/verify.html +++ b/main/reference/verify.html @@ -7,7 +7,7 @@ teal.data - 0.6.0.9013 + 0.6.0.9014 part of @@ -27,23 +27,6 @@ Changelog - - Versions main -latest-tag -release-candidate -v0.6.0-rc1 -v0.5.0-rc1 -v0.4.0-rc1 -v0.6.0 -v0.5.0 -v0.4.0 -v0.3.0 -v0.2.0 -v0.1.2 - Reports Coverage report Unit test report @@ -104,7 +87,7 @@ Examples}) verify(tdata1) #> ✅︎ verified teal_data object -#> <environment: 0x561a1fea2c38> [L] +#> <environment: 0x55563404e290> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • a: <dbl> [L] @@ -114,7 +97,7 @@ Examplestdata2 <- teal_data(x1 = iris, code = "x1 <- iris") verify(tdata2) #> ✅︎ verified teal_data object -#> <environment: 0x561a20b5b0d0> [L] +#> <environment: 0x555634bfea10> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • x1: <df[,5]> [L] @@ -146,7 +129,7 @@ Examples) tdata4 #> ✖ unverified teal_data object -#> <environment: 0x561a1d6e0fd8> [L] +#> <environment: 0x5556343138a0> [L] #> Parent: <environment: devtools_shims> #> Bindings: #> • a: <dbl> [L] diff --git a/main/search.json b/main/search.json index a3f7b5789..b700b1bba 100644 --- a/main/search.json +++ b/main/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Join Keys","text":"teal.data package provides way define primary keys dataset establish relationships datasets. dataset joining keys can characterized : Columns constituting primary key; Foreign/merge keys, analogous SQL foreign keys. Typically, application developer specifies keys manually. However, datasets following ADaM standard, teal.data can automatically assign keys using default_cdisc_join_keys object. Refer section “Joining Keys ADaM Datasets” details using object select specific datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"uses-of-join_keys-class-in-teal-applications","dir":"Articles","previous_headings":"Overview","what":"Uses of join_keys class in teal applications","title":"Join Keys","text":"primary function join_keys class teal applications facilitate seamless merging datasets using teal.transform. Additionally, plays role data filtering using Filter Panel teal application. filters applied (parent) dataset also applied children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"anatomy-of-join_keys","dir":"Articles","previous_headings":"","what":"Anatomy of join_keys","title":"Join Keys","text":"join_keys object contains information foreign/primary keys multiple datasets. key represented pair datasets (name reference) named character vector encodes column name mapping two datasets. addition, foreign key may also contain parent-child attribute used “Filter Panel” mentioned . new join keys can created empty object, defining initial set primary foreign keys. initial object can extended adding/modifying/removing keys establishing parent-child relationships datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join_keys----join-keys-constructor-getter-setter","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_keys(...): Join Keys Constructor / Getter / Setter","title":"Join Keys","text":"Convenient function used constructor getter join_keys objects. Getter used retrieve joining keys contained objects, teal_data object. Constructor used specify collection multiple individual keys (via join_key function described ).","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join_keydataset_1-dataset_2-key-parent-single-join-key-constructor","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_key(dataset_1, dataset_2, key, parent): Single Join Key Constructor","title":"Join Keys","text":"Specifies primary key relationship two datasets. dataset_1, dataset_2: names datasets (dataset_2 dataset_1 omitted, creates primary key); key: named character vector column name mapping datasets (unnamed vector assumes column names datasets ); directed (optional): flag indicates whether parent-child directed relationship dataset_2 dataset_1 (latter parent). Note join keys assumed symmetric, .e., join_key(\"ds1\", \"ds2\", c(\"ds1_col\" = \"ds2_col\")) establishes relationship “x” “y” vice versa. default, new joining key set dataset_1 parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"example-output","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"Example & Output","title":"Join Keys","text":"","code":"library(teal.data) jk <- join_keys( join_key(\"ds1\", keys = \"col_1\"), # ds1: [col_1] join_key(\"ds2\", keys = c(\"col_1\", \"col_2\")), # ds2: [col_1, col_2] join_key(\"ds3\", keys = c(\"col_1\", \"col_3\")), # ds3: [col_1, col_3] join_key(\"ds1\", \"ds2\", keys = \"col_1\"), # ds1 <-- ds2 join_key(\"ds1\", \"ds3\", keys = \"col_1\"), # ds1 <-- ds3 join_key(\"ds4\", \"ds5\", keys = c(\"col_4\" = \"col_5\"), directed = FALSE) # ds4 <--> ds5 ) # The parent-child relationships are created automatically (unless 'parent' parameter is \"none\") jk"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"accessing-and-modifying-keys","dir":"Articles","previous_headings":"","what":"Accessing and Modifying keys","title":"Join Keys","text":"subset operator 2 indices (x[, j]) used retrieve primary/foreign keys. indices must string denoting dataset name. Note symmetry keys ds4 ds5 relationship: 1 argument used operator return join_keys object filtered accordingly. Modifying adding key uses notation assignment operator <-. symmetric relationship created automatically, parent (default) dataset defined first index. Assigning NULL value delete relationship.","code":"# Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting foreign keys between \"ds4\" and \"ds5\" jk[\"ds4\", \"ds5\"] ## col_4 ## \"col_5\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" # Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting keys of \"ds1\" and \"ds2\" jk[c(\"ds1\", \"ds2\")] ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] # Adding a new ds5 <-- ds1 key jk[\"ds1\", \"ds5\"] <- \"a_column\" # Removing an existing key jk[\"ds4\", \"ds5\"] <- NULL"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"merging-join-keys","dir":"Articles","previous_headings":"","what":"Merging Join Keys","title":"Join Keys","text":"combining multiple joining keys achieved using c() generic function, generates symmetric valid join_keys object. encountering identical relationship pairs, operation retains last occurrence pair within specified argument order. added convenience, function also accommodates join_key_set objects created join_key function. objects can provided initial argument position needed.","code":"jk1 <- join_keys(join_key(\"ds1\", \"ds1\", \"col_1\")) jk2 <- join_keys(join_key(\"ds2\", \"ds2\", \"col_1\"), join_key(\"ds1\", \"ds2\", \"col_1\")) # Merging c(jk1, jk2) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1] ## --> ds1: [col_1] # Keeping last occurence c(jk1, jk2, join_keys(join_key(\"ds2\", \"ds2\", \"col_2\"), join_key(\"ds1\", \"ds2\", c(\"col_1\" = \"col_2\")))) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_2] ## ds2: [col_2] ## --> ds1: [col_1] # Merges join_key and join_key_set objects (from join_key function) c(jk1, join_key(\"ds3\", \"ds3\", \"col_3\")) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## ds3: [col_3]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join-keys-relationships","dir":"Articles","previous_headings":"","what":"Join Keys Relationships","title":"Join Keys","text":"2 types relationships encoded joining keys described following sections. primary foreign keys created explicitly using constructor individual keys (join_key). Additionally, join_keys object infers implicit relationships two datasets share foreign keys parent dataset, . implicit relationships available just like another foreign key can used merge datasets, despite defined user.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"primary-key-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Primary Key with teal_data","title":"Join Keys","text":"using teal_data function, simplest method define join keys use join_keys argument. can specify column(s) dataset (together) uniquely identify rows dataset. can extend previous example define primary keys multiple datasets:","code":"library(teal.data) td_pk <- within( teal_data(), ds1 <- transform(iris, id = seq_len(nrow(iris))) ) datanames(td_pk) <- \"ds1\" join_keys(td_pk) <- join_keys(join_key(\"ds1\", keys = \"id\")) join_keys(td_pk) ## A join_keys object containing foreign keys between 1 datasets: ## ds1: [id] td_pk <- within( td_pk, { ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_pk) <- c(datanames(td_pk), \"ds2\", \"ds3\") join_keys(td_pk)[\"ds2\", \"ds2\"] <- c(\"V\", \"W\") join_keys(td_pk)[\"ds3\", \"ds3\"] <- c(\"V\", \"W\") join_keys(td_pk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [id] ## ds2: [V, W] ## ds3: [V, W]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"foreign-keys-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Foreign Keys with teal_data","title":"Join Keys","text":"passing multiple datasets teal_data function, dataset relationships set using join_keys join_key functions, can used merge datasets together within teal apps. users familiar SQL database schema, relationships symmetric strict SQL foreign key relationships teal validate whether values defined foreign key columns present table. example:","code":"library(teal.data) td_fk <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_fk) <- c(\"ds1\", \"ds2\", \"ds3\") join_keys(td_fk) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")) ) join_keys(td_fk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [X] ## <-- ds2: [W] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## ds3: [V] ## --> ds2: [V]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"implicit-relationships","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Implicit Relationships","title":"Join Keys","text":"Two datasets share common foreign keys parent dataset implicit relationship modeled accessible joining keys. special relationship inferred existing foreign keys. need explicitly defined can accessed overwritten just foreign key. implicit relationships can used merge 2 datasets together, just defined manually. Note definition contains join_key \"ds2\" <-> \"ds4\"","code":"library(teal.data) td <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) ds4 <- data.frame(V = 5:14, R = rnorm(10)) } ) datanames(td) <- c(\"ds1\", \"ds2\", \"ds3\", \"ds4\") join_keys(td) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), join_key(\"ds4\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")), join_key(\"ds1\", \"ds4\", c(\"X\" = \"B\")) ) join_keys(td) ## A join_keys object containing foreign keys between 4 datasets: ## ds1: [X] ## <-- ds2: [W] ## <-- ds4: [B] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## --* (implicit via parent with): ds4 ## ds3: [V] ## --> ds2: [V] ## ds4: [V] ## --> ds1: [X] ## --* (implicit via parent with): ds2 join_keys(td)[\"ds2\", \"ds4\"] ## W ## \"B\""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/join-keys.html","id":"join-keys-in-adam-datasets","dir":"Articles","previous_headings":"","what":"Join Keys in ADaM Datasets","title":"Join Keys","text":"teal.data provides set default join keys (primary foreign) datasets named according ADaM standard. stored default_cdisc_join_keys. default keys required users can select smaller set datasets subsetting (example: default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\")]). Please note, every element selected, parent also returned (one) well pair-wise relationships resulting selection.","code":"names(default_cdisc_join_keys) |> sort() ## [1] \"ADAE\" \"ADAETTE\" \"ADCM\" \"ADCSSRS\" \"ADDV\" \"ADEG\" ## [7] \"ADEQ5D5L\" \"ADEX\" \"ADHY\" \"ADLB\" \"ADMH\" \"ADQLQC\" ## [13] \"ADQS\" \"ADRS\" \"ADSAFTTE\" \"ADSL\" \"ADSUB\" \"ADTTE\" ## [19] \"ADVS\" default_cdisc_join_keys ## A join_keys object containing foreign keys between 19 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADAE: [STUDYID, USUBJID] ## <-- ADEG: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADAETTE: [STUDYID, USUBJID] ## <-- ADCM: [STUDYID, USUBJID] ## <-- ADEX: [STUDYID, USUBJID] ## <-- ADLB: [STUDYID, USUBJID] ## <-- ADMH: [STUDYID, USUBJID] ## <-- ADQS: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## <-- ADSAFTTE: [STUDYID, USUBJID] ## <-- ADVS: [STUDYID, USUBJID] ## <-- ADDV: [STUDYID, USUBJID] ## <-- ADSUB: [STUDYID, USUBJID] ## <-- ADHY: [STUDYID, USUBJID] ## <-- ADQLQC: [STUDYID, USUBJID] ## <-- ADCSSRS: [STUDYID, USUBJID] ## <-- ADEQ5D5L: [STUDYID, USUBJID] ## ADAE: [STUDYID, USUBJID, ASTDTM, AETERM, AESEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEG: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADAETTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADCM: [STUDYID, USUBJID, ASTDTM, CMSEQ, ATC1CD, ATC2CD, ATC3CD, ATC4CD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEX: [STUDYID, USUBJID, PARCAT1, PARAMCD, AVISITN, ASTDTM, EXSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADLB: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADMH: [STUDYID, USUBJID, ASTDTM, MHSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSAFTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADVS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADDV: [STUDYID, USUBJID, ASTDT, DVTERM, DVSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSUB: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADHY: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQLQC: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADCSSRS, ADEQ5D5L ## ADCSSRS: [STUDYID, USUBJID, PARAMCD, BASETYPE, AVISITN, DTYPE, ADTM] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADEQ5D5L ## ADEQ5D5L: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS default_cdisc_join_keys[\"ADSL\"] ## A join_keys object containing foreign keys between 1 datasets: ## ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[\"ADTTE\"] ## A join_keys object containing foreign keys between 2 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ## A join_keys object containing foreign keys between 3 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADRS ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADTTE"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"reproducibility-of-teal_data-objects","dir":"Articles","previous_headings":"","what":"Reproducibility of teal_data objects","title":"teal_data reproducibility","text":"Reproducibility primary function qenv class, teal_data inherits . Every data modification teal_data object performed encapsulated environment, separate global environment. important note reproducibility object limited data-code relationship. aspects reliability data source, reproducibility R session (including package versions), creation use objects environments (e.g. .GlobalEnv) verified properly teal_data. advisable always begin analysis new session run code pertains analysis within teal_data object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"verification-status","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification status","title":"teal_data reproducibility","text":"Every teal_data object verification status, statement whether contents env can reproduced code. perspective, teal_data objects instantiated empty verified ones instantiated data code unverified code need reproducible. Obviously, teal_data objects instantiated data unverified well. evaluating code teal_data object, code stored code executed, reproducible definition. Therefore, evaluating code teal_data object change verification status. verification status always printed inspecting teal_data object. Also, retrieving code, unverified objects add warning code stating passed verification.","code":"library(teal.data) data_empty <- teal_data() data_empty # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: data_empty <- within(data_empty, i <- head(iris)) data_empty # remains verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- teal_data(i = head(iris), code = \"i <- head(iris)\") data_with_data # is unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- within(data_with_data, i$rand <- sample(nrow(i))) data_with_data # remains unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"verification-process","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification process","title":"teal_data reproducibility","text":"order confirm code stored teal_data exactly reproduces contents environment, one must run verify() function. causes code evaluated results compared contents environment. code executes without errors results contents already present environment, verification successful object’s state changed verified. Otherwise error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"verified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"verified","title":"teal_data reproducibility","text":"","code":"library(teal.data) data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) data_right <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) }) ) # is unverified (data_right_verified <- verify(data_right)) # returns verified object ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"unverified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"unverified","title":"teal_data reproducibility","text":"","code":"data_wrong <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) }) ) verify(data_wrong) # fails verification, raises error ## Error: Code verification failed. ## Object(s) recreated with code that have different structure in data_wrong: ## • data"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"retrieving-code","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Retrieving code","title":"teal_data reproducibility","text":"get_code function used retrieve code stored teal_data object. simple get_code() return entirety code using names argument allows obtaining subset code deals objects stored teal_data. Note retrieving code specific dataset, result code used create dataset, code uses .","code":"library(teal.data) data <- within(teal_data(), { i <- iris m <- mtcars head(i) }) cat(get_code(data)) # retrieve all code ## i <- iris ## m <- mtcars ## head(i) cat(get_code(data, names = \"i\")) # retrieve code for `i` ## i <- iris"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html","id":"tracking-object-dependencies","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Tracking object dependencies","title":"teal_data reproducibility","text":"Calling get_code datanames specified initiates analysis stored code, object dependencies automatically discovered. object x created expression uses object y, lines create object y must also returned. quite effective objects created simple assignments like x <- foo(y). However, rare cases discovering dependencies impossible, e.g. opening connections databases objects created side effects (functions acting calling environment implicitly rather returning value assigned). cases code author must manually tag code lines required dataset adding special comment lines: # @linksto x cause line included retrieving code x. See ?get_code detailed explanation examples.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Introduction to teal.data","text":"teal.data package specifies data format used teal applications. teal_data class inherits qenv meant used reproducibility purposes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"quick-start","dir":"Articles","previous_headings":"Introduction","what":"Quick Start","title":"Introduction to teal.data","text":"create object class teal_data, use teal_data function. teal_data number methods manage relevant information private class slots.","code":"library(teal.data) # create teal_data object my_data <- teal_data() # run code within teal_data to create data objects my_data <- within( my_data, { data1 <- data.frame(id = 1:10, x = 11:20) data2 <- data.frame(id = 1:10, x = 21:30) } ) # get objects stored in teal_data my_data[[\"data1\"]] my_data[[\"data1\"]] # get reproducible code get_code(my_data) # get or set datanames datanames(my_data) <- c(\"data1\", \"data2\") datanames(my_data) # print print(my_data)"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"teal_data-characteristics","dir":"Articles","previous_headings":"Introduction","what":"teal_data characteristics","title":"Introduction to teal.data","text":"teal_data object keeps following information: env - environment containing data. code - string containing code reproduce env (details reproducibility). datanames - character vector listing objects interest teal modules (details teal vignette). join_keys - join_keys object defining relationships datasets (details Join Keys).","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"reproducibility","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Reproducibility","title":"Introduction to teal.data","text":"primary function teal_data provide reproducibility data. recommend initialize empty teal_data, marks object verified, create datasets evaluating code object, using within eval_code. Read teal_data Reproducibility.","code":"my_data <- teal_data() my_data <- within(my_data, data <- data.frame(x = 11:20)) my_data <- within(my_data, data$id <- seq_len(nrow(data))) my_data # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/articles/teal-data.html","id":"relational-data-models","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Relational data models","title":"Introduction to teal.data","text":"teal_data class supports relational data. Relationships datasets can described joining keys stored teal_data object. relationships can read set join_keys function. See join_keys.","code":"my_data <- teal_data() my_data <- within(my_data, { data <- data.frame(id = 1:10, x = 11:20) child <- data.frame(id = 1:20, data_id = c(1:10, 1:10), y = 21:30) }) join_keys(my_data) <- join_keys( join_key(\"data\", \"data\", key = \"id\"), join_key(\"child\", \"child\", key = \"id\"), join_key(\"child\", \"data\", key = c(\"data_id\" = \"id\")) ) join_keys(my_data) ## A join_keys object containing foreign keys between 2 datasets: ## child: [id] ## <-- data: [id] ## data: [id] ## --> child: [data_id]"},{"path":"https://insightsengineering.github.io/teal.data/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Aleksander Chlebowski. Author. Marcin Kosinski. Author. Andre Verissimo. Author. Pawel Rucki. Author. Mahmoud Hallal. Author. Nikolas Burkoff. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Chlebowski , Kosinski M, Verissimo , Rucki P, Hallal M, Burkoff N, Nasinski M, Pagacz K, Zhao J (2024). teal.data: Data Model 'teal' Applications. R package version 0.6.0.9013, https://github.com/insightsengineering/teal.data/, https://insightsengineering.github.io/teal.data/main/.","code":"@Manual{, title = {teal.data: Data Model for 'teal' Applications}, author = {Dawid Kaledkowski and Aleksander Chlebowski and Marcin Kosinski and Andre Verissimo and Pawel Rucki and Mahmoud Hallal and Nikolas Burkoff and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2024}, note = {R package version 0.6.0.9013, https://github.com/insightsengineering/teal.data/}, url = {https://insightsengineering.github.io/teal.data/main/}, }"},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"tealdata","dir":"","previous_headings":"","what":"Data Model for teal Applications","title":"Data Model for teal Applications","text":"package used create data needed teal applications. data can : Independent data frames CDISC data (clinical trial reporting) Relational data MultiAssayExperiment objects package provides: mechanism pulling data existing systems ability mutate (.e. pre-process) data record operations used create data enable reproducibility","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Data Model for teal Applications","text":"Alternatively, might want use development version.","code":"install.packages('teal.data') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.data\")"},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Data Model for teal Applications","text":"understand use package, please refer Introduction teal.data article, provides multiple examples code implementation. showcase example usage.","code":"library(teal.data) # quick start for clinical trial data my_data <- cdisc_data( ADSL = example_cdisc_data(\"ADSL\"), ADTTE = example_cdisc_data(\"ADTTE\"), code = quote({ ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) ) # or my_data <- within(teal_data(), { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) datanames <- c(\"ADSL\", \"ADTTE\") datanames(my_data) <- datanames join_keys(my_data) <- default_cdisc_join_keys[datanames] # quick start for general data my_general_data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) # reproducibility check data <- teal_data(iris = iris, code = \"iris <- mtcars\") verify(data) #> Error: Code verification failed. #> Object(s) recreated with code that have different structure in data: #> • iris # code extraction iris2_data <- within(teal_data(), {iris2 <- iris[1:6, ]}) get_code(iris2_data) #> \"iris2 <- iris[1:6, ]\""},{"path":"https://insightsengineering.github.io/teal.data/main/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Data Model for teal Applications","text":"encounter bug feature request, please file issue. questions, discussions, staying date, please use teal channel pharmaverse slack workspace.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated TealData class and related functions — TealData","title":"Deprecated TealData class and related functions — TealData","text":"TealData class associated functions deprecated. Use teal_data() instead. See Migration guide details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated TealData class and related functions — TealData","text":"","code":"as_cdisc(...) callable_code(...) callable_function(...) code_dataset_connector(...) code_cdisc_dataset_connector(...) csv_dataset_connector(...) csv_cdisc_dataset_connector(...) python_code(...) python_dataset_connector(...) python_cdisc_dataset_connector(...) cdisc_data_connector(...) cdisc_dataset(...) cdisc_dataset_connector(...) cdisc_dataset_connector_file(...) cdisc_dataset_file(...) dataset(...) dataset_connector(...) dataset_connector_file(...) dataset_file(...) data_connection(...) fun_dataset_connector(...) fun_cdisc_dataset_connector(...) relational_data_connector(...) mae_dataset(...) get_attrs(...) get_dataset_label(...) get_dataset(...) get_datasets(...) get_dataname(...) get_key_duplicates(...) get_keys(...) get_raw_data(...) is_pulled(...) load_dataset(...) load_datasets(...) mutate_data(...) mutate_dataset(...) set_args(...) rds_dataset_connector(...) rds_cdisc_dataset_connector(...) script_dataset_connector(...) script_cdisc_dataset_connector(...) set_keys(...) read_script(...) to_relational_data(...) validate_metadata(...) get_cdisc_keys(...) cdisc_data_file(...) teal_data_file(...) get_join_keys(...) get_join_keys(...) <- value"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated TealData class and related functions — TealData","text":"... argument supported TealData related functions. value value assign","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/TealData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deprecated TealData class and related functions — TealData","text":"nothing","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Test if two objects are (nearly) equal — all.equal.join_keys","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":".equal(target, current) utility compare join_keys objects target current testing near equality.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"","code":"# S3 method for class 'equal.join_keys' all(target, current, ...)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"target R object. current R object, compared target. ... arguments different methods. used join_keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/all.equal.join_keys.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"different, comparison still made extent, report differences returned. use .equal directly expressions—either use isTRUE(.equal(....)) identical appropriate. parents attribute comparison tolerates NULL empty lists find difference. list containing relationships treated like map ignores entries NULL exist.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Compatibility of keys — assert_compatible_keys","title":"Check Compatibility of keys — assert_compatible_keys","text":"Helper function assert two key sets contain incompatible keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Compatibility of keys — assert_compatible_keys","text":"","code":"assert_compatible_keys(join_key_1, join_key_2)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Compatibility of keys — assert_compatible_keys","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys2.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify key set compatibility — assert_compatible_keys2","title":"Verify key set compatibility — assert_compatible_keys2","text":"Helper function ensuring compatibility two sets keys","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify key set compatibility — assert_compatible_keys2","text":"","code":"assert_compatible_keys2(x, y)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_compatible_keys2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify key set compatibility — assert_compatible_keys2","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate parent-child key — assert_parent_child","title":"Validate parent-child key — assert_parent_child","text":"Helper function checks parent-child relations valid.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate parent-child key — assert_parent_child","text":"","code":"assert_parent_child(x)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate parent-child key — assert_parent_child","text":"x (join_keys) object assert validity relations","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/assert_parent_child.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate parent-child key — assert_parent_child","text":"join_keys invisibly","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data input for teal app — cdisc_data","title":"Data input for teal app — cdisc_data","text":"Function wrapper around teal_data() guesses join_keys given datasets whose names match ADAM datasets names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data input for teal app — cdisc_data","text":"","code":"cdisc_data( ..., join_keys = teal.data::default_cdisc_join_keys[names(rlang::list2(...))], code = character(0), check )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data input for teal app — cdisc_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty automatically derived basing intersection datasets primary keys. ADAM datasets automatically derived. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data input for teal app — cdisc_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data input for teal app — cdisc_data","text":"function checks keys added data sets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/cdisc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data input for teal app — cdisc_data","text":"","code":"data <- cdisc_data( join_keys = join_keys( join_key(\"ADSL\", \"ADTTE\", c(\"STUDYID\" = \"STUDYID\", \"USUBJID\" = \"USUBJID\")) ) ) data <- within(data, { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") })"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Variable labels — col_labels","title":"Variable labels — col_labels","text":"Get set variable labels data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variable labels — col_labels","text":"","code":"col_labels(x, fill = FALSE) col_labels(x) <- value col_relabel(x, ...) get_labels(...)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Variable labels — col_labels","text":"functions taken formatters package, reduce complexity dependency tree rewritten.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Variable labels — col_labels","text":"x (data.frame DataFrame) data object fill (logical(1)) specifying return variable label value (character) vector variable labels length equal number columns x; named, names must match variable names x used key set labels; use NA remove label variable ... name-value pairs, name corresponds variable name x value new variable label; use NA remove label variable","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Variable labels — col_labels","text":"col_labels, named character vector variable labels, names corresponding variable names. label attribute missing, vector elements variable names fill = TRUE NA fill = FALSE. col_labels<- col_relabel, copy x variable labels modified.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Variable labels — col_labels","text":"Variable labels can stored label attribute set individual variables. functions get set attribute, either (col_labels) variables (col_relabel). previous versions teal.data labels managed get_labels(). function deprecated 0.4.0, use col_labels instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/col_labels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Variable labels — col_labels","text":"","code":"x <- iris col_labels(x) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> NA NA NA NA NA col_labels(x) <- paste(\"label for\", names(iris)) col_labels(x) #> Sepal.Length Sepal.Width Petal.Length #> \"label for Sepal.Length\" \"label for Sepal.Width\" \"label for Petal.Length\" #> Petal.Width Species #> \"label for Petal.Width\" \"label for Species\" y <- col_relabel(x, Sepal.Length = \"Sepal Length of iris flower\") col_labels(y) #> Sepal.Length Sepal.Width #> \"Sepal Length of iris flower\" \"label for Sepal.Width\" #> Petal.Length Petal.Width #> \"label for Petal.Length\" \"label for Petal.Width\" #> Species #> \"label for Species\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Names of data sets in teal_data object — datanames","title":"Names of data sets in teal_data object — datanames","text":"Get set value datanames slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Names of data sets in teal_data object — datanames","text":"","code":"datanames(x) datanames(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Names of data sets in teal_data object — datanames","text":"x (teal_data) object access modify value (character) new value @datanames; elements must names variables existing @env","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Names of data sets in teal_data object — datanames","text":"contents @datanames teal_data object updated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Names of data sets in teal_data object — datanames","text":"@datanames slot teal_data object specifies variables stored environment (@env slot) data sets taken consideration. contents @datanames can specified upon creation default variables @env. Variables created later, may well data sets, automatically considered . Use function update slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/datanames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Names of data sets in teal_data object — datanames","text":"","code":"td <- teal_data(iris = iris) td <- within(td, mtcars <- mtcars) datanames(td) #> [1] \"iris\" datanames(td) <- c(\"iris\", \"mtcars\") datanames(td) #> [1] \"iris\" \"mtcars\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"data object created loading time cdisc_datasets/cdisc_datasets.yaml.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"","code":"default_cdisc_join_keys"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"object class join_keys (inherits list) length 19.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/default_cdisc_join_keys.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sample CDISC datasets — example_cdisc_data","title":"Generate sample CDISC datasets — example_cdisc_data","text":"Retrieves example CDISC datasets use examples testing.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sample CDISC datasets — example_cdisc_data","text":"","code":"example_cdisc_data( dataname = c(\"ADSL\", \"ADAE\", \"ADLB\", \"ADCM\", \"ADEX\", \"ADRS\", \"ADTR\", \"ADTTE\", \"ADVS\") )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sample CDISC datasets — example_cdisc_data","text":"dataname (character(1)) name CDISC dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sample CDISC datasets — example_cdisc_data","text":"CDISC dataset data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/example_cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate sample CDISC datasets — example_cdisc_data","text":"function returns dummy dataset used within teal.data. Note datasets created maintained teal.data, retrieved dependencies.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code from teal_data object — get_code,teal_data-method","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"# S4 method for class 'teal_data' get_code( object, deparse = TRUE, names = NULL, datanames = lifecycle::deprecated(), ... )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code from teal_data object — get_code,teal_data-method","text":"object (teal_data) deparse (logical) flag specifying whether return code character (deparse = TRUE) expression (deparse = FALSE). names (character) Successor datanames. Vector dataset names return code . details see \"Extracting dataset-specific code\" section. datanames (character) vector dataset names return code . details see \"Extracting dataset-specific code\" section. Use names instead. ... Parameters passed internal methods. Currently, supported parameter check_names (logical(1)) flag, TRUE default. Function warns missing objects, exist code passed datanames. remove warning, set check_names = FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code from teal_data object — get_code,teal_data-method","text":"Either character string expression. names used request specific dataset, code creates dataset (code uses ) returned. Otherwise, contents @code.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code stored @code, (principle) can used recreate objects found @env. Use names limit code one datasets enumerated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"extracting-dataset-specific-code","dir":"Reference","previous_headings":"","what":"Extracting dataset-specific code","title":"Get code from teal_data object — get_code,teal_data-method","text":"names specified, code returned limited lines needed create requested datasets. code stored @code slot analyzed statically determine lines datasets interest depend upon. analysis works well objects created standard infix assignment operators (see ?assignOps) can fail situations. Consider following examples: Case 1: Usual assignments. x dependencies, get_code(data, names = \"x\") return second call.y depends x foo, get_code(data, names = \"y\") contain three calls. Case 2: objects created function's side effects. , y depends x x modified foo side effect (reassignment) get_code(data, names = \"y\") return foo() call. overcome limitation, code dependencies can specified manually. Lines side effects occur can flagged adding \"# @linksto \" end. Note within evaluates code passed expr comments ignored. order include comments code one must use eval_code function instead. Now foo() call properly included code required recreate y. Note two functions create objects side effects, assign data, handled automatically. known cases manual tagging necessary: non-standard assignment operators, e.g. %<>% objects used conditions statements: () objects used iterate loops: () creating evaluating language objects, e.g. eval()","code":"data <- teal_data() |> within({ foo <- function(x) { x + 1 } x <- 0 y <- foo(x) }) get_code(data, names = \"y\") data <- teal_data() |> within({ foo <- function() { x <<- x + 1 } x <- 0 foo() y <- x }) get_code(data, names = \"y\") data <- teal_data() |> eval_code(\" foo <- function() { x <<- x + 1 } x <- 0 foo() # @linksto x y <- x \") get_code(data, names = \"y\")"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/get_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) get_code(tdata1) #> [1] \"a <- 1\\nb <- a^5\\nc <- list(x = 2)\" get_code(tdata1, names = \"a\") #> [1] \"a <- 1\" get_code(tdata1, names = \"b\") #> [1] \"a <- 1\\nb <- a^5\" tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") get_code(tdata2) #> [1] \"x1 <- iris\" get_code(verify(tdata2)) #> [1] \"x1 <- iris\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"Checks whether graph Directed Acyclic Graph (DAG)","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"","code":"is_dag(graph)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/is_dag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"logical(1) TRUE graph DAG; FALSE otherwise","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a relationship between a pair of datasets — join_key","title":"Create a relationship between a pair of datasets — join_key","text":"Create relationship two datasets, dataset_1 dataset_2. default, function establishes directed relationship dataset_1 parent. dataset_2 specified, function creates primary key dataset_1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(dataset_1, dataset_2 = dataset_1, keys, directed = TRUE)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a relationship between a pair of datasets — join_key","text":"dataset_1, dataset_2 (character(1)) Dataset names. dataset_2 omitted, primary key dataset_1 created. keys (optionally named character) Column mapping datasets, names(keys) maps columns dataset_1 corresponding columns dataset_2 given elements keys. unnamed, column names used datasets. element keys vector empty non-empty name, name used datasets. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a relationship between a pair of datasets — join_key","text":"object class join_key_set passed join_keys function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(\"d1\", \"d2\", c(\"A\")) #> $d1 #> $d1$d2 #> A #> \"A\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\")) #> $d1 #> $d1$d2 #> A #> \"B\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\", \"C\")) #> $d1 #> $d1$d2 #> A C #> \"B\" \"C\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #>"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage relationships between datasets using join_keys — join_keys","title":"Manage relationships between datasets using join_keys — join_keys","text":"Facilitates creation retrieval relationships datasets. join_keys class extends list contains keys connecting pairs datasets. element list contains keys specific dataset. dataset can relationship (primary key) datasets. Note join_keys list symmetrical assumes default direction, : keys set ds1 ds2, defines ds1 parent parent-child relationship mapping automatically mirrored ds2 ds1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"## Constructor, getter and setter join_keys(...) # Default S3 method join_keys(...) # S3 method for class 'join_keys' join_keys(...) # S3 method for class 'teal_data' join_keys(...) # S3 method for class 'join_keys' x[i, j] # S3 method for class 'join_keys' x[i, j, directed = TRUE] <- value # S3 method for class 'join_keys' c(...) # S3 method for class 'join_key_set' c(...) join_keys(x) <- value # S3 method for class 'join_keys' join_keys(x) <- value # S3 method for class 'teal_data' join_keys(x) <- value # S3 method for class 'join_keys' format(x, ...) # S3 method for class 'join_keys' print(x, ...)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage relationships between datasets using join_keys — join_keys","text":"... optional, either teal_data join_keys object extract join_keys number join_key_set objects create join_keys nothing create empty join_keys x (join_keys) empty object set new relationship pairs. x typically object join_keys class. called join_keys(x) join_keys(x) <- value can also take supported class (teal_data, join_keys) , j indices specifying elements extract replace. Index character vector, can also take numeric, logical, NULL missing. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected. value x[, j, directed = TRUE)] <- value (named/unnamed character) Column mapping datasets. join_keys(x) <- value: (join_key_set list join_key_set) relationship pairs add join_keys list. [, j, directed = TRUE)]: R:,%20j,%20directed%20=%20TRUE)","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys(): Returns empty join_keys object called without arguments. join_keys(join_keys): Returns . join_keys(teal_data): Returns join_keys object contained teal_data object. join_keys(...): Creates new object one join_key_set parameters.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Manage relationships between datasets using join_keys — join_keys","text":"x[datanames]: Returns subset join_keys object given datanames, including parent datanames symmetric mirror keys datanames result. x[, j]: Returns join keys datasets j, including implicit keys inferred relationship parent. x[, j] <- value: Assignment key pair (, j). x[] <- value: (without j parameter) supported operation join_keys. join_keys(x)[, j] <- value: Assignment join_keys object stored x, teal_data object join_keys object . join_keys(x) <- value: Assignment join_keys object value. value needs object class join_keys join_key_set.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/join_keys.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"# Creating a new join keys ---- jk <- join_keys( join_key(\"ds1\", \"ds1\", \"pk1\"), join_key(\"ds2\", \"ds2\", \"pk2\"), join_key(\"ds3\", \"ds3\", \"pk3\"), join_key(\"ds1\", \"ds2\", c(pk1 = \"pk2\")), join_key(\"ds1\", \"ds3\", c(pk1 = \"pk3\")) ) jk #> A join_keys object containing foreign keys between 3 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> <-- ds3: [pk3] #> ds2: [pk2] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3 #> ds3: [pk3] #> --> ds1: [pk1] #> --* (implicit via parent with): ds2 # Getter for join_keys --- jk[\"ds1\", \"ds2\"] #> pk1 #> \"pk2\" # Subsetting join_keys ---- jk[\"ds1\"] #> A join_keys object containing foreign keys between 1 datasets: #> ds1: [pk1] jk[1:2] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] jk[c(\"ds1\", \"ds2\")] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] # Setting a new primary key --- jk[\"ds4\", \"ds4\"] <- \"pk4\" jk[\"ds5\", \"ds5\"] <- \"pk5\" # Setting a single relationship pair --- jk[\"ds1\", \"ds4\"] <- c(\"pk1\" = \"pk4\") # Removing a key --- jk[\"ds5\", \"ds5\"] <- NULL # Merging multiple `join_keys` objects --- jk_merged <- c( jk, join_keys( join_key(\"ds4\", keys = c(\"pk4\", \"pk4_2\")), join_key(\"ds3\", \"ds4\", c(pk3 = \"pk4_2\")) ) ) # note: merge can be performed with both join_keys and join_key_set jk_merged <- c( jk_merged, join_key(\"ds5\", keys = \"pk5\"), join_key(\"ds1\", \"ds5\", c(pk1 = \"pk5\")) ) # Assigning keys via join_keys(x)[i, j] <- value ---- obj <- join_keys() # or obj <- teal_data() join_keys(obj)[\"ds1\", \"ds1\"] <- \"pk1\" join_keys(obj)[\"ds2\", \"ds2\"] <- \"pk2\" join_keys(obj)[\"ds3\", \"ds3\"] <- \"pk3\" join_keys(obj)[\"ds1\", \"ds2\"] <- c(pk1 = \"pk2\") join_keys(obj)[\"ds1\", \"ds3\"] <- c(pk1 = \"pk3\") identical(jk, join_keys(obj)) #> [1] FALSE # Setter for join_keys within teal_data ---- td <- teal_data() join_keys(td) <- jk join_keys(td)[\"ds1\", \"ds2\"] <- \"new_key\" join_keys(td) <- c(join_keys(td), join_keys(join_key(\"ds3\", \"ds2\", \"key3\"))) join_keys(td) #> A join_keys object containing foreign keys between 4 datasets: #> ds1: [pk1] #> <-> ds2: [new_key] #> <-- ds3: [pk3] #> <-- ds4: [pk4] #> ds3: [pk3] #> --> ds1: [pk1] #> <-- ds2: [key3] #> --* (implicit via parent with): ds4 #> ds2: [pk2] #> <-> ds1: [new_key] #> --> ds3: [key3] #> ds4: [pk4] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/names-set-.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"The names of a join_keys object — names<-.join_keys","title":"The names of a join_keys object — names<-.join_keys","text":"names join_keys object","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/names-set-.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The names of a join_keys object — names<-.join_keys","text":"","code":"# S3 method for class 'join_keys' names(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/names-set-.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The names of a join_keys object — names<-.join_keys","text":"x R object. value character vector length x, NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal constructor — new_join_keys","title":"Internal constructor — new_join_keys","text":"Internal constructor","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal constructor — new_join_keys","text":"","code":"new_join_keys()"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Internal constructor — new_join_keys","text":"empty join_keys list","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize teal_data object — new_teal_data","title":"Initialize teal_data object — new_teal_data","text":"Initialize teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize teal_data object — new_teal_data","text":"","code":"new_teal_data( data, code = character(0), join_keys = join_keys(), datanames = names(data) )"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/new_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize teal_data object — new_teal_data","text":"data (named list) data objects. code (character language) code reproduce data. Accepts stores comments also. join_keys (join_keys) object datanames (character) names datasets passed data. Needed non-dataset objects needed env slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Get and set parents in join_keys object — parents","title":"Get and set parents in join_keys object — parents","text":"parents() facilitates creation dependencies datasets assigning parent-child relationship.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get and set parents in join_keys object — parents","text":"","code":"parents(x) # S3 method for class 'join_keys' parents(x) # S3 method for class 'teal_data' parents(x) parents(x) <- value # S3 method for class 'join_keys' parents(x) <- value # S3 method for class 'teal_data' parents(x) <- value parent(x, dataset_name)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get and set parents in join_keys object — parents","text":"x (join_keys teal_data) object contains \"parents\" information retrieve manipulate. value (named list) character vectors. dataset_name (character(1)) Name dataset query parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get and set parents in join_keys object — parents","text":"list character representing parents. parent(x, dataset_name) returns NULL parent exist.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get and set parents in join_keys object — parents","text":"element defined list element, list(\"child\" = \"parent\").","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Get and set parents in join_keys object — parents","text":"parents(join_keys): Retrieves parents join_keys object. parents(teal_data): Retrieves parents join_keys inside teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Get and set parents in join_keys object — parents","text":"parents(x) <- value: Assignment parents join_keys object. parents(join_keys) <- value: Assignment parents join_keys object. parents(teal_data) <- value: Assignment parents join_keys inside teal_data object. parent(): Getter individual parent.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/parents.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get and set parents in join_keys object — parents","text":"","code":"# Get parents of join_keys --- jk <- default_cdisc_join_keys[\"ADEX\"] parents(jk) #> $ADEX #> [1] \"ADSL\" #> # Get parents of join_keys inside teal_data object --- td <- teal_data( ADSL = rADSL, ADTTE = rADTTE, ADRS = rADRS, join_keys = default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ) parents(td) #> $ADTTE #> [1] \"ADSL\" #> #> $ADRS #> [1] \"ADSL\" #> # Assignment of parents --- jk <- join_keys( join_key(\"ds1\", \"ds2\", \"id\"), join_key(\"ds5\", \"ds6\", \"id\"), join_key(\"ds7\", \"ds6\", \"id\") ) parents(jk) <- list(ds2 = \"ds1\") # Setting individual parent-child relationship parents(jk)[\"ds6\"] <- \"ds5\" parents(jk)[\"ds7\"] <- \"ds6\" # Assignment of parents of join_keys inside teal_data object --- parents(td) <- list(\"ADTTE\" = \"ADSL\") # replace existing parents(td)[\"ADRS\"] <- \"ADSL\" # add new parent # Get individual parent --- parent(jk, \"ds2\") #> [1] \"ds1\" parent(td, \"ADTTE\") #> [1] \"ADSL\""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random adverse events — rADAE","title":"Random adverse events — rADAE","text":"Random adverse events","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random adverse events — rADAE","text":"","code":"rADAE"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random adverse events — rADAE","text":"object class tbl_df (inherits tbl, data.frame) 1934 rows 92 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADAE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random adverse events — rADAE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":null,"dir":"Reference","previous_headings":"","what":"Random concomitant medications — rADCM","title":"Random concomitant medications — rADCM","text":"Random concomitant medications","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random concomitant medications — rADCM","text":"","code":"rADCM"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random concomitant medications — rADCM","text":"object class tbl_df (inherits tbl, data.frame) 3685 rows 83 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADCM.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random concomitant medications — rADCM","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADEX","title":"Random response — rADEX","text":"Random exposure.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADEX","text":"","code":"rADEX"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADEX","text":"object class tbl_df (inherits tbl, data.frame) 6400 rows 79 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADEX.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADEX","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":null,"dir":"Reference","previous_headings":"","what":"Random lab analysis — rADLB","title":"Random lab analysis — rADLB","text":"Random lab analysis","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random lab analysis — rADLB","text":"","code":"rADLB"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random lab analysis — rADLB","text":"object class tbl_df (inherits tbl, data.frame) 8400 rows 102 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADLB.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random lab analysis — rADLB","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADRS","title":"Random response — rADRS","text":"Random response","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADRS","text":"","code":"rADRS"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADRS","text":"object class tbl_df (inherits tbl, data.frame) 3200 rows 65 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADRS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADRS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":null,"dir":"Reference","previous_headings":"","what":"Random patient listing — rADSL","title":"Random patient listing — rADSL","text":"Random patient listing","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random patient listing — rADSL","text":"","code":"rADSL"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random patient listing — rADSL","text":"object class tbl_df (inherits tbl, data.frame) 400 rows 55 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADSL.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random patient listing — rADSL","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADTR — rADTR","title":"Random data rADTR — rADTR","text":"Random data rADTR","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADTR — rADTR","text":"","code":"rADTR"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADTR — rADTR","text":"object class data.frame 2800 rows 76 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTR.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADTR — rADTR","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random time to event analysis dataset — rADTTE","title":"Random time to event analysis dataset — rADTTE","text":"Random time event analysis dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random time to event analysis dataset — rADTTE","text":"","code":"rADTTE"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random time to event analysis dataset — rADTTE","text":"object class tbl_df (inherits tbl, data.frame) 2000 rows 67 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADTTE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random time to event analysis dataset — rADTTE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADVS — rADVS","title":"Random data rADVS — rADVS","text":"Random data rADVS","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADVS — rADVS","text":"","code":"rADVS"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADVS — rADVS","text":"object class tbl_df (inherits tbl, data.frame) 16800 rows 87 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/rADVS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADVS — rADVS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Show teal_data object — show,teal_data-method","title":"Show teal_data object — show,teal_data-method","text":"Prints teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show teal_data object — show,teal_data-method","text":"","code":"# S4 method for class 'teal_data' show(object)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show teal_data object — show,teal_data-method","text":"object (teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show teal_data object — show,teal_data-method","text":"Input teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/show-teal_data-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show teal_data object — show,teal_data-method","text":"","code":"teal_data() #> ✅︎ verified teal_data object #> [L] #> Parent: teal_data(x = iris, code = \"x = iris\") #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L] verify(teal_data(x = iris, code = \"x = iris\")) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal.data-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal.data: Reproducible data model for teal applications — teal.data-package","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"package extends teal applications module stores data relationships (keys) reproducible code. Package offers also load data files, databases easily extendable another data sources.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal.data-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID) Authors: Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com (ORCID) Marcin Kosinski marcin.kosinski.mk1@roche.com Andre Verissimo andre.verissimo@roche.com (ORCID) Pawel Rucki pawel.rucki@roche.com Mahmoud Hallal mahmoud.hallal@roche.com Nikolas Burkoff Maciej Nasinski Konrad Pagacz Junlue Zhao contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproducible data — teal_data-class","title":"Reproducible data — teal_data-class","text":"Reproducible data container class. Inherits code tracking behavior teal.code::qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reproducible data — teal_data-class","text":"class provides isolated environment store process data code recorded. environment, code, data set names, data joining keys stored respective slots. slots never accessed directly, use provided get/set functions. code evaluated teal_data, messages warnings stored respective slots. errors raised, qenv.error object returned.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Reproducible data — teal_data-class","text":"env (environment) environment containing data sets possibly auxiliary variables. Access variables get_var() [[[]. setter provided. Evaluate code add variables @env. code (character) vector representing code necessary reproduce contents @env. Access get_code(). setter provided. Evaluate code append code slot. id (integer) random identifier assigned element @code. Used internally. warnings (character) vector warnings raised evaluating code. Access get_warnings(). messages (character) vector messages raised evaluating code. join_keys (join_keys) object specifying joining keys data sets @env. Access modify join_keys(). datanames (character) vector names data sets @env. Used internally distinguish auxiliary variables. Access modify datanames(). verified (logical(1)) flag signifying code @code proven yield contents @env. Used internally. See verify() details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Comprehensive data integration function for teal applications — teal_data","title":"Comprehensive data integration function for teal applications — teal_data","text":"Universal function pass data teal application.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(..., join_keys = teal.data::join_keys(), code = character(0), check)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comprehensive data integration function for teal applications — teal_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty joins pairs objects. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comprehensive data integration function for teal applications — teal_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/teal_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(x1 = iris, x2 = mtcars) #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] #> • x2: [L]"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological graph sort — topological_sort","title":"Topological graph sort — topological_sort","text":"Graph list node contains vector child nodes returned list, parents appear children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological graph sort — topological_sort","text":"","code":"topological_sort(graph)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological graph sort — topological_sort","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/topological_sort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Topological graph sort — topological_sort","text":"Implementation Kahn algorithm modification maintain order input elements.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Updates the keys of the datasets based on the parents — update_keys_given_parents","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"Updates keys datasets based parents","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"","code":"update_keys_given_parents(x)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"x (join_keys) object update keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/update_keys_given_parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"(self) invisibly chaining","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify code reproducibility — verify","title":"Verify code reproducibility — verify","text":"Checks whether code teal_data object reproduces stored objects.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify code reproducibility — verify","text":"","code":"verify(x)"},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify code reproducibility — verify","text":"x teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify code reproducibility — verify","text":"Input teal_data object error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Verify code reproducibility — verify","text":"objects created code @code slot x all_equal contents @env slot, function updates @verified slot TRUE returned teal_data object. verified, slot always set TRUE. @code fails recreate objects teal_data@env, error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/reference/verify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Verify code reproducibility — verify","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) verify(tdata1) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") verify(tdata2) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] verify(tdata2)@verified #> [1] TRUE tdata2@verified #> [1] FALSE tdata3 <- teal_data() tdata3 <- within(tdata3, { stop(\"error\") }) try(verify(tdata3)) # fails #> Error : error #> when evaluating qenv code: #> stop(\"error\") a <- 1 b <- a + 2 c <- list(x = 2) d <- 5 tdata4 <- teal_data( a = a, b = b, c = c, d = d, code = \"a <- 1 b <- a c <- list(x = 2) e <- 1\" ) tdata4 #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] #> • d: [L] if (FALSE) { # \\dontrun{ verify(tdata4) # fails } # }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"breaking-changes-0-6-0-9013","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.6.0.9013","text":"soft deprecate datanames argument get_code(). Use names instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-6-0-9013","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0.9013","text":"join_keys provided, datanames() now sorted topological way (Kahn algorithm), means parent dataset always precedes child dataset. extended parent dataset name, one child dataset exist datanames() connection child-parent set join_keys parent exist teal_data environment. allow set dataset name exist teal_data environment. teal_data longer set default datanames() based join_keys names - uses data names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-6-0-9013","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.6.0.9013","text":"get_code longer adds warning message failed verification.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-060","dir":"Changelog","previous_headings":"","what":"teal.data 0.6.0","title":"teal.data 0.6.0","text":"CRAN release: 2024-04-30","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-6-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0","text":"col_relabel supports NA remove labels (similar col_labels<-).","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"bug-fixes-0-6-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.6.0","text":"Fixed bug get_code causing incorrect lines order returned code. Fixed bug col_labels causing incorrect label names returned input data contains named label attributes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-050","dir":"Changelog","previous_headings":"","what":"teal.data 0.5.0","title":"teal.data 0.5.0","text":"CRAN release: 2024-02-13","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"bug-fixes-0-5-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.5.0","text":"Fix get_code_dependency bug detect usage objects functions left right-hand sides code reproducibility. Remove duplicate entries code_graph.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-5-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.5.0","text":"Extended get_code.teal_data() possibility steer internal methods ... parameter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-040","dir":"Changelog","previous_headings":"","what":"teal.data 0.4.0","title":"teal.data 0.4.0","text":"CRAN release: 2024-01-31","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-4-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.4.0","text":"Simplified join_key better support primary keys. JoinKey R6 object removed favor list-like object class name join_keys. Subset operators assignments supported ([, [[, [<- [[<-) join_keys function works constructor, getter setter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.4.0","text":"teal_data() cdisc_data() return now teal_data class object replaces TealData class object. teal_data becomes standard input entire teal framework. TealDataset, TealDatasetConnector TealDataConnector classes removed. Delayed-data-loading longer supported teal.data. called connectors now supported teal package (see ?teal::teal_data_module). join_keys() join_key() return now join_keys object replace JoinKeys class.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-4-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.4.0","text":"Specified minimal version package dependencies. Upgraded teal.code dependency Imports Depends. Deprecated get_labels function removed supporting function data_label.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-3-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.3.0","text":"Removed scda package dependency examples. Added col_labels function removed formatters dependency.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-3-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.3.0","text":"Update installation instructions.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-2-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.2.0","text":"Added ADQLQC, ADCSSRS, ADEQ5D5L supported data sets. Improved error message get_cdisc_keys. Examples now use scda.2022 instead scda.2021. Fixed help files TealDataset MAETealDataset. Added backstop missing reticulate package teal.data Python vignette.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-2-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.2.0","text":"Modified teal.Dataset$print method less cluttered output. Transferred data hashing step TealDataset MAETealDataset teal. Removed CDISCTealData class updated TealData account removed functionality. Added datasets parents information JoinKeys class. Updated cdisc_data teal_data wrappers handle join_keys creation updating instead CDISCTealData TealData. Removed join_keys methods TealDataset, TealDatasetConnector.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"enhancements-0-1-2","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.1.2","text":"Updated vignettes README content.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-1-2","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.2","text":"Exported validate_metadata function. Replaced argument name archive_name comply latest version synthetic_cdisc_dataset function. Replaced use scda random.cdisc.data","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"bug-fixes-0-1-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.1.2","text":"Fixed get_raw_data examples.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-1-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.1","text":"Added template pkgdown site. Removed usage .Globalenv Python code execution. Updated package authors. Added package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"tealdata-010","dir":"Changelog","previous_headings":"","what":"teal.data 0.1.0","title":"teal.data 0.1.0","text":"Initial release teal.data package data model used teal applications.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"New features","title":"teal.data 0.1.0","text":"Added metadata field TealDataset store named list metadata items. available module developers FilteredData$get_metadata(\"<>\") can pulled added directly datasets derived TealDatasetConnectors.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"breaking-changes-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Breaking changes","title":"teal.data 0.1.0","text":"get_key_duplicates returns data.frame instead tibble. get_call() function CallableFunction now returns call namespace included. MultiAssayExperiment SummarizedExperiment now suggested packages, required. Objects dependent MultiAssayExperiment changed lazy-load now suggested packages. Minor changes interface TealDataset, example active fields replaced explicit “get” calls.","code":""},{"path":"https://insightsengineering.github.io/teal.data/main/news/index.html","id":"miscellaneous-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Miscellaneous","title":"teal.data 0.1.0","text":"reticulate Suggests, added requireNamespace call whenever needed. dplyr moved imports suggests. Removed redundant calling JoinKeys$mutate method inside -loops. Removed rtables dependency package.","code":""}] +[{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution Guidelines","title":"Contribution Guidelines","text":"🙏 Thank taking time contribute! input deeply valued, whether issue, pull request, even feedback, regardless size, content scope.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"table-of-contents","dir":"","previous_headings":"","what":"Table of contents","title":"Contribution Guidelines","text":"👶 Getting started 📔 Code Conduct 🗃 License 📜 Issues 🚩 Pull requests 💻 Coding guidelines 🏆 Recognition model ❓ Questions","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"Contribution Guidelines","text":"Please refer project documentation brief introduction. Please also see articles within project documentation additional information.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contribution Guidelines","text":"Code Conduct governs project. Participants contributors expected follow rules outlined therein.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"license","dir":"","previous_headings":"","what":"License","title":"Contribution Guidelines","text":"contributions covered project’s license.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"issues","dir":"","previous_headings":"","what":"Issues","title":"Contribution Guidelines","text":"use GitHub track issues, feature requests, bugs. submitting new issue, please check issue already reported. issue already exists, please upvote existing issue 👍. new feature requests, please elaborate context benefit feature users, developers, relevant personas.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"github-flow","dir":"","previous_headings":"Pull requests","what":"GitHub Flow","title":"Contribution Guidelines","text":"repository uses GitHub Flow model collaboration. submit pull request: Create branch Please see branch naming convention . don’t write access repository, please fork . Make changes Make sure code passes checks imposed GitHub Actions well documented well tested unit tests sufficiently covering changes introduced Create pull request (PR) pull request description, please link relevant issue (), provide detailed description change, include assumptions. Address review comments, Post approval Merge PR write access. Otherwise, reviewer merge PR behalf. Pat back Congratulations! 🎉 now official contributor project! grateful contribution.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"branch-naming-convention","dir":"","previous_headings":"Pull requests","what":"Branch naming convention","title":"Contribution Guidelines","text":"Suppose changes related current issue current project; please name branch follows: _. Please use underscore (_) delimiter word separation. example, 420_fix_ui_bug suitable branch name change resolving UI-related bug reported issue number 420 current project. change affects multiple repositories, please name branches follows: __. example, 69_awesomeproject_fix_spelling_error reference issue 69 reported project awesomeproject aims resolve one spelling errors multiple (likely related) repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"monorepo-and-stageddependencies","dir":"","previous_headings":"Pull requests","what":"monorepo and staged.dependencies","title":"Contribution Guidelines","text":"Sometimes might need change upstream dependent package(s) able submit meaningful change. using staged.dependencies functionality simulate monorepo behavior. dependency configuration already specified project’s staged_dependencies.yaml file. need name feature branches appropriately. exception branch naming convention described . Please refer staged.dependencies package documentation details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"coding-guidelines","dir":"","previous_headings":"","what":"Coding guidelines","title":"Contribution Guidelines","text":"repository follows unified processes standards adopted maintainers ensure software development carried consistently within teams cohesively across repositories.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"style-guide","dir":"","previous_headings":"Coding guidelines","what":"Style guide","title":"Contribution Guidelines","text":"repository follows standard tidyverse style guide uses lintr lint checks. Customized lint configurations available repository’s .lintr file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"dependency-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency management","title":"Contribution Guidelines","text":"Lightweight right weight. repository follows tinyverse recommedations limiting dependencies minimum.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"dependency-version-management","dir":"","previous_headings":"Coding guidelines","what":"Dependency version management","title":"Contribution Guidelines","text":"code compatible (!) historical versions given dependenct package, required specify minimal version DESCRIPTION file. particular: development version requires (imports) development version another package - required put abc (>= 1.2.3.9000).","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"r--package-versions","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"R & package versions","title":"Contribution Guidelines","text":"continuously test packages newest R version along recent dependencies CRAN BioConductor. recommend working environment also set way. can find details R version packages used R CMD check GitHub Action execution log - step prints R sessionInfo(). discover bugs older R versions older set dependencies, please create relevant bug reports.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"pre-commit","dir":"","previous_headings":"Coding guidelines > Recommended development environment & tools","what":"pre-commit","title":"Contribution Guidelines","text":"highly recommend use pre-commit tool combined R hooks pre-commit execute checks committing pushing changes. Pre-commit hooks already available repository’s .pre-commit-config.yaml file.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"recognition-model","dir":"","previous_headings":"","what":"Recognition model","title":"Contribution Guidelines","text":"mentioned previously, contributions deeply valued appreciated. contribution data available part repository insights, recognize significant contribution hence add contributor package authors list, following rules enforced: Minimum 5% lines code authored* (determined git blame query) top 5 contributors terms number commits lines added lines removed* *Excluding auto-generated code, including limited roxygen comments renv.lock files. package maintainer also reserves right adjust criteria recognize contributions.","code":""},{"path":"https://insightsengineering.github.io/teal.data/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contribution Guidelines","text":"questions regarding contribution guidelines, please contact package/repository maintainer.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/SECURITY.html","id":"reporting-security-issues","dir":"","previous_headings":"","what":"Reporting Security Issues","title":"Security Policy","text":"believe found security vulnerability repositories organization, please report us coordinated disclosure. Please report security vulnerabilities public GitHub issues, discussions, pull requests. Instead, please send email vulnerability.management[@]roche.com. Please include much information listed can help us better understand resolve issue: type issue (e.g., buffer overflow, SQL injection, cross-site scripting) Full paths source file(s) related manifestation issue location affected source code (tag/branch/commit direct URL) special configuration required reproduce issue Step--step instructions reproduce issue Proof--concept exploit code (possible) Impact issue, including attacker might exploit issue information help us triage report quickly.","code":""},{"path":"https://insightsengineering.github.io/teal.data/SECURITY.html","id":"data-security-standards-dss","dir":"","previous_headings":"","what":"Data Security Standards (DSS)","title":"Security Policy","text":"Please make sure reporting issues form bug, feature, pull request, sensitive information PII, PHI, PCI completely removed text attachments, including pictures videos.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Join Keys","text":"teal.data package provides way define primary keys dataset establish relationships datasets. dataset joining keys can characterized : Columns constituting primary key; Foreign/merge keys, analogous SQL foreign keys. Typically, application developer specifies keys manually. However, datasets following ADaM standard, teal.data can automatically assign keys using default_cdisc_join_keys object. Refer section “Joining Keys ADaM Datasets” details using object select specific datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"uses-of-join_keys-class-in-teal-applications","dir":"Articles","previous_headings":"Overview","what":"Uses of join_keys class in teal applications","title":"Join Keys","text":"primary function join_keys class teal applications facilitate seamless merging datasets using teal.transform. Additionally, plays role data filtering using Filter Panel teal application. filters applied (parent) dataset also applied children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"anatomy-of-join_keys","dir":"Articles","previous_headings":"","what":"Anatomy of join_keys","title":"Join Keys","text":"join_keys object contains information foreign/primary keys multiple datasets. key represented pair datasets (name reference) named character vector encodes column name mapping two datasets. addition, foreign key may also contain parent-child attribute used “Filter Panel” mentioned . new join keys can created empty object, defining initial set primary foreign keys. initial object can extended adding/modifying/removing keys establishing parent-child relationships datasets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join_keys----join-keys-constructor-getter-setter","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_keys(...): Join Keys Constructor / Getter / Setter","title":"Join Keys","text":"Convenient function used constructor getter join_keys objects. Getter used retrieve joining keys contained objects, teal_data object. Constructor used specify collection multiple individual keys (via join_key function described ).","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join_keydataset_1-dataset_2-key-parent-single-join-key-constructor","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"join_key(dataset_1, dataset_2, key, parent): Single Join Key Constructor","title":"Join Keys","text":"Specifies primary key relationship two datasets. dataset_1, dataset_2: names datasets (dataset_2 dataset_1 omitted, creates primary key); key: named character vector column name mapping datasets (unnamed vector assumes column names datasets ); directed (optional): flag indicates whether parent-child directed relationship dataset_2 dataset_1 (latter parent). Note join keys assumed symmetric, .e., join_key(\"ds1\", \"ds2\", c(\"ds1_col\" = \"ds2_col\")) establishes relationship “x” “y” vice versa. default, new joining key set dataset_1 parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"example-output","dir":"Articles","previous_headings":"Anatomy of join_keys","what":"Example & Output","title":"Join Keys","text":"","code":"library(teal.data) jk <- join_keys( join_key(\"ds1\", keys = \"col_1\"), # ds1: [col_1] join_key(\"ds2\", keys = c(\"col_1\", \"col_2\")), # ds2: [col_1, col_2] join_key(\"ds3\", keys = c(\"col_1\", \"col_3\")), # ds3: [col_1, col_3] join_key(\"ds1\", \"ds2\", keys = \"col_1\"), # ds1 <-- ds2 join_key(\"ds1\", \"ds3\", keys = \"col_1\"), # ds1 <-- ds3 join_key(\"ds4\", \"ds5\", keys = c(\"col_4\" = \"col_5\"), directed = FALSE) # ds4 <--> ds5 ) # The parent-child relationships are created automatically (unless 'parent' parameter is \"none\") jk"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"accessing-and-modifying-keys","dir":"Articles","previous_headings":"","what":"Accessing and Modifying keys","title":"Join Keys","text":"subset operator 2 indices (x[, j]) used retrieve primary/foreign keys. indices must string denoting dataset name. Note symmetry keys ds4 ds5 relationship: 1 argument used operator return join_keys object filtered accordingly. Modifying adding key uses notation assignment operator <-. symmetric relationship created automatically, parent (default) dataset defined first index. Assigning NULL value delete relationship.","code":"# Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting foreign keys between \"ds4\" and \"ds5\" jk[\"ds4\", \"ds5\"] ## col_4 ## \"col_5\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" jk[\"ds5\", \"ds4\"] ## col_5 ## \"col_4\" # Using the jk object defined in \"Anatomy of Join Keys\" jk ## A join_keys object containing foreign keys between 5 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## <-- ds3: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] ## --* (implicit via parent with): ds3 ## ds3: [col_1, col_3] ## --> ds1: [col_1] ## --* (implicit via parent with): ds2 ## ds4: [no primary keys] ## <-> ds5: [col_5] ## ds5: [no primary keys] ## <-> ds4: [col_4] # Getting primary key of \"ds1\" jk[\"ds1\", \"ds1\"] ## col_1 ## \"col_1\" # Getting keys of \"ds1\" and \"ds2\" jk[c(\"ds1\", \"ds2\")] ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1, col_2] ## --> ds1: [col_1] # Adding a new ds5 <-- ds1 key jk[\"ds1\", \"ds5\"] <- \"a_column\" # Removing an existing key jk[\"ds4\", \"ds5\"] <- NULL"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"merging-join-keys","dir":"Articles","previous_headings":"","what":"Merging Join Keys","title":"Join Keys","text":"combining multiple joining keys achieved using c() generic function, generates symmetric valid join_keys object. encountering identical relationship pairs, operation retains last occurrence pair within specified argument order. added convenience, function also accommodates join_key_set objects created join_key function. objects can provided initial argument position needed.","code":"jk1 <- join_keys(join_key(\"ds1\", \"ds1\", \"col_1\")) jk2 <- join_keys(join_key(\"ds2\", \"ds2\", \"col_1\"), join_key(\"ds1\", \"ds2\", \"col_1\")) # Merging c(jk1, jk2) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_1] ## ds2: [col_1] ## --> ds1: [col_1] # Keeping last occurence c(jk1, jk2, join_keys(join_key(\"ds2\", \"ds2\", \"col_2\"), join_key(\"ds1\", \"ds2\", c(\"col_1\" = \"col_2\")))) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## <-- ds2: [col_2] ## ds2: [col_2] ## --> ds1: [col_1] # Merges join_key and join_key_set objects (from join_key function) c(jk1, join_key(\"ds3\", \"ds3\", \"col_3\")) ## A join_keys object containing foreign keys between 2 datasets: ## ds1: [col_1] ## ds3: [col_3]"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join-keys-relationships","dir":"Articles","previous_headings":"","what":"Join Keys Relationships","title":"Join Keys","text":"2 types relationships encoded joining keys described following sections. primary foreign keys created explicitly using constructor individual keys (join_key). Additionally, join_keys object infers implicit relationships two datasets share foreign keys parent dataset, . implicit relationships available just like another foreign key can used merge datasets, despite defined user.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"primary-key-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Primary Key with teal_data","title":"Join Keys","text":"using teal_data function, simplest method define join keys use join_keys argument. can specify column(s) dataset (together) uniquely identify rows dataset. can extend previous example define primary keys multiple datasets:","code":"library(teal.data) td_pk <- within( teal_data(), ds1 <- transform(iris, id = seq_len(nrow(iris))) ) datanames(td_pk) <- \"ds1\" join_keys(td_pk) <- join_keys(join_key(\"ds1\", keys = \"id\")) join_keys(td_pk) ## A join_keys object containing foreign keys between 1 datasets: ## ds1: [id] td_pk <- within( td_pk, { ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_pk) <- c(datanames(td_pk), \"ds2\", \"ds3\") join_keys(td_pk)[\"ds2\", \"ds2\"] <- c(\"V\", \"W\") join_keys(td_pk)[\"ds3\", \"ds3\"] <- c(\"V\", \"W\") join_keys(td_pk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [id] ## ds2: [V, W] ## ds3: [V, W]"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"foreign-keys-with-teal_data","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Foreign Keys with teal_data","title":"Join Keys","text":"passing multiple datasets teal_data function, dataset relationships set using join_keys join_key functions, can used merge datasets together within teal apps. users familiar SQL database schema, relationships symmetric strict SQL foreign key relationships teal validate whether values defined foreign key columns present table. example:","code":"library(teal.data) td_fk <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) } ) datanames(td_fk) <- c(\"ds1\", \"ds2\", \"ds3\") join_keys(td_fk) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")) ) join_keys(td_fk) ## A join_keys object containing foreign keys between 3 datasets: ## ds1: [X] ## <-- ds2: [W] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## ds3: [V] ## --> ds2: [V]"},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"implicit-relationships","dir":"Articles","previous_headings":"Join Keys Relationships","what":"Implicit Relationships","title":"Join Keys","text":"Two datasets share common foreign keys parent dataset implicit relationship modeled accessible joining keys. special relationship inferred existing foreign keys. need explicitly defined can accessed overwritten just foreign key. implicit relationships can used merge 2 datasets together, just defined manually. Note definition contains join_key \"ds2\" <-> \"ds4\"","code":"library(teal.data) td <- within( teal_data(), { ds1 <- data.frame(X = 1:10, Y = 21:30, Z = 1:10) ds2 <- data.frame(W = 10:1, V = 5:14, M = rep(1:5, 2)) ds3 <- data.frame(V = 5:14, N = 4) ds4 <- data.frame(V = 5:14, R = rnorm(10)) } ) datanames(td) <- c(\"ds1\", \"ds2\", \"ds3\", \"ds4\") join_keys(td) <- join_keys( # Primary keys join_key(\"ds1\", keys = c(\"X\")), join_key(\"ds2\", keys = c(\"V\", \"W\")), join_key(\"ds3\", keys = c(\"V\")), join_key(\"ds4\", keys = c(\"V\")), # Foreign keys join_key(\"ds1\", \"ds2\", c(\"X\" = \"W\")), join_key(\"ds2\", \"ds3\", c(\"V\" = \"V\")), join_key(\"ds1\", \"ds4\", c(\"X\" = \"B\")) ) join_keys(td) ## A join_keys object containing foreign keys between 4 datasets: ## ds1: [X] ## <-- ds2: [W] ## <-- ds4: [B] ## ds2: [V, W] ## --> ds1: [X] ## <-- ds3: [V] ## --* (implicit via parent with): ds4 ## ds3: [V] ## --> ds2: [V] ## ds4: [V] ## --> ds1: [X] ## --* (implicit via parent with): ds2 join_keys(td)[\"ds2\", \"ds4\"] ## W ## \"B\""},{"path":"https://insightsengineering.github.io/teal.data/articles/join-keys.html","id":"join-keys-in-adam-datasets","dir":"Articles","previous_headings":"","what":"Join Keys in ADaM Datasets","title":"Join Keys","text":"teal.data provides set default join keys (primary foreign) datasets named according ADaM standard. stored default_cdisc_join_keys. default keys required users can select smaller set datasets subsetting (example: default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\")]). Please note, every element selected, parent also returned (one) well pair-wise relationships resulting selection.","code":"names(default_cdisc_join_keys) |> sort() ## [1] \"ADAE\" \"ADAETTE\" \"ADCM\" \"ADCSSRS\" \"ADDV\" \"ADEG\" ## [7] \"ADEQ5D5L\" \"ADEX\" \"ADHY\" \"ADLB\" \"ADMH\" \"ADQLQC\" ## [13] \"ADQS\" \"ADRS\" \"ADSAFTTE\" \"ADSL\" \"ADSUB\" \"ADTTE\" ## [19] \"ADVS\" default_cdisc_join_keys ## A join_keys object containing foreign keys between 19 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADAE: [STUDYID, USUBJID] ## <-- ADEG: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADAETTE: [STUDYID, USUBJID] ## <-- ADCM: [STUDYID, USUBJID] ## <-- ADEX: [STUDYID, USUBJID] ## <-- ADLB: [STUDYID, USUBJID] ## <-- ADMH: [STUDYID, USUBJID] ## <-- ADQS: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## <-- ADSAFTTE: [STUDYID, USUBJID] ## <-- ADVS: [STUDYID, USUBJID] ## <-- ADDV: [STUDYID, USUBJID] ## <-- ADSUB: [STUDYID, USUBJID] ## <-- ADHY: [STUDYID, USUBJID] ## <-- ADQLQC: [STUDYID, USUBJID] ## <-- ADCSSRS: [STUDYID, USUBJID] ## <-- ADEQ5D5L: [STUDYID, USUBJID] ## ADAE: [STUDYID, USUBJID, ASTDTM, AETERM, AESEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEG: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADAETTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADCM: [STUDYID, USUBJID, ASTDTM, CMSEQ, ATC1CD, ATC2CD, ATC3CD, ATC4CD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADEX: [STUDYID, USUBJID, PARCAT1, PARAMCD, AVISITN, ASTDTM, EXSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADLB: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADMH: [STUDYID, USUBJID, ASTDTM, MHSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSAFTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADVS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADDV: [STUDYID, USUBJID, ASTDT, DVTERM, DVSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADSUB, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADSUB: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADHY, ADQLQC, ADCSSRS, ADEQ5D5L ## ADHY: [STUDYID, USUBJID, PARAMCD, AVISITN, ADTM, SRCSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADQLQC, ADCSSRS, ADEQ5D5L ## ADQLQC: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADCSSRS, ADEQ5D5L ## ADCSSRS: [STUDYID, USUBJID, PARAMCD, BASETYPE, AVISITN, DTYPE, ADTM] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADEQ5D5L ## ADEQ5D5L: [STUDYID, USUBJID, PARCAT1N, PARAMCD, BASETYPE, AVISITN, ATPTN, ADTM, QSSEQ] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADAE, ADEG, ADTTE, ADAETTE, ADCM, ADEX, ADLB, ADMH, ADQS, ADRS, ADSAFTTE, ADVS, ADDV, ADSUB, ADHY, ADQLQC, ADCSSRS default_cdisc_join_keys[\"ADSL\"] ## A join_keys object containing foreign keys between 1 datasets: ## ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[\"ADTTE\"] ## A join_keys object containing foreign keys between 2 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ## A join_keys object containing foreign keys between 3 datasets: ## ADSL: [STUDYID, USUBJID] ## <-- ADTTE: [STUDYID, USUBJID] ## <-- ADRS: [STUDYID, USUBJID] ## ADTTE: [STUDYID, USUBJID, PARAMCD] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADRS ## ADRS: [STUDYID, USUBJID, PARAMCD, AVISIT] ## --> ADSL: [STUDYID, USUBJID] ## --* (implicit via parent with): ADTTE"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"reproducibility-of-teal_data-objects","dir":"Articles","previous_headings":"","what":"Reproducibility of teal_data objects","title":"teal_data reproducibility","text":"Reproducibility primary function qenv class, teal_data inherits . Every data modification teal_data object performed encapsulated environment, separate global environment. important note reproducibility object limited data-code relationship. aspects reliability data source, reproducibility R session (including package versions), creation use objects environments (e.g. .GlobalEnv) verified properly teal_data. advisable always begin analysis new session run code pertains analysis within teal_data object.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"verification-status","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification status","title":"teal_data reproducibility","text":"Every teal_data object verification status, statement whether contents env can reproduced code. perspective, teal_data objects instantiated empty verified ones instantiated data code unverified code need reproducible. Obviously, teal_data objects instantiated data unverified well. evaluating code teal_data object, code stored code executed, reproducible definition. Therefore, evaluating code teal_data object change verification status. verification status always printed inspecting teal_data object. Also, retrieving code, unverified objects add warning code stating passed verification.","code":"library(teal.data) data_empty <- teal_data() data_empty # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: data_empty <- within(data_empty, i <- head(iris)) data_empty # remains verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- teal_data(i = head(iris), code = \"i <- head(iris)\") data_with_data # is unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L] data_with_data <- within(data_with_data, i$rand <- sample(nrow(i))) data_with_data # remains unverified ## ✖ unverified teal_data object ## [L] ## Parent: ## Bindings: ## • i: [L]"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"verification-process","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification","what":"Verification process","title":"teal_data reproducibility","text":"order confirm code stored teal_data exactly reproduces contents environment, one must run verify() function. causes code evaluated results compared contents environment. code executes without errors results contents already present environment, verification successful object’s state changed verified. Otherwise error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"verified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"verified","title":"teal_data reproducibility","text":"","code":"library(teal.data) data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) data_right <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) data$id <- seq_len(nrow(data)) }) ) # is unverified (data_right_verified <- verify(data_right)) # returns verified object ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"unverified","dir":"Articles","previous_headings":"Reproducibility of teal_data objects > Verification > Verification process","what":"unverified","title":"teal_data reproducibility","text":"","code":"data_wrong <- teal_data( data = data, code = quote({ data <- data.frame(x = 11:20) }) ) verify(data_wrong) # fails verification, raises error ## Error: Code verification failed. ## Object(s) recreated with code that have different structure in data_wrong: ## • data"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"retrieving-code","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Retrieving code","title":"teal_data reproducibility","text":"get_code function used retrieve code stored teal_data object. simple get_code() return entirety code using names argument allows obtaining subset code deals objects stored teal_data. Note retrieving code specific dataset, result code used create dataset, code uses .","code":"library(teal.data) data <- within(teal_data(), { i <- iris m <- mtcars head(i) }) cat(get_code(data)) # retrieve all code ## i <- iris ## m <- mtcars ## head(i) cat(get_code(data, names = \"i\")) # retrieve code for `i` ## i <- iris"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data-reproducibility.html","id":"tracking-object-dependencies","dir":"Articles","previous_headings":"Reproducibility of teal_data objects","what":"Tracking object dependencies","title":"teal_data reproducibility","text":"Calling get_code datanames specified initiates analysis stored code, object dependencies automatically discovered. object x created expression uses object y, lines create object y must also returned. quite effective objects created simple assignments like x <- foo(y). However, rare cases discovering dependencies impossible, e.g. opening connections databases objects created side effects (functions acting calling environment implicitly rather returning value assigned). cases code author must manually tag code lines required dataset adding special comment lines: # @linksto x cause line included retrieving code x. See ?get_code detailed explanation examples.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Introduction to teal.data","text":"teal.data package specifies data format used teal applications. teal_data class inherits qenv meant used reproducibility purposes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"quick-start","dir":"Articles","previous_headings":"Introduction","what":"Quick Start","title":"Introduction to teal.data","text":"create object class teal_data, use teal_data function. teal_data number methods manage relevant information private class slots.","code":"library(teal.data) # create teal_data object my_data <- teal_data() # run code within teal_data to create data objects my_data <- within( my_data, { data1 <- data.frame(id = 1:10, x = 11:20) data2 <- data.frame(id = 1:10, x = 21:30) } ) # get objects stored in teal_data my_data[[\"data1\"]] my_data[[\"data1\"]] # get reproducible code get_code(my_data) # get or set datanames datanames(my_data) <- c(\"data1\", \"data2\") datanames(my_data) # print print(my_data)"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"teal_data-characteristics","dir":"Articles","previous_headings":"Introduction","what":"teal_data characteristics","title":"Introduction to teal.data","text":"teal_data object keeps following information: env - environment containing data. code - string containing code reproduce env (details reproducibility). datanames - character vector listing objects interest teal modules (details teal vignette). join_keys - join_keys object defining relationships datasets (details Join Keys).","code":""},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"reproducibility","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Reproducibility","title":"Introduction to teal.data","text":"primary function teal_data provide reproducibility data. recommend initialize empty teal_data, marks object verified, create datasets evaluating code object, using within eval_code. Read teal_data Reproducibility.","code":"my_data <- teal_data() my_data <- within(my_data, data <- data.frame(x = 11:20)) my_data <- within(my_data, data$id <- seq_len(nrow(data))) my_data # is verified ## ✅︎ verified teal_data object ## [L] ## Parent: ## Bindings: ## • data: [L]"},{"path":"https://insightsengineering.github.io/teal.data/articles/teal-data.html","id":"relational-data-models","dir":"Articles","previous_headings":"Introduction > teal_data characteristics","what":"Relational data models","title":"Introduction to teal.data","text":"teal_data class supports relational data. Relationships datasets can described joining keys stored teal_data object. relationships can read set join_keys function. See join_keys.","code":"my_data <- teal_data() my_data <- within(my_data, { data <- data.frame(id = 1:10, x = 11:20) child <- data.frame(id = 1:20, data_id = c(1:10, 1:10), y = 21:30) }) join_keys(my_data) <- join_keys( join_key(\"data\", \"data\", key = \"id\"), join_key(\"child\", \"child\", key = \"id\"), join_key(\"child\", \"data\", key = c(\"data_id\" = \"id\")) ) join_keys(my_data) ## A join_keys object containing foreign keys between 2 datasets: ## child: [id] ## <-- data: [id] ## data: [id] ## --> child: [data_id]"},{"path":"https://insightsengineering.github.io/teal.data/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dawid Kaledkowski. Author, maintainer. Aleksander Chlebowski. Author. Marcin Kosinski. Author. Andre Verissimo. Author. Pawel Rucki. Author. Mahmoud Hallal. Author. Nikolas Burkoff. Author. Maciej Nasinski. Author. Konrad Pagacz. Author. Junlue Zhao. Author. Chendi Liao. Reviewer. Dony Unardi. Reviewer. F. Hoffmann-La Roche AG. Copyright holder, funder.","code":""},{"path":"https://insightsengineering.github.io/teal.data/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kaledkowski D, Chlebowski , Kosinski M, Verissimo , Rucki P, Hallal M, Burkoff N, Nasinski M, Pagacz K, Zhao J (2024). teal.data: Data Model 'teal' Applications. R package version 0.6.0.9014, https://github.com/insightsengineering/teal.data/, https://insightsengineering.github.io/teal.data/.","code":"@Manual{, title = {teal.data: Data Model for 'teal' Applications}, author = {Dawid Kaledkowski and Aleksander Chlebowski and Marcin Kosinski and Andre Verissimo and Pawel Rucki and Mahmoud Hallal and Nikolas Burkoff and Maciej Nasinski and Konrad Pagacz and Junlue Zhao}, year = {2024}, note = {R package version 0.6.0.9014, https://github.com/insightsengineering/teal.data/}, url = {https://insightsengineering.github.io/teal.data/}, }"},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"tealdata","dir":"","previous_headings":"","what":"Data Model for teal Applications","title":"Data Model for teal Applications","text":"package used create data needed teal applications. data can : Independent data frames CDISC data (clinical trial reporting) Relational data MultiAssayExperiment objects package provides: mechanism pulling data existing systems ability mutate (.e. pre-process) data record operations used create data enable reproducibility","code":""},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Data Model for teal Applications","text":"Alternatively, might want use development version.","code":"install.packages('teal.data') # install.packages(\"pak\") pak::pak(\"insightsengineering/teal.data\")"},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Data Model for teal Applications","text":"understand use package, please refer Introduction teal.data article, provides multiple examples code implementation. showcase example usage.","code":"library(teal.data) # quick start for clinical trial data my_data <- cdisc_data( ADSL = example_cdisc_data(\"ADSL\"), ADTTE = example_cdisc_data(\"ADTTE\"), code = quote({ ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) ) # or my_data <- within(teal_data(), { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") }) datanames <- c(\"ADSL\", \"ADTTE\") datanames(my_data) <- datanames join_keys(my_data) <- default_cdisc_join_keys[datanames] # quick start for general data my_general_data <- within(teal_data(), { iris <- iris mtcars <- mtcars }) # reproducibility check data <- teal_data(iris = iris, code = \"iris <- mtcars\") verify(data) #> Error: Code verification failed. #> Object(s) recreated with code that have different structure in data: #> • iris # code extraction iris2_data <- within(teal_data(), {iris2 <- iris[1:6, ]}) get_code(iris2_data) #> \"iris2 <- iris[1:6, ]\""},{"path":"https://insightsengineering.github.io/teal.data/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Data Model for teal Applications","text":"encounter bug feature request, please file issue. questions, discussions, staying date, please use teal channel pharmaverse slack workspace.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated TealData class and related functions — TealData","title":"Deprecated TealData class and related functions — TealData","text":"TealData class associated functions deprecated. Use teal_data() instead. See Migration guide details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated TealData class and related functions — TealData","text":"","code":"as_cdisc(...) callable_code(...) callable_function(...) code_dataset_connector(...) code_cdisc_dataset_connector(...) csv_dataset_connector(...) csv_cdisc_dataset_connector(...) python_code(...) python_dataset_connector(...) python_cdisc_dataset_connector(...) cdisc_data_connector(...) cdisc_dataset(...) cdisc_dataset_connector(...) cdisc_dataset_connector_file(...) cdisc_dataset_file(...) dataset(...) dataset_connector(...) dataset_connector_file(...) dataset_file(...) data_connection(...) fun_dataset_connector(...) fun_cdisc_dataset_connector(...) relational_data_connector(...) mae_dataset(...) get_attrs(...) get_dataset_label(...) get_dataset(...) get_datasets(...) get_dataname(...) get_key_duplicates(...) get_keys(...) get_raw_data(...) is_pulled(...) load_dataset(...) load_datasets(...) mutate_data(...) mutate_dataset(...) set_args(...) rds_dataset_connector(...) rds_cdisc_dataset_connector(...) script_dataset_connector(...) script_cdisc_dataset_connector(...) set_keys(...) read_script(...) to_relational_data(...) validate_metadata(...) get_cdisc_keys(...) cdisc_data_file(...) teal_data_file(...) get_join_keys(...) get_join_keys(...) <- value"},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated TealData class and related functions — TealData","text":"... argument supported TealData related functions. value value assign","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/TealData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Deprecated TealData class and related functions — TealData","text":"nothing","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Test if two objects are (nearly) equal — all.equal.join_keys","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":".equal(target, current) utility compare join_keys objects target current testing near equality.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"","code":"# S3 method for class 'equal.join_keys' all(target, current, ...)"},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"target R object. current R object, compared target. ... arguments different methods. used join_keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/all.equal.join_keys.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test if two objects are (nearly) equal — all.equal.join_keys","text":"different, comparison still made extent, report differences returned. use .equal directly expressions—either use isTRUE(.equal(....)) identical appropriate. parents attribute comparison tolerates NULL empty lists find difference. list containing relationships treated like map ignores entries NULL exist.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Compatibility of keys — assert_compatible_keys","title":"Check Compatibility of keys — assert_compatible_keys","text":"Helper function assert two key sets contain incompatible keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Compatibility of keys — assert_compatible_keys","text":"","code":"assert_compatible_keys(join_key_1, join_key_2)"},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Compatibility of keys — assert_compatible_keys","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys2.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify key set compatibility — assert_compatible_keys2","title":"Verify key set compatibility — assert_compatible_keys2","text":"Helper function ensuring compatibility two sets keys","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify key set compatibility — assert_compatible_keys2","text":"","code":"assert_compatible_keys2(x, y)"},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_compatible_keys2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify key set compatibility — assert_compatible_keys2","text":"Returns TRUE successful, otherwise raises error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate parent-child key — assert_parent_child","title":"Validate parent-child key — assert_parent_child","text":"Helper function checks parent-child relations valid.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate parent-child key — assert_parent_child","text":"","code":"assert_parent_child(x)"},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate parent-child key — assert_parent_child","text":"x (join_keys) object assert validity relations","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/assert_parent_child.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate parent-child key — assert_parent_child","text":"join_keys invisibly","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Data input for teal app — cdisc_data","title":"Data input for teal app — cdisc_data","text":"Function wrapper around teal_data() guesses join_keys given datasets whose names match ADAM datasets names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data input for teal app — cdisc_data","text":"","code":"cdisc_data( ..., join_keys = teal.data::default_cdisc_join_keys[names(rlang::list2(...))], code = character(0), check )"},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Data input for teal app — cdisc_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty automatically derived basing intersection datasets primary keys. ADAM datasets automatically derived. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Data input for teal app — cdisc_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Data input for teal app — cdisc_data","text":"function checks keys added data sets.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/cdisc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Data input for teal app — cdisc_data","text":"","code":"data <- cdisc_data( join_keys = join_keys( join_key(\"ADSL\", \"ADTTE\", c(\"STUDYID\" = \"STUDYID\", \"USUBJID\" = \"USUBJID\")) ) ) data <- within(data, { ADSL <- example_cdisc_data(\"ADSL\") ADTTE <- example_cdisc_data(\"ADTTE\") })"},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":null,"dir":"Reference","previous_headings":"","what":"Variable labels — col_labels","title":"Variable labels — col_labels","text":"Get set variable labels data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variable labels — col_labels","text":"","code":"col_labels(x, fill = FALSE) col_labels(x) <- value col_relabel(x, ...) get_labels(...)"},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Variable labels — col_labels","text":"functions taken formatters package, reduce complexity dependency tree rewritten.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Variable labels — col_labels","text":"x (data.frame DataFrame) data object fill (logical(1)) specifying return variable label value (character) vector variable labels length equal number columns x; named, names must match variable names x used key set labels; use NA remove label variable ... name-value pairs, name corresponds variable name x value new variable label; use NA remove label variable","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Variable labels — col_labels","text":"col_labels, named character vector variable labels, names corresponding variable names. label attribute missing, vector elements variable names fill = TRUE NA fill = FALSE. col_labels<- col_relabel, copy x variable labels modified.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Variable labels — col_labels","text":"Variable labels can stored label attribute set individual variables. functions get set attribute, either (col_labels) variables (col_relabel). previous versions teal.data labels managed get_labels(). function deprecated 0.4.0, use col_labels instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/col_labels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Variable labels — col_labels","text":"","code":"x <- iris col_labels(x) #> Sepal.Length Sepal.Width Petal.Length Petal.Width Species #> NA NA NA NA NA col_labels(x) <- paste(\"label for\", names(iris)) col_labels(x) #> Sepal.Length Sepal.Width Petal.Length #> \"label for Sepal.Length\" \"label for Sepal.Width\" \"label for Petal.Length\" #> Petal.Width Species #> \"label for Petal.Width\" \"label for Species\" y <- col_relabel(x, Sepal.Length = \"Sepal Length of iris flower\") col_labels(y) #> Sepal.Length Sepal.Width #> \"Sepal Length of iris flower\" \"label for Sepal.Width\" #> Petal.Length Petal.Width #> \"label for Petal.Length\" \"label for Petal.Width\" #> Species #> \"label for Species\""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":null,"dir":"Reference","previous_headings":"","what":"Names of data sets in teal_data object — datanames","title":"Names of data sets in teal_data object — datanames","text":"Get set value datanames slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Names of data sets in teal_data object — datanames","text":"","code":"datanames(x) datanames(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Names of data sets in teal_data object — datanames","text":"x (teal_data) object access modify value (character) new value @datanames; elements must names variables existing @env","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Names of data sets in teal_data object — datanames","text":"contents @datanames teal_data object updated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Names of data sets in teal_data object — datanames","text":"@datanames slot teal_data object specifies variables stored environment (@env slot) data sets taken consideration. contents @datanames can specified upon creation default variables @env. Variables created later, may well data sets, automatically considered . Use function update slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/datanames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Names of data sets in teal_data object — datanames","text":"","code":"td <- teal_data(iris = iris) td <- within(td, mtcars <- mtcars) datanames(td) #> [1] \"iris\" datanames(td) <- c(\"iris\", \"mtcars\") datanames(td) #> [1] \"iris\" \"mtcars\""},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"data object created loading time cdisc_datasets/cdisc_datasets.yaml.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"","code":"default_cdisc_join_keys"},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"object class join_keys (inherits list) length 19.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/default_cdisc_join_keys.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"List containing default joining keys for CDISC datasets — default_cdisc_join_keys","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sample CDISC datasets — example_cdisc_data","title":"Generate sample CDISC datasets — example_cdisc_data","text":"Retrieves example CDISC datasets use examples testing.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sample CDISC datasets — example_cdisc_data","text":"","code":"example_cdisc_data( dataname = c(\"ADSL\", \"ADAE\", \"ADLB\", \"ADCM\", \"ADEX\", \"ADRS\", \"ADTR\", \"ADTTE\", \"ADVS\") )"},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sample CDISC datasets — example_cdisc_data","text":"dataname (character(1)) name CDISC dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sample CDISC datasets — example_cdisc_data","text":"CDISC dataset data.frame.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/example_cdisc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate sample CDISC datasets — example_cdisc_data","text":"function returns dummy dataset used within teal.data. Note datasets created maintained teal.data, retrieved dependencies.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Get code from teal_data object — get_code,teal_data-method","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"# S4 method for class 'teal_data' get_code( object, deparse = TRUE, names = NULL, datanames = lifecycle::deprecated(), ... )"},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get code from teal_data object — get_code,teal_data-method","text":"object (teal_data) deparse (logical) flag specifying whether return code character (deparse = TRUE) expression (deparse = FALSE). names (character) Successor datanames. Vector dataset names return code . details see \"Extracting dataset-specific code\" section. datanames (character) vector dataset names return code . details see \"Extracting dataset-specific code\" section. Use names instead. ... Parameters passed internal methods. Currently, supported parameter check_names (logical(1)) flag, TRUE default. Function warns missing objects, exist code passed datanames. remove warning, set check_names = FALSE.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get code from teal_data object — get_code,teal_data-method","text":"Either character string expression. names used request specific dataset, code creates dataset (code uses ) returned. Otherwise, contents @code.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get code from teal_data object — get_code,teal_data-method","text":"Retrieve code stored @code, (principle) can used recreate objects found @env. Use names limit code one datasets enumerated @datanames.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"extracting-dataset-specific-code","dir":"Reference","previous_headings":"","what":"Extracting dataset-specific code","title":"Get code from teal_data object — get_code,teal_data-method","text":"names specified, code returned limited lines needed create requested datasets. code stored @code slot analyzed statically determine lines datasets interest depend upon. analysis works well objects created standard infix assignment operators (see ?assignOps) can fail situations. Consider following examples: Case 1: Usual assignments. x dependencies, get_code(data, names = \"x\") return second call.y depends x foo, get_code(data, names = \"y\") contain three calls. Case 2: objects created function's side effects. , y depends x x modified foo side effect (reassignment) get_code(data, names = \"y\") return foo() call. overcome limitation, code dependencies can specified manually. Lines side effects occur can flagged adding \"# @linksto \" end. Note within evaluates code passed expr comments ignored. order include comments code one must use eval_code function instead. Now foo() call properly included code required recreate y. Note two functions create objects side effects, assign data, handled automatically. known cases manual tagging necessary: non-standard assignment operators, e.g. %<>% objects used conditions statements: () objects used iterate loops: () creating evaluating language objects, e.g. eval()","code":"data <- teal_data() |> within({ foo <- function(x) { x + 1 } x <- 0 y <- foo(x) }) get_code(data, names = \"y\") data <- teal_data() |> within({ foo <- function() { x <<- x + 1 } x <- 0 foo() y <- x }) get_code(data, names = \"y\") data <- teal_data() |> eval_code(\" foo <- function() { x <<- x + 1 } x <- 0 foo() # @linksto x y <- x \") get_code(data, names = \"y\")"},{"path":"https://insightsengineering.github.io/teal.data/reference/get_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get code from teal_data object — get_code,teal_data-method","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) get_code(tdata1) #> [1] \"a <- 1\\nb <- a^5\\nc <- list(x = 2)\" get_code(tdata1, names = \"a\") #> [1] \"a <- 1\" get_code(tdata1, names = \"b\") #> [1] \"a <- 1\\nb <- a^5\" tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") get_code(tdata2) #> [1] \"x1 <- iris\" get_code(verify(tdata2)) #> [1] \"x1 <- iris\""},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"Checks whether graph Directed Acyclic Graph (DAG)","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"","code":"is_dag(graph)"},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/is_dag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether a graph is a Directed Acyclic Graph (DAG) — is_dag","text":"logical(1) TRUE graph DAG; FALSE otherwise","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a relationship between a pair of datasets — join_key","title":"Create a relationship between a pair of datasets — join_key","text":"Create relationship two datasets, dataset_1 dataset_2. default, function establishes directed relationship dataset_1 parent. dataset_2 specified, function creates primary key dataset_1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(dataset_1, dataset_2 = dataset_1, keys, directed = TRUE)"},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a relationship between a pair of datasets — join_key","text":"dataset_1, dataset_2 (character(1)) Dataset names. dataset_2 omitted, primary key dataset_1 created. keys (optionally named character) Column mapping datasets, names(keys) maps columns dataset_1 corresponding columns dataset_2 given elements keys. unnamed, column names used datasets. element keys vector empty non-empty name, name used datasets. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a relationship between a pair of datasets — join_key","text":"object class join_key_set passed join_keys function.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/join_key.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a relationship between a pair of datasets — join_key","text":"","code":"join_key(\"d1\", \"d2\", c(\"A\")) #> $d1 #> $d1$d2 #> A #> \"A\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\")) #> $d1 #> $d1$d2 #> A #> \"B\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #> join_key(\"d1\", \"d2\", c(\"A\" = \"B\", \"C\")) #> $d1 #> $d1$d2 #> A C #> \"B\" \"C\" #> #> #> attr(,\"class\") #> [1] \"join_key_set\" #> attr(,\"parents\") #> attr(,\"parents\")$d2 #> [1] \"d1\" #>"},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage relationships between datasets using join_keys — join_keys","title":"Manage relationships between datasets using join_keys — join_keys","text":"Facilitates creation retrieval relationships datasets. join_keys class extends list contains keys connecting pairs datasets. element list contains keys specific dataset. dataset can relationship (primary key) datasets. Note join_keys list symmetrical assumes default direction, : keys set ds1 ds2, defines ds1 parent parent-child relationship mapping automatically mirrored ds2 ds1.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"## Constructor, getter and setter join_keys(...) # Default S3 method join_keys(...) # S3 method for class 'join_keys' join_keys(...) # S3 method for class 'teal_data' join_keys(...) # S3 method for class 'join_keys' x[i, j] # S3 method for class 'join_keys' x[i, j, directed = TRUE] <- value # S3 method for class 'join_keys' c(...) # S3 method for class 'join_key_set' c(...) join_keys(x) <- value # S3 method for class 'join_keys' join_keys(x) <- value # S3 method for class 'teal_data' join_keys(x) <- value # S3 method for class 'join_keys' format(x, ...) # S3 method for class 'join_keys' print(x, ...)"},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage relationships between datasets using join_keys — join_keys","text":"... optional, either teal_data join_keys object extract join_keys number join_key_set objects create join_keys nothing create empty join_keys x (join_keys) empty object set new relationship pairs. x typically object join_keys class. called join_keys(x) join_keys(x) <- value can also take supported class (teal_data, join_keys) , j indices specifying elements extract replace. Index character vector, can also take numeric, logical, NULL missing. directed (logical(1)) Flag indicates whether create parent-child relationship datasets. TRUE (default) dataset_1 parent dataset_2; FALSE relationship undirected. value x[, j, directed = TRUE)] <- value (named/unnamed character) Column mapping datasets. join_keys(x) <- value: (join_key_set list join_key_set) relationship pairs add join_keys list. [, j, directed = TRUE)]: R:,%20j,%20directed%20=%20TRUE)","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Manage relationships between datasets using join_keys — join_keys","text":"join_keys(): Returns empty join_keys object called without arguments. join_keys(join_keys): Returns . join_keys(teal_data): Returns join_keys object contained teal_data object. join_keys(...): Creates new object one join_key_set parameters.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Manage relationships between datasets using join_keys — join_keys","text":"x[datanames]: Returns subset join_keys object given datanames, including parent datanames symmetric mirror keys datanames result. x[, j]: Returns join keys datasets j, including implicit keys inferred relationship parent. x[, j] <- value: Assignment key pair (, j). x[] <- value: (without j parameter) supported operation join_keys. join_keys(x)[, j] <- value: Assignment join_keys object stored x, teal_data object join_keys object . join_keys(x) <- value: Assignment join_keys object value. value needs object class join_keys join_key_set.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/join_keys.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage relationships between datasets using join_keys — join_keys","text":"","code":"# Creating a new join keys ---- jk <- join_keys( join_key(\"ds1\", \"ds1\", \"pk1\"), join_key(\"ds2\", \"ds2\", \"pk2\"), join_key(\"ds3\", \"ds3\", \"pk3\"), join_key(\"ds1\", \"ds2\", c(pk1 = \"pk2\")), join_key(\"ds1\", \"ds3\", c(pk1 = \"pk3\")) ) jk #> A join_keys object containing foreign keys between 3 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> <-- ds3: [pk3] #> ds2: [pk2] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3 #> ds3: [pk3] #> --> ds1: [pk1] #> --* (implicit via parent with): ds2 # Getter for join_keys --- jk[\"ds1\", \"ds2\"] #> pk1 #> \"pk2\" # Subsetting join_keys ---- jk[\"ds1\"] #> A join_keys object containing foreign keys between 1 datasets: #> ds1: [pk1] jk[1:2] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] jk[c(\"ds1\", \"ds2\")] #> A join_keys object containing foreign keys between 2 datasets: #> ds1: [pk1] #> <-- ds2: [pk2] #> ds2: [pk2] #> --> ds1: [pk1] # Setting a new primary key --- jk[\"ds4\", \"ds4\"] <- \"pk4\" jk[\"ds5\", \"ds5\"] <- \"pk5\" # Setting a single relationship pair --- jk[\"ds1\", \"ds4\"] <- c(\"pk1\" = \"pk4\") # Removing a key --- jk[\"ds5\", \"ds5\"] <- NULL # Merging multiple `join_keys` objects --- jk_merged <- c( jk, join_keys( join_key(\"ds4\", keys = c(\"pk4\", \"pk4_2\")), join_key(\"ds3\", \"ds4\", c(pk3 = \"pk4_2\")) ) ) # note: merge can be performed with both join_keys and join_key_set jk_merged <- c( jk_merged, join_key(\"ds5\", keys = \"pk5\"), join_key(\"ds1\", \"ds5\", c(pk1 = \"pk5\")) ) # Assigning keys via join_keys(x)[i, j] <- value ---- obj <- join_keys() # or obj <- teal_data() join_keys(obj)[\"ds1\", \"ds1\"] <- \"pk1\" join_keys(obj)[\"ds2\", \"ds2\"] <- \"pk2\" join_keys(obj)[\"ds3\", \"ds3\"] <- \"pk3\" join_keys(obj)[\"ds1\", \"ds2\"] <- c(pk1 = \"pk2\") join_keys(obj)[\"ds1\", \"ds3\"] <- c(pk1 = \"pk3\") identical(jk, join_keys(obj)) #> [1] FALSE # Setter for join_keys within teal_data ---- td <- teal_data() join_keys(td) <- jk join_keys(td)[\"ds1\", \"ds2\"] <- \"new_key\" join_keys(td) <- c(join_keys(td), join_keys(join_key(\"ds3\", \"ds2\", \"key3\"))) join_keys(td) #> A join_keys object containing foreign keys between 4 datasets: #> ds1: [pk1] #> <-> ds2: [new_key] #> <-- ds3: [pk3] #> <-- ds4: [pk4] #> ds3: [pk3] #> --> ds1: [pk1] #> <-- ds2: [key3] #> --* (implicit via parent with): ds4 #> ds2: [pk2] #> <-> ds1: [new_key] #> --> ds3: [key3] #> ds4: [pk4] #> --> ds1: [pk1] #> --* (implicit via parent with): ds3"},{"path":"https://insightsengineering.github.io/teal.data/reference/names-set-.join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"The names of a join_keys object — names<-.join_keys","title":"The names of a join_keys object — names<-.join_keys","text":"names join_keys object","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/names-set-.join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The names of a join_keys object — names<-.join_keys","text":"","code":"# S3 method for class 'join_keys' names(x) <- value"},{"path":"https://insightsengineering.github.io/teal.data/reference/names-set-.join_keys.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The names of a join_keys object — names<-.join_keys","text":"x R object. value character vector length x, NULL.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_join_keys.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal constructor — new_join_keys","title":"Internal constructor — new_join_keys","text":"Internal constructor","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_join_keys.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal constructor — new_join_keys","text":"","code":"new_join_keys()"},{"path":"https://insightsengineering.github.io/teal.data/reference/new_join_keys.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Internal constructor — new_join_keys","text":"empty join_keys list","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialize teal_data object — new_teal_data","title":"Initialize teal_data object — new_teal_data","text":"Initialize teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/new_teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialize teal_data object — new_teal_data","text":"","code":"new_teal_data( data, code = character(0), join_keys = join_keys(), datanames = names(data) )"},{"path":"https://insightsengineering.github.io/teal.data/reference/new_teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialize teal_data object — new_teal_data","text":"data (named list) data objects. code (character language) code reproduce data. Accepts stores comments also. join_keys (join_keys) object datanames (character) names datasets passed data. Needed non-dataset objects needed env slot.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Get and set parents in join_keys object — parents","title":"Get and set parents in join_keys object — parents","text":"parents() facilitates creation dependencies datasets assigning parent-child relationship.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get and set parents in join_keys object — parents","text":"","code":"parents(x) # S3 method for class 'join_keys' parents(x) # S3 method for class 'teal_data' parents(x) parents(x) <- value # S3 method for class 'join_keys' parents(x) <- value # S3 method for class 'teal_data' parents(x) <- value parent(x, dataset_name)"},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get and set parents in join_keys object — parents","text":"x (join_keys teal_data) object contains \"parents\" information retrieve manipulate. value (named list) character vectors. dataset_name (character(1)) Name dataset query parent.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get and set parents in join_keys object — parents","text":"list character representing parents. parent(x, dataset_name) returns NULL parent exist.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get and set parents in join_keys object — parents","text":"element defined list element, list(\"child\" = \"parent\").","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"methods-by-class-","dir":"Reference","previous_headings":"","what":"Methods (by class)","title":"Get and set parents in join_keys object — parents","text":"parents(join_keys): Retrieves parents join_keys object. parents(teal_data): Retrieves parents join_keys inside teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Get and set parents in join_keys object — parents","text":"parents(x) <- value: Assignment parents join_keys object. parents(join_keys) <- value: Assignment parents join_keys object. parents(teal_data) <- value: Assignment parents join_keys inside teal_data object. parent(): Getter individual parent.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/parents.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get and set parents in join_keys object — parents","text":"","code":"# Get parents of join_keys --- jk <- default_cdisc_join_keys[\"ADEX\"] parents(jk) #> $ADEX #> [1] \"ADSL\" #> # Get parents of join_keys inside teal_data object --- td <- teal_data( ADSL = rADSL, ADTTE = rADTTE, ADRS = rADRS, join_keys = default_cdisc_join_keys[c(\"ADSL\", \"ADTTE\", \"ADRS\")] ) parents(td) #> $ADTTE #> [1] \"ADSL\" #> #> $ADRS #> [1] \"ADSL\" #> # Assignment of parents --- jk <- join_keys( join_key(\"ds1\", \"ds2\", \"id\"), join_key(\"ds5\", \"ds6\", \"id\"), join_key(\"ds7\", \"ds6\", \"id\") ) parents(jk) <- list(ds2 = \"ds1\") # Setting individual parent-child relationship parents(jk)[\"ds6\"] <- \"ds5\" parents(jk)[\"ds7\"] <- \"ds6\" # Assignment of parents of join_keys inside teal_data object --- parents(td) <- list(\"ADTTE\" = \"ADSL\") # replace existing parents(td)[\"ADRS\"] <- \"ADSL\" # add new parent # Get individual parent --- parent(jk, \"ds2\") #> [1] \"ds1\" parent(td, \"ADTTE\") #> [1] \"ADSL\""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random adverse events — rADAE","title":"Random adverse events — rADAE","text":"Random adverse events","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random adverse events — rADAE","text":"","code":"rADAE"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random adverse events — rADAE","text":"object class tbl_df (inherits tbl, data.frame) 1934 rows 92 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADAE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random adverse events — rADAE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":null,"dir":"Reference","previous_headings":"","what":"Random concomitant medications — rADCM","title":"Random concomitant medications — rADCM","text":"Random concomitant medications","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random concomitant medications — rADCM","text":"","code":"rADCM"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random concomitant medications — rADCM","text":"object class tbl_df (inherits tbl, data.frame) 3685 rows 83 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADCM.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random concomitant medications — rADCM","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADEX","title":"Random response — rADEX","text":"Random exposure.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADEX","text":"","code":"rADEX"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADEX","text":"object class tbl_df (inherits tbl, data.frame) 6400 rows 79 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADEX.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADEX","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":null,"dir":"Reference","previous_headings":"","what":"Random lab analysis — rADLB","title":"Random lab analysis — rADLB","text":"Random lab analysis","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random lab analysis — rADLB","text":"","code":"rADLB"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random lab analysis — rADLB","text":"object class tbl_df (inherits tbl, data.frame) 8400 rows 102 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADLB.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random lab analysis — rADLB","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random response — rADRS","title":"Random response — rADRS","text":"Random response","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random response — rADRS","text":"","code":"rADRS"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random response — rADRS","text":"object class tbl_df (inherits tbl, data.frame) 3200 rows 65 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADRS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random response — rADRS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":null,"dir":"Reference","previous_headings":"","what":"Random patient listing — rADSL","title":"Random patient listing — rADSL","text":"Random patient listing","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random patient listing — rADSL","text":"","code":"rADSL"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random patient listing — rADSL","text":"object class tbl_df (inherits tbl, data.frame) 400 rows 55 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADSL.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random patient listing — rADSL","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADTR — rADTR","title":"Random data rADTR — rADTR","text":"Random data rADTR","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADTR — rADTR","text":"","code":"rADTR"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADTR — rADTR","text":"object class data.frame 2800 rows 76 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTR.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADTR — rADTR","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":null,"dir":"Reference","previous_headings":"","what":"Random time to event analysis dataset — rADTTE","title":"Random time to event analysis dataset — rADTTE","text":"Random time event analysis dataset","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random time to event analysis dataset — rADTTE","text":"","code":"rADTTE"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random time to event analysis dataset — rADTTE","text":"object class tbl_df (inherits tbl, data.frame) 2000 rows 67 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADTTE.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random time to event analysis dataset — rADTTE","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":null,"dir":"Reference","previous_headings":"","what":"Random data rADVS — rADVS","title":"Random data rADVS — rADVS","text":"Random data rADVS","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Random data rADVS — rADVS","text":"","code":"rADVS"},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Random data rADVS — rADVS","text":"object class tbl_df (inherits tbl, data.frame) 16800 rows 87 columns.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/rADVS.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Random data rADVS — rADVS","text":"internal","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Show teal_data object — show,teal_data-method","title":"Show teal_data object — show,teal_data-method","text":"Prints teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show teal_data object — show,teal_data-method","text":"","code":"# S4 method for class 'teal_data' show(object)"},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show teal_data object — show,teal_data-method","text":"object (teal_data)","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Show teal_data object — show,teal_data-method","text":"Input teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/show-teal_data-method.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Show teal_data object — show,teal_data-method","text":"","code":"teal_data() #> ✅︎ verified teal_data object #> [L] #> Parent: teal_data(x = iris, code = \"x = iris\") #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L] verify(teal_data(x = iris, code = \"x = iris\")) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x: [L]"},{"path":"https://insightsengineering.github.io/teal.data/reference/teal.data-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teal.data: Reproducible data model for teal applications — teal.data-package","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"package extends teal applications module stores data relationships (keys) reproducible code. Package offers also load data files, databases easily extendable another data sources.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/reference/teal.data-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teal.data: Reproducible data model for teal applications — teal.data-package","text":"Maintainer: Dawid Kaledkowski dawid.kaledkowski@roche.com (ORCID) Authors: Aleksander Chlebowski aleksander.chlebowski@contractors.roche.com (ORCID) Marcin Kosinski marcin.kosinski.mk1@roche.com Andre Verissimo andre.verissimo@roche.com (ORCID) Pawel Rucki pawel.rucki@roche.com Mahmoud Hallal mahmoud.hallal@roche.com Nikolas Burkoff Maciej Nasinski Konrad Pagacz Junlue Zhao contributors: Chendi Liao chendi.liao@roche.com [reviewer] Dony Unardi unardid@gene.com [reviewer] F. Hoffmann-La Roche AG [copyright holder, funder]","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data-class.html","id":null,"dir":"Reference","previous_headings":"","what":"Reproducible data — teal_data-class","title":"Reproducible data — teal_data-class","text":"Reproducible data container class. Inherits code tracking behavior teal.code::qenv.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data-class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reproducible data — teal_data-class","text":"class provides isolated environment store process data code recorded. environment, code, data set names, data joining keys stored respective slots. slots never accessed directly, use provided get/set functions. code evaluated teal_data, messages warnings stored respective slots. errors raised, qenv.error object returned.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data-class.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"Reproducible data — teal_data-class","text":"env (environment) environment containing data sets possibly auxiliary variables. Access variables get_var() [[[]. setter provided. Evaluate code add variables @env. code (character) vector representing code necessary reproduce contents @env. Access get_code(). setter provided. Evaluate code append code slot. id (integer) random identifier assigned element @code. Used internally. warnings (character) vector warnings raised evaluating code. Access get_warnings(). messages (character) vector messages raised evaluating code. join_keys (join_keys) object specifying joining keys data sets @env. Access modify join_keys(). datanames (character) vector names data sets @env. Used internally distinguish auxiliary variables. Access modify datanames(). verified (logical(1)) flag signifying code @code proven yield contents @env. Used internally. See verify() details.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Comprehensive data integration function for teal applications — teal_data","title":"Comprehensive data integration function for teal applications — teal_data","text":"Universal function pass data teal application.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(..., join_keys = teal.data::join_keys(), code = character(0), check)"},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comprehensive data integration function for teal applications — teal_data","text":"... number objects (presumably data objects) provided name = value pairs. join_keys (join_keys single join_key_set) optional object datasets column names used joining. empty joins pairs objects. code (character, language) optional code reproduce datasets provided .... Note code executed teal_data may reproducible check (logical) Use verify() verify code reproducibility .","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comprehensive data integration function for teal applications — teal_data","text":"teal_data object.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/teal_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comprehensive data integration function for teal applications — teal_data","text":"","code":"teal_data(x1 = iris, x2 = mtcars) #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] #> • x2: [L]"},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":null,"dir":"Reference","previous_headings":"","what":"Topological graph sort — topological_sort","title":"Topological graph sort — topological_sort","text":"Graph list node contains vector child nodes returned list, parents appear children.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Topological graph sort — topological_sort","text":"","code":"topological_sort(graph)"},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Topological graph sort — topological_sort","text":"graph (named list) node vector elements","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/topological_sort.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Topological graph sort — topological_sort","text":"Implementation Kahn algorithm modification maintain order input elements.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":null,"dir":"Reference","previous_headings":"","what":"Updates the keys of the datasets based on the parents — update_keys_given_parents","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"Updates keys datasets based parents","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"","code":"update_keys_given_parents(x)"},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"x (join_keys) object update keys.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/update_keys_given_parents.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Updates the keys of the datasets based on the parents — update_keys_given_parents","text":"(self) invisibly chaining","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify code reproducibility — verify","title":"Verify code reproducibility — verify","text":"Checks whether code teal_data object reproduces stored objects.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify code reproducibility — verify","text":"","code":"verify(x)"},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify code reproducibility — verify","text":"x teal_data object","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify code reproducibility — verify","text":"Input teal_data object error.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Verify code reproducibility — verify","text":"objects created code @code slot x all_equal contents @env slot, function updates @verified slot TRUE returned teal_data object. verified, slot always set TRUE. @code fails recreate objects teal_data@env, error raised.","code":""},{"path":"https://insightsengineering.github.io/teal.data/reference/verify.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Verify code reproducibility — verify","text":"","code":"tdata1 <- teal_data() tdata1 <- within(tdata1, { a <- 1 b <- a^5 c <- list(x = 2) }) verify(tdata1) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] tdata2 <- teal_data(x1 = iris, code = \"x1 <- iris\") verify(tdata2) #> ✅︎ verified teal_data object #> [L] #> Parent: #> Bindings: #> • x1: [L] verify(tdata2)@verified #> [1] TRUE tdata2@verified #> [1] FALSE tdata3 <- teal_data() tdata3 <- within(tdata3, { stop(\"error\") }) try(verify(tdata3)) # fails #> Error : error #> when evaluating qenv code: #> stop(\"error\") a <- 1 b <- a + 2 c <- list(x = 2) d <- 5 tdata4 <- teal_data( a = a, b = b, c = c, d = d, code = \"a <- 1 b <- a c <- list(x = 2) e <- 1\" ) tdata4 #> ✖ unverified teal_data object #> [L] #> Parent: #> Bindings: #> • a: [L] #> • b: [L] #> • c: [L] #> • d: [L] if (FALSE) { # \\dontrun{ verify(tdata4) # fails } # }"},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"breaking-changes-0-6-0-9014","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.6.0.9014","text":"soft deprecate datanames argument get_code(). Use names instead.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-6-0-9014","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0.9014","text":"join_keys provided, datanames() now sorted topological way (Kahn algorithm), means parent dataset always precedes child dataset. extended parent dataset name, one child dataset exist datanames() connection child-parent set join_keys parent exist teal_data environment. allow set dataset name exist teal_data environment. teal_data longer set default datanames() based join_keys names - uses data names.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-6-0-9014","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.6.0.9014","text":"get_code longer adds warning message failed verification.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-060","dir":"Changelog","previous_headings":"","what":"teal.data 0.6.0","title":"teal.data 0.6.0","text":"CRAN release: 2024-04-30","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-6-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.6.0","text":"col_relabel supports NA remove labels (similar col_labels<-).","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"bug-fixes-0-6-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.6.0","text":"Fixed bug get_code causing incorrect lines order returned code. Fixed bug col_labels causing incorrect label names returned input data contains named label attributes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-050","dir":"Changelog","previous_headings":"","what":"teal.data 0.5.0","title":"teal.data 0.5.0","text":"CRAN release: 2024-02-13","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"bug-fixes-0-5-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.5.0","text":"Fix get_code_dependency bug detect usage objects functions left right-hand sides code reproducibility. Remove duplicate entries code_graph.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-5-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.5.0","text":"Extended get_code.teal_data() possibility steer internal methods ... parameter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-040","dir":"Changelog","previous_headings":"","what":"teal.data 0.4.0","title":"teal.data 0.4.0","text":"CRAN release: 2024-01-31","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-4-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.4.0","text":"Simplified join_key better support primary keys. JoinKey R6 object removed favor list-like object class name join_keys. Subset operators assignments supported ([, [[, [<- [[<-) join_keys function works constructor, getter setter.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"teal.data 0.4.0","text":"teal_data() cdisc_data() return now teal_data class object replaces TealData class object. teal_data becomes standard input entire teal framework. TealDataset, TealDatasetConnector TealDataConnector classes removed. Delayed-data-loading longer supported teal.data. called connectors now supported teal package (see ?teal::teal_data_module). join_keys() join_key() return now join_keys object replace JoinKeys class.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-4-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.4.0","text":"Specified minimal version package dependencies. Upgraded teal.code dependency Imports Depends. Deprecated get_labels function removed supporting function data_label.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-3-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.3.0","text":"Removed scda package dependency examples. Added col_labels function removed formatters dependency.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-3-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.3.0","text":"Update installation instructions.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-2-0","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.2.0","text":"Added ADQLQC, ADCSSRS, ADEQ5D5L supported data sets. Improved error message get_cdisc_keys. Examples now use scda.2022 instead scda.2021. Fixed help files TealDataset MAETealDataset. Added backstop missing reticulate package teal.data Python vignette.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-2-0","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.2.0","text":"Modified teal.Dataset$print method less cluttered output. Transferred data hashing step TealDataset MAETealDataset teal. Removed CDISCTealData class updated TealData account removed functionality. Added datasets parents information JoinKeys class. Updated cdisc_data teal_data wrappers handle join_keys creation updating instead CDISCTealData TealData. Removed join_keys methods TealDataset, TealDatasetConnector.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"enhancements-0-1-2","dir":"Changelog","previous_headings":"","what":"Enhancements","title":"teal.data 0.1.2","text":"Updated vignettes README content.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-1-2","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.2","text":"Exported validate_metadata function. Replaced argument name archive_name comply latest version synthetic_cdisc_dataset function. Replaced use scda random.cdisc.data","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"bug-fixes-0-1-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"teal.data 0.1.2","text":"Fixed get_raw_data examples.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-1-1","dir":"Changelog","previous_headings":"","what":"Miscellaneous","title":"teal.data 0.1.1","text":"Added template pkgdown site. Removed usage .Globalenv Python code execution. Updated package authors. Added package vignettes.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"tealdata-010","dir":"Changelog","previous_headings":"","what":"teal.data 0.1.0","title":"teal.data 0.1.0","text":"Initial release teal.data package data model used teal applications.","code":""},{"path":[]},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"New features","title":"teal.data 0.1.0","text":"Added metadata field TealDataset store named list metadata items. available module developers FilteredData$get_metadata(\"<>\") can pulled added directly datasets derived TealDatasetConnectors.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"breaking-changes-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Breaking changes","title":"teal.data 0.1.0","text":"get_key_duplicates returns data.frame instead tibble. get_call() function CallableFunction now returns call namespace included. MultiAssayExperiment SummarizedExperiment now suggested packages, required. Objects dependent MultiAssayExperiment changed lazy-load now suggested packages. Minor changes interface TealDataset, example active fields replaced explicit “get” calls.","code":""},{"path":"https://insightsengineering.github.io/teal.data/news/index.html","id":"miscellaneous-0-1-0","dir":"Changelog","previous_headings":"Changes (from behavior when functionality was part of teal)","what":"Miscellaneous","title":"teal.data 0.1.0","text":"reticulate Suggests, added requireNamespace call whenever needed. dplyr moved imports suggests. Removed redundant calling JoinKeys$mutate method inside -loops. Removed rtables dependency package.","code":""}]