diff --git a/.Rbuildignore b/.Rbuildignore index 568f8c81..4fdc16bd 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -47,5 +47,7 @@ pkgdown ^output$ ^junco_tlg_template_scripts$ ^[^/]*\.R$ -^.*\.rtf$ -^CHANGELOG\.md$ \ No newline at end of file +^\.vscode$ +^[.]?air[.]toml$ +^CHANGELOG\.md$ +^air\.toml$ \ No newline at end of file diff --git a/.covrignore b/.covrignore index 15450516..7f2dd82a 100644 --- a/.covrignore +++ b/.covrignore @@ -1,4 +1,2 @@ -# Development utilities -R/utils.R R/zzz.R diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 00000000..e136f449 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,59 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + push: + branches: + - main + +name: check + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: +# - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - name: Install rbmi + run: install.packages('rbmi', repos = c('https://insightsengineering.r-universe.dev')) + shell: Rscript {0} + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck, rbmi=?ignore + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/check_CRAN.yml b/.github/workflows/check_CRAN.yml new file mode 100644 index 00000000..5013356a --- /dev/null +++ b/.github/workflows/check_CRAN.yml @@ -0,0 +1,60 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + push: + branches: + - main + +name: check-CRAN + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: +# - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - name: Install rbmi + run: install.packages('rbmi', repos = c('https://insightsengineering.r-universe.dev')) + shell: Rscript {0} + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck, rbmi=?ignore + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' + args: 'c("--as-cran", "--no-manual")' diff --git a/.github/workflows/inspect.yaml b/.github/workflows/inspect.yaml index 7cf64088..0026f1fb 100644 --- a/.github/workflows/inspect.yaml +++ b/.github/workflows/inspect.yaml @@ -1,5 +1,5 @@ --- -name: Check πŸ›  +name: Inspection πŸ›  on: pull_request: @@ -17,73 +17,73 @@ jobs: audit: name: Audit Dependencies πŸ•΅οΈβ€β™‚οΈ uses: insightsengineering/r.pkg.template/.github/workflows/audit.yaml@main - r-cmd: - name: R CMD Check 🧬 - uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - deps-installation-method: setup-r-dependencies - additional-env-vars: | - _R_CHECK_CRAN_INCOMING_REMOTE_=false - additional-r-cmd-check-params: --as-cran - enforce-note-blocklist: true - note-blocklist: | - checking dependencies in R code .* NOTE - checking R code for possible problems .* NOTE - checking examples .* NOTE - checking Rd line widths .* NOTE - checking S3 generic/method consistency .* NOTE - checking Rd .usage sections .* NOTE - checking for unstated dependencies in vignettes .* NOTE - checking top-level files .* NOTE - unit-test-report-brand: >- - https://raw.githubusercontent.com/johnsonandjohnson/junco/main/man/figures/logo.png - r-cmd-non-cran: - name: R CMD Check (non-CRAN) 🧬 - uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - deps-installation-method: setup-r-dependencies - additional-env-vars: | - _R_CHECK_CRAN_INCOMING_REMOTE_=false - NOT_CRAN=true - enforce-note-blocklist: true - concurrency-group: non-cran - unit-test-report-directory: unit-test-report-non-cran - note-blocklist: | - checking dependencies in R code .* NOTE - checking R code for possible problems .* NOTE - checking examples .* NOTE - checking Rd line widths .* NOTE - checking S3 generic/method consistency .* NOTE - checking Rd .usage sections .* NOTE - checking for unstated dependencies in vignettes .* NOTE - checking top-level files .* NOTE - unit-test-report-brand: >- - https://raw.githubusercontent.com/johnsonandjohnson/junco/main/man/figures/logo.png - coverage: - name: Coverage πŸ“” - uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - deps-installation-method: setup-r-dependencies - additional-env-vars: | - NOT_CRAN=true +# r-cmd: +# name: R CMD Check 🧬 +# uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main +# secrets: +# REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} +# with: +# deps-installation-method: setup-r-dependencies +# additional-env-vars: | +# _R_CHECK_CRAN_INCOMING_REMOTE_=false +# additional-r-cmd-check-params: --as-cran +# enforce-note-blocklist: true +# note-blocklist: | +# checking dependencies in R code .* NOTE +# checking R code for possible problems .* NOTE +# checking examples .* NOTE +# checking Rd line widths .* NOTE +# checking S3 generic/method consistency .* NOTE +# checking Rd .usage sections .* NOTE +# checking for unstated dependencies in vignettes .* NOTE +# checking top-level files .* NOTE +# unit-test-report-brand: >- +# https://raw.githubusercontent.com/johnsonandjohnson/junco/main/man/figures/logo.png +# r-cmd-non-cran: +# name: R CMD Check (non-CRAN) 🧬 +# uses: insightsengineering/r.pkg.template/.github/workflows/build-check-install.yaml@main +# secrets: +# REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} +# with: +# deps-installation-method: setup-r-dependencies +# additional-env-vars: | +# _R_CHECK_CRAN_INCOMING_REMOTE_=false +# NOT_CRAN=true +# enforce-note-blocklist: true +# concurrency-group: non-cran +# unit-test-report-directory: unit-test-report-non-cran +# note-blocklist: | +# checking dependencies in R code .* NOTE +# checking R code for possible problems .* NOTE +# checking examples .* NOTE +# checking Rd line widths .* NOTE +# checking S3 generic/method consistency .* NOTE +# checking Rd .usage sections .* NOTE +# checking for unstated dependencies in vignettes .* NOTE +# checking top-level files .* NOTE +# unit-test-report-brand: >- +# https://raw.githubusercontent.com/johnsonandjohnson/junco/main/man/figures/logo.png +# coverage: +# name: Coverage πŸ“” +# uses: insightsengineering/r.pkg.template/.github/workflows/test-coverage.yaml@main +# secrets: +# REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} +# with: +# deps-installation-method: setup-r-dependencies +# additional-env-vars: | +# NOT_CRAN=true linter: if: github.event_name != 'push' name: Linter πŸ¦Έβ€β™€οΈ uses: johnsonandjohnson/pharmaversesdtmjnj/.github/workflows/lint.yaml@main - roxygen: - name: Roxygen πŸ…Ύ - uses: insightsengineering/r.pkg.template/.github/workflows/roxygen.yaml@main - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} - with: - deps-installation-method: setup-r-dependencies - auto-update: true +# roxygen: +# name: Roxygen πŸ…Ύ +# uses: insightsengineering/r.pkg.template/.github/workflows/roxygen.yaml@main +# secrets: +# REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} +# with: +# deps-installation-method: setup-r-dependencies +# auto-update: true gitleaks: name: gitleaks πŸ’§ uses: insightsengineering/r.pkg.template/.github/workflows/gitleaks.yaml@main @@ -108,14 +108,14 @@ jobs: licenses: name: License Check πŸƒ uses: insightsengineering/r.pkg.template/.github/workflows/licenses.yaml@main - style: - if: github.event_name != 'push' - name: Style Check πŸ‘— - uses: insightsengineering/r.pkg.template/.github/workflows/style.yaml@main - with: - auto-update: true - secrets: - REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} +# style: +# if: github.event_name != 'push' +# name: Style Check πŸ‘— +# uses: insightsengineering/r.pkg.template/.github/workflows/style.yaml@main +# with: +# auto-update: true +# secrets: +# REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} grammar: if: github.event_name != 'push' name: Grammar Check πŸ”€ diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index ccff9a6b..84598db9 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -35,10 +35,16 @@ jobs: - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true + extra-repositories: | + https://insightsengineering.r-universe.dev/ + + - name: Install rbmi + run: install.packages('rbmi', repos = c('https://insightsengineering.r-universe.dev')) + shell: Rscript {0} - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::pkgdown@2.2.0, local::. + extra-packages: any::pkgdown@2.2.0, local::., rbmi=?ignore needs: website - name: Build site diff --git a/.github/workflows/rhub.yaml b/.github/workflows/rhub.yaml new file mode 100644 index 00000000..74ec7b05 --- /dev/null +++ b/.github/workflows/rhub.yaml @@ -0,0 +1,95 @@ +# R-hub's generic GitHub Actions workflow file. It's canonical location is at +# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml +# You can update this file to a newer version using the rhub2 package: +# +# rhub::rhub_setup() +# +# It is unlikely that you need to modify this file manually. + +name: R-hub +run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}" + +on: + workflow_dispatch: + inputs: + config: + description: 'A comma separated list of R-hub platforms to use.' + type: string + default: 'linux,windows,macos' + name: + description: 'Run name. You can leave this empty now.' + type: string + id: + description: 'Unique ID. You can leave this empty now.' + type: string + +jobs: + + setup: + runs-on: ubuntu-latest + outputs: + containers: ${{ steps.rhub-setup.outputs.containers }} + platforms: ${{ steps.rhub-setup.outputs.platforms }} + + steps: + # NO NEED TO CHECKOUT HERE + - uses: r-hub/actions/setup@v1 + with: + config: ${{ github.event.inputs.config }} + id: rhub-setup + + linux-containers: + needs: setup + if: ${{ needs.setup.outputs.containers != '[]' }} + runs-on: ubuntu-latest + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.containers) }} + container: + image: ${{ matrix.config.container }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/run-check@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + + other-platforms: + needs: setup + if: ${{ needs.setup.outputs.platforms != '[]' }} + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.label }} + strategy: + fail-fast: false + matrix: + config: ${{ fromJson(needs.setup.outputs.platforms) }} + + steps: + - uses: r-hub/actions/checkout@v1 + - uses: r-hub/actions/setup-r@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/platform-info@v1 + with: + token: ${{ secrets.RHUB_TOKEN }} + job-config: ${{ matrix.config.job-config }} + - uses: r-hub/actions/setup-deps@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} + - uses: r-hub/actions/run-check@v1 + with: + job-config: ${{ matrix.config.job-config }} + token: ${{ secrets.RHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index d5cdecd8..8ed5d2b4 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,7 @@ programs_external/* #IDE .vscode/settings.json .idea/* -temp_ilse/* \ No newline at end of file + +#Air +air.toml +.vscode/extensions.json diff --git a/.lintr b/.lintr index 9861e067..3228961f 100644 --- a/.lintr +++ b/.lintr @@ -3,7 +3,8 @@ linters: linters_with_defaults( object_usage_linter = NULL, object_length_linter = NULL, object_name_linter = NULL, - return_linter = NULL + return_linter = NULL, + pipe_consistency_linter = pipe_consistency_linter(pipe = "|>") ) exclusions: list( "vignettes" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index f717284e..00000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# All available hooks: https://pre-commit.com/hooks.html -# R specific hooks: https://github.com/lorenzwalthert/precommit -repos: -- repo: https://github.com/lorenzwalthert/precommit - rev: v0.4.3.9011 - hooks: - # - id: style-files - # args: [--style_pkg=styler, --style_fun=tidyverse_style] - - id: roxygenize - additional_dependencies: - - insightsengineering/rtables - - pharmaverse/tidytlg - - rvlenth/emmeans - - openpharma/mmrm - - insightsengineering/rbmi - - insightsengineering/rlistings - - insightsengineering/tern - - hadley/assertthat - - r-lib/testthat - # - id: spell-check - # exclude: > - # (?x)^( - # .*\.[rR]| - # .*\.feather| - # .*\.jpeg| - # .*\.pdf| - # .*\.png| - # .*\.py| - # .*\.RData| - # .*\.rds| - # .*\.Rds| - # .*\.Rproj| - # .*\.sh| - # (.*/|)\.gitignore| - # (.*/|)\.gitlab-ci\.yml| - # (.*/|)\.lintr| - # (.*/|)\.pre-commit-.*| - # (.*/|)\.Rbuildignore| - # (.*/|)\.Renviron| - # (.*/|)\.Rprofile| - # (.*/|)\.travis\.yml| - # (.*/|)appveyor\.yml| - # (.*/|)NAMESPACE| - # (.*/|)renv/settings\.dcf| - # (.*/|)renv\.lock| - # (.*/|)WORDLIST| - # \.github/workflows/.*| - # data/.*| - # )$ - - id: parsable-R - - id: no-browser-statement - # - id: no-print-statement - - id: no-debug-statement - # - id: deps-in-desc -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - args: ['--maxkb=200'] - # - id: file-contents-sorter - # files: '^\.Rbuildignore$' - # - id: end-of-file-fixer - # exclude: '\.Rd' - # - repo: https://github.com/pre-commit-ci/pre-commit-ci-config - # rev: v1.6.1 - # hooks: - # # Only required when https://pre-commit.ci is used for config validation - # - id: check-pre-commit-ci-config -- repo: local - hooks: - - id: forbid-to-commit - name: Don't commit common R artifacts - entry: Cannot commit .Rhistory, .RData, .Rds or .rds. - language: fail - files: '\.(Rhistory|RData|Rds|rds)$' - # `exclude: ` to allow committing specific files - -ci: - autoupdate_schedule: monthly diff --git a/CHANGELOG.md b/CHANGELOG.md index 845f9c2c..7f5002b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,36 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.1.1.1] - 2025-09-17 +## [0.1.2] - 2025-12-10 + +### Added and Removed +- Add `a_two_tier()` analysis function +- Add `a_maxlev()` to be able to calculate count and percentage of the maximum level of an ordered factor per subject +- Remove `brackets_to_rtf()` +- Export `rbmi_pool()` #22 +- Add functionality to `a_freq_j()` to process `val = NULL` from levels specified in `label_map`, as well as the modified version `a_freq_j_with_exclude()` that allows to exclude the analysis from specified row splits. #95 +- Add `a_cmhrms_j()` to support p-value from CMH row mean score test, as well as the modified version `a_cmhrms_j_with_exclude()` that allows to exclude the analysis from specified row splits. #97 +- Added standard error (SE) column for each treatment arm's least square (LS) means estimate to the `summarize_lsmeans_wide()` layout. +- Added the internal function `do_exclude_split()` to facilitate the exclusion of specified row splits from analysis functions. +- Remove some unused functions (jj_uc_map, postfun_cog, postfun_eq5d, column_N, non_blank_sentinel, null_fn, unicodify +- Add extra check for existence of `.alt_df_full` when layout has risk difference column and a row-split (h_create_alt_df) #120. +- Add docx exporter for Tables, Listings and Figures. +- Add `alignments` argument in `tt_to_tlgrtf()` +- Removed `s_test_proportion_diff()` and corresponding helper functions, as they are now available as needed in the `tern` package. +- Added `cmh_sato` and `cmh_mn` (Cochran-Mantel-Haenszel stratified proportion difference estimation with Sato variance and Miettinen Nurminen method, respectively) `method` options to the `s_proportion_diff_j()` function. +- Added formatting function round type (#76) -* Fixed bug in s_summarize_desc_j function to handle sparse data (zero variance) cases (#78) +### Changed +- Replace {pharmaverseadam} with {pharmaverseadamjnj} +- Update pruning_functions.R +- Update `string_to_title()` to handle factors (#26) +- Moved rbmi to suggest +- Replaced `denom_df` with `.alt_df_full` in `a_maxlev()`. + +### Fixed +- Fixes #102 bug inappropriate warnings from `cond_rm_facets` function +- Fix bug for not selecting NA records in `h_subset_combo()` +- Consistent `tt_to_tbldf()` function behavior with invalid structures #116 ## [0.1.1] - 2025-07-28 @@ -21,4 +48,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Initial CRAN release +[0.1.2]: https://github.com/johnsonandjohnson/junco/releases/tag/v0.1.2 [0.1.1]: https://github.com/johnsonandjohnson/junco/releases/tag/v0.1.1 diff --git a/DESCRIPTION b/DESCRIPTION index 472db09f..b40caaa1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: junco Title: Create Common Tables and Listings Used in Clinical Trials -Version: 0.1.1.1 -Date: 2025-06-20 +Version: 0.1.2 +Date: 2025-12-04 Authors@R: c( person("Gabriel", "Becker", , "gabembecker@gmail.com", role = c("cre", "aut"), comment = "Original creator of the package, and author of included formatters functions"), @@ -14,13 +14,14 @@ Authors@R: c( person("Ezequiel", "Anokian", , "eanokia1@its.jnj.com", role = c("ctb")), person("Renfei", "Mao", , "rmao6@its.jnj.com", role = c("ctb")), person("Mrinal", "Das", , "mdas35@its.jnj.com", role = c("ctb")), + person("Wojciech", "Wojciak", , "wwojciak@its.jnj.com", role = c("ctb")), person("Isaac", "Gravestock", role = "cph", comment = "Author of included rbmi functions"), person("Joe", "Zhu", role = "cph", - comment = "Author of included tern functions"), + comment = "Author of included tern and rtables.officer functions"), person("Johnson & Johnson Innovative Medicine", role = c("cph", "fnd")), person("F. Hoffmann-La Roche AG", role = c("cph"), - comment = "Copyright holder of included formatters, rbmi and tern functions") + comment = "Copyright holder of included formatters, rtables.officer and tern functions") ) Description: Structure and formatting requirements for clinical trial table and listing outputs vary between pharmaceutical companies. 'junco' provides additional tooling for use alongside @@ -35,14 +36,14 @@ Description: Structure and formatting requirements for clinical trial table and License: Apache License (>= 2) URL: https://github.com/johnsonandjohnson/junco, https://johnsonandjohnson.github.io/junco/ BugReports: https://github.com/johnsonandjohnson/junco/issues -Depends: +Depends: R (>= 4.4), - formatters (>= 0.5.6), - rtables (>= 0.6.13) + formatters (>= 0.5.12), + rtables (>= 0.6.15) Imports: - tidytlg (>= 0.1.5), - tern (>= 0.9.9), - rlistings (>= 0.2.11), + tidytlg (>= 0.11.0), + tern (>= 0.9.10), + rlistings (>= 0.2.13), checkmate (>= 2.1.0), broom, methods, @@ -54,8 +55,15 @@ Imports: utils, emmeans, mmrm, - rbmi (>= 1.3.0), - assertthat + assertthat, + vcdExtra (>= 0.8.7), + rtables.officer (>= 0.1.0), + flextable, + officer, + xml2, + ggplot2, + stringi, + systemfonts Encoding: UTF-8 Language: en-US Roxygen: list(markdown = TRUE) @@ -66,9 +74,13 @@ Suggests: forcats (>= 1.0.0), testthat (>= 3.0.0), mockery, + mvtnorm, parallel, readxl, - pharmaverseadam, - rlang + rlang, + rbmi (>= 1.3.0), + tidyr, + pharmaverseadamjnj (>= 0.0.2) VignetteBuilder: knitr Config/testthat/edition: 3 +Additional_repositories: https://insightsengineering.r-universe.dev/ diff --git a/NAMESPACE b/NAMESPACE index d971b20c..11235681 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,15 +2,19 @@ S3method(tidy,pool) S3method(tidy,tern_model) +export(a_cmhrms_j) +export(a_cmhrms_j_with_exclude) export(a_coxph_hr) export(a_eair100_j) export(a_event_free) export(a_freq_combos_j) export(a_freq_j) +export(a_freq_j_with_exclude) export(a_freq_resp_var_j) export(a_freq_subcol_j) export(a_kaplan_meier) export(a_lsmeans) +export(a_maxlev) export(a_odds_ratio_j) export(a_patyrs_j) export(a_proportion_ci_factor) @@ -23,6 +27,7 @@ export(a_summarize_aval_chg_diff_j) export(a_summarize_ex_j) export(a_summarize_mmrm) export(a_test_proportion_diff) +export(a_two_tier) export(analyze_values) export(bspt_pruner) export(build_formula) @@ -35,37 +40,28 @@ export(cond_rm_facets) export(count_pruner) export(create_colspan_map) export(create_colspan_var) -export(d_test_proportion_diff_j) export(def_colwidths) export(default_str_map) +export(do_exclude_split) +export(export_as_docx_j) +export(export_graph_as_docx) export(find_missing_chg_after_avisit) export(fit_ancova) export(fit_mmrm_j) export(format_stats) -export(format_xx_fct) export(get_mmrm_lsmeans) export(get_ref_info) export(get_titles_from_file) export(get_visit_levels) -export(h_a_freq_dataprep) -export(h_a_freq_prepinrows) -export(h_colexpr_substr) -export(h_create_altdf) -export(h_denom_parentdf) -export(h_df_add_newlevels) export(h_extract_coxreg_multivar) export(h_get_design_mat) -export(h_get_label_map) export(h_get_trtvar_refpath) -export(h_subset_combo) export(h_tidy_pool) -export(h_upd_dfrow) -export(h_update_factor) export(inches_to_spaces) export(insert_blank_line) export(jj_complex_scorefun) -export(jj_uc_map) export(jjcs_num_formats) +export(jjcsformat_cnt_den_fract_fct) export(jjcsformat_count_denom_fraction) export(jjcsformat_count_fraction) export(jjcsformat_fraction_count_denom) @@ -95,6 +91,7 @@ export(rbmi_analyse) export(rbmi_ancova) export(rbmi_ancova_single) export(rbmi_mmrm) +export(rbmi_pool) export(real_add_overall_facet) export(remove_col_count) export(remove_rows) @@ -106,6 +103,7 @@ export(resp01_split_fun_fct) export(response_by_var) export(rm_levels) export(s_ancova_j) +export(s_cmhrms_j) export(s_coxph_hr) export(s_event_free) export(s_freq_j) @@ -124,8 +122,11 @@ export(string_to_title) export(summarize_coxreg_multivar) export(summarize_lsmeans_wide) export(summarize_row_counts) +export(theme_docx_default_j) +export(tt_to_flextable_j) export(tt_to_tlgrtf) export(var_relabel_list) +import(checkmate) import(formatters) import(methods) import(rlistings) diff --git a/NEWS.md b/NEWS.md index 56c155af..49f41f39 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,35 @@ -# junco 0.1.1.1 +# junco 0.1.2 -* Fixed bug in `s_summarize_desc_j` function to handle sparse data (zero variance) cases (#78) +### New Major features +- Add docx exporter for Tables, Listings and Figures. +- Add `a_cmhrms_j()` to support p-value from CMH row mean score test, as well as the modified version `a_cmhrms_j_with_exclude()` that allows to exclude the analysis from specified row splits. #97 +- Added standard error (SE) column for each treatment arm's least square (LS) means estimate to the `summarize_lsmeans_wide()` layout. +- Add `a_maxlev()` to be able to calculate count and percentage of the maximum level of an ordered factor per subject +- Added `cmh_sato` and `cmh_mn` (Cochran-Mantel-Haenszel stratified proportion difference estimation with Sato variance and Miettinen Nurminen method, respectively) `method` options to the `s_proportion_diff_j()` function. +- Added formatting function round type (#76) + +### Minor changes +- Add `a_two_tier()` analysis function +- Remove `brackets_to_rtf()` +- Export `rbmi_pool()` #22 +- Add functionality to `a_freq_j()` to process `val = NULL` from levels specified in `label_map`, as well as the modified version `a_freq_j_with_exclude()` that allows to exclude the analysis from specified row splits. #95 +- Added the internal function `do_exclude_split()` to facilitate the exclusion of specified row splits from analysis functions. +- Remove some unused functions (jj_uc_map, postfun_cog, postfun_eq5d, column_N, non_blank_sentinel, null_fn, unicodify +- Add extra check for existence of `.alt_df_full` when layout has risk difference column and a row-split (h_create_alt_df) #120. +- Add `alignments` argument in `tt_to_tlgrtf()` +- Removed `s_test_proportion_diff()` and corresponding helper functions, as they are now available as needed in the `tern` package. +- Replace {pharmaverseadam} with {pharmaverseadamjnj} +- Update pruning_functions.R +- Update `string_to_title()` to handle factors (#26) +- Moved rbmi to suggest +- Replaced `denom_df` with `.alt_df_full` in `a_maxlev()`. + +### Fixed +- Fixes #102 bug inappropriate warnings from `cond_rm_facets` function +- Fix bug for not selecting NA records in `h_subset_combo()` +- Consistent `tt_to_tbldf()` function behavior with invalid structures #116 + + +## Other changes + +* Moved 'rbmi' from 'Imports' to 'Suggests' and made package fully functional without it diff --git a/R/a_eair_j.R b/R/a_eair_j.R index 109640e0..65ec45bf 100644 --- a/R/a_eair_j.R +++ b/R/a_eair_j.R @@ -14,9 +14,9 @@ NULL #' @param inriskdiffcol (`logical`)\cr flag indicating if the function is called within a risk difference column. #' #' @return -#' * `s_patyrs_j()` return x a list containing the patient years statistics. -#' The list of available statistics for can be viewed by running `junco_get_stats("a_patyrs_j")`, -#' currently this is just a single statistic `patyrs`, patient years of exposure. +#' * `s_patyrs_j()` returns a list containing the patient years statistics. +#' The list of available statistics for can be viewed by running `junco_get_stats("a_patyrs_j")`. +#' Currently, this is just a single statistic `patyrs`, patient years of exposure. #' #' @keywords internal s_patyrs_j <- function( @@ -78,14 +78,14 @@ s_patyrs_j <- function( #' cutoffd <- as.Date("2023-09-24") #' #' -#' adexsum <- ex_adsl %>% +#' adexsum <- ex_adsl |> #' create_colspan_var( #' non_active_grp = ctrl_grp, #' non_active_grp_span_lbl = " ", #' active_grp_span_lbl = "Active Study Agent", #' colspan_var = "colspan_trt", #' trt_var = trtvar -#' ) %>% +#' ) |> #' mutate( #' rrisk_header = "Risk Difference (95% CI)", #' rrisk_label = paste(!!rlang::sym(trtvar), "vs", ctrl_grp), @@ -93,17 +93,17 @@ s_patyrs_j <- function( #' !is.na(EOSDY) ~ EOSDY, #' TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) #' ) -#' ) %>% +#' ) |> #' select(USUBJID, !!rlang::sym(trtvar), colspan_trt, rrisk_header, rrisk_label, TRTDURY) #' -#' adae <- ex_adae %>% -#' group_by(USUBJID, AEDECOD) %>% -#' select(USUBJID, AEDECOD, ASTDY) %>% -#' mutate(rwnum = row_number()) %>% +#' adae <- ex_adae |> +#' group_by(USUBJID, AEDECOD) |> +#' select(USUBJID, AEDECOD, ASTDY) |> +#' mutate(rwnum = row_number()) |> #' mutate(AOCCPFL = case_when( #' rwnum == 1 ~ "Y", #' TRUE ~ NA -#' )) %>% +#' )) |> #' filter(AOCCPFL == "Y") #' #' aefup <- left_join(adae, adexsum, by = "USUBJID") @@ -118,11 +118,15 @@ s_patyrs_j <- function( #' #' ref_path <- c("colspan_trt", " ", trtvar, ctrl_grp) #' -#' lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") %>% -#' split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) %>% -#' split_cols_by(trtvar) %>% -#' split_cols_by("rrisk_header", nested = FALSE) %>% -#' split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) %>% +#' ################################################################################ +#' # Define layout and build table: +#' ################################################################################ +#' +#' lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") |> +#' split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> +#' split_cols_by(trtvar) |> +#' split_cols_by("rrisk_header", nested = FALSE) |> +#' split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) |> #' analyze("TRTDURY", #' nested = FALSE, #' show_labels = "hidden", @@ -215,7 +219,7 @@ a_patyrs_j <- function( #' @name a_eair100_j NULL - +#' @noRd #' @describeIn a_eair100_j #' calculates exposure-adjusted incidence rates (EAIR) per 100 person-years for a #' specific level of a variable. @@ -244,7 +248,6 @@ NULL #' \item person_years: Total person-years of follow-up #' \item eair: Exposure-adjusted incidence rate per 100 person-years #' \item eair_diff: Risk difference in EAIR (if diff=TRUE and inriskdiffcol=TRUE) -#' \item eair_diff_ci: Confidence interval for the risk difference (if diff=TRUE and inriskdiffcol=TRUE) #' }.\cr #' The list of available statistics (core columns) can also be viewed by running `junco_get_stats("a_eair100_j")` #' @@ -394,14 +397,14 @@ s_eair100_levii_j <- function( #' cutoffd <- as.Date("2023-09-24") #' #' -#' adexsum <- ex_adsl %>% +#' adexsum <- ex_adsl |> #' create_colspan_var( #' non_active_grp = ctrl_grp, #' non_active_grp_span_lbl = " ", #' active_grp_span_lbl = "Active Study Agent", #' colspan_var = "colspan_trt", #' trt_var = trtvar -#' ) %>% +#' ) |> #' mutate( #' rrisk_header = "Risk Difference (95% CI)", #' rrisk_label = paste(!!rlang::sym(trtvar), "vs", ctrl_grp), @@ -409,19 +412,19 @@ s_eair100_levii_j <- function( #' !is.na(EOSDY) ~ EOSDY, #' TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) #' ) -#' ) %>% +#' ) |> #' select(USUBJID, !!rlang::sym(trtvar), colspan_trt, rrisk_header, rrisk_label, TRTDURY) #' #' adexsum$TRTDURY <- as.numeric(adexsum$TRTDURY) #' -#' adae <- ex_adae %>% -#' group_by(USUBJID, AEDECOD) %>% -#' select(USUBJID, AEDECOD, ASTDY) %>% -#' mutate(rwnum = row_number()) %>% +#' adae <- ex_adae |> +#' group_by(USUBJID, AEDECOD) |> +#' select(USUBJID, AEDECOD, ASTDY) |> +#' mutate(rwnum = row_number()) |> #' mutate(AOCCPFL = case_when( #' rwnum == 1 ~ "Y", #' TRUE ~ NA -#' )) %>% +#' )) |> #' filter(AOCCPFL == "Y") #' #' aefup <- left_join(adae, adexsum, by = "USUBJID") @@ -436,17 +439,20 @@ s_eair100_levii_j <- function( #' #' ref_path <- c("colspan_trt", " ", trtvar, ctrl_grp) #' +#' ################################################################################ +#' # Define layout and build table: +#' ################################################################################ #' -#' lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") %>% -#' split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) %>% -#' split_cols_by(trtvar) %>% -#' split_cols_by("rrisk_header", nested = FALSE) %>% -#' split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) %>% +#' lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") |> +#' split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> +#' split_cols_by(trtvar) |> +#' split_cols_by("rrisk_header", nested = FALSE) |> +#' split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) |> #' analyze("TRTDURY", #' nested = FALSE, #' show_labels = "hidden", #' afun = a_patyrs_j -#' ) %>% +#' ) |> #' analyze( #' vars = "AEDECOD", #' nested = FALSE, diff --git a/R/a_freq_combos_j.R b/R/a_freq_combos_j.R index 74d42594..17c3f909 100644 --- a/R/a_freq_combos_j.R +++ b/R/a_freq_combos_j.R @@ -5,9 +5,10 @@ #' @inheritParams proposal_argument_convention #' @inheritParams a_freq_j #' -#' @param combosdf The df which provides the mapping of facets to produce cumulative counts for .N_col. -#' @note: These extra records must then be removed from the numerator via the filter_var parameter -#' to avoid double counting of events. +#' @param combosdf The df which provides the mapping of column facets to produce cumulative counts for .N_col.\cr +#' In the cell facet, these cumulative records must then be removed from the numerator, +#' which can be done via the filter_var parameter +#' to avoid unwanted counting of events. #' @param do_not_filter A vector of facets (i.e., column headers), identifying headers for which #' no filtering of records should occur. #' That is, the numerator should contain cumulative counts. Generally, this will be used for a @@ -16,7 +17,6 @@ #' Generally, this will contain text matching the column header for the column associated with a given record. #' @param flag_var Variable which identifies the occurrence (or first occurrence) of an event. #' The flag variable is expected to have a value of "Y" identifying that the event should be counted, or NA otherwise. - #' @param denom (`string`)\cr #' One of \cr #' \itemize{ @@ -33,8 +33,70 @@ #' @param .formats (named 'character' or 'list')\cr #' formats for the statistics. #' @return list of requested statistics with formatted `rtables::CellValue()`.\cr +#' +#' @examples +#' library(dplyr) +#' ADSL <- ex_adsl |> select(USUBJID, ARM, EOSSTT, EOSDT, EOSDY, TRTSDTM) +#' +#' cutoffd <- as.Date("2023-09-24") +#' +#' ADSL <- ADSL |> +#' mutate( +#' TRTDURY = case_when( +#' !is.na(EOSDY) ~ EOSDY, +#' TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) +#' ) +#' ) |> +#' mutate(ACAT1 = case_when( +#' TRTDURY < 183 ~ "0-6 Months", +#' TRTDURY < 366 ~ "6-12 Months", +#' TRUE ~ "+12 Months" +#' )) |> +#' mutate(ACAT1 = factor(ACAT1, levels = c("0-6 Months", "6-12 Months", "+12 Months"))) +#' +#' +#' ADAE <- ex_adae |> select(USUBJID, ARM, AEBODSYS, AEDECOD, ASTDY) +#' +#' ADAE <- ADAE |> +#' mutate(TRTEMFL = "Y") |> +#' mutate(ACAT1 = case_when( +#' ASTDY < 183 ~ "0-6 Months", +#' ASTDY < 366 ~ "6-12 Months", +#' TRUE ~ "+12 Months" +#' )) |> +#' mutate(ACAT1 = factor(ACAT1, levels = c("0-6 Months", "6-12 Months", "+12 Months"))) +#' +#' combodf <- tribble( +#' ~valname, ~label, ~levelcombo, ~exargs, +#' "Tot", "Total", c("0-6 Months", "6-12 Months", "+12 Months"), list(), +#' "A_0-6 Months", "0-6 Months", c("0-6 Months", "6-12 Months", "+12 Months"), list(), +#' "B_6-12 Months", "6-12 Months", c("6-12 Months", "+12 Months"), list(), +#' "C_+12 Months", "+12 Months", c("+12 Months"), list() +#' ) +#' +#' +#' lyt <- basic_table(show_colcounts = TRUE) |> +#' split_cols_by("ARM") |> +#' split_cols_by("ACAT1", +#' split_fun = add_combo_levels(combosdf = combodf, trim = FALSE, keep_levels = combodf$valname) +#' ) |> +#' analyze("TRTEMFL", +#' show_labels = "hidden", +#' afun = a_freq_combos_j, +#' extra_args = list( +#' val = "Y", +#' label = "Subjects with >= 1 AE", +#' combosdf = combodf, +#' filter_var = "ACAT1", +#' do_not_filter = "Tot" +#' ) +#' ) +#' +#' +#' result <- build_table(lyt, df = ADAE, alt_counts_df = ADSL) +#' +#' result #' @export - a_freq_combos_j <- function( df, labelstr = NULL, @@ -105,7 +167,7 @@ a_freq_combos_j <- function( alt_df <- res_dataprep$alt_df parentdf <- res_dataprep$parentdf new_denomdf <- res_dataprep$new_denomdf - .stats <- .stats + .stats <- res_dataprep$.stats ## colid can be used to figure out if we're in the combo column or not colid <- .spl_context$cur_col_id[[1]] diff --git a/R/a_freq_j.R b/R/a_freq_j.R index 591b8ae7..8ddcfa81 100644 --- a/R/a_freq_j.R +++ b/R/a_freq_j.R @@ -4,7 +4,6 @@ #' and (optional) relative risk columns #' #' @inheritParams proposal_argument_convention - #' @param val (`character` or NULL)\cr #' When NULL, all levels of the incoming variable (variable used in the `analyze` call) #' will be considered.\cr @@ -74,21 +73,21 @@ #' } #' #' @export - #' @importFrom stats setNames s_freq_j <- function( - df, - .var, - .df_row, - val = NULL, - drop_levels = FALSE, - excl_levels = NULL, - alt_df, - parent_df, - id = "USUBJID", - denom = c("n_df", "n_altdf", "N_col", "n_rowdf", "n_parentdf"), - .N_col, - countsource = c("df", "altdf")) { + df, + .var, + .df_row, + val = NULL, + drop_levels = FALSE, + excl_levels = NULL, + alt_df, + parent_df, + id = "USUBJID", + denom = c("n_df", "n_altdf", "N_col", "n_rowdf", "n_parentdf"), + .N_col, + countsource = c("df", "altdf") +) { if (is.na(.var) || is.null(.var)) { stop("Argument .var cannot be NA or NULL.") } @@ -207,18 +206,19 @@ s_freq_j <- function( } s_rel_risk_levii_j <- function( - levii, - df, - .var, - ref_df, - ref_denom_df, - .in_ref_col, - curgrp_denom_df, - id, - variables, - conf_level, - method, - weights_method) { + levii, + df, + .var, + ref_df, + ref_denom_df, + .in_ref_col, + curgrp_denom_df, + id, + variables, + conf_level, + method, + weights_method +) { dfii <- df[df[[.var]] == levii & !is.na(df[[.var]]), ] ref_dfii <- ref_df[ref_df[[.var]] == levii & !is.na(ref_df[[.var]]), ] @@ -250,31 +250,32 @@ s_rel_risk_levii_j <- function( s_rel_risk_val_j <- function( - df, - .var, - .df_row, - ctrl_grp, - cur_trt_grp, - trt_var, - val = NULL, - drop_levels = FALSE, - excl_levels = NULL, - denom_df, - id = "USUBJID", - riskdiff = TRUE, - variables = list(strata = NULL), - conf_level = 0.95, - method = c( - "waldcc", - "wald", - "cmh", - "ha", - "newcombe", - "newcombecc", - "strat_newcombe", - "strat_newcombecc" - ), - weights_method = "cmh") { + df, + .var, + .df_row, + ctrl_grp, + cur_trt_grp, + trt_var, + val = NULL, + drop_levels = FALSE, + excl_levels = NULL, + denom_df, + id = "USUBJID", + riskdiff = TRUE, + variables = list(strata = NULL), + conf_level = 0.95, + method = c( + "waldcc", + "wald", + "cmh", + "ha", + "newcombe", + "newcombecc", + "strat_newcombe", + "strat_newcombecc" + ), + weights_method = "cmh" +) { if (drop_levels) { obs_levs <- unique(.df_row[[.var]]) obs_levs <- intersect(levels(.df_row[[.var]]), obs_levs) @@ -376,7 +377,6 @@ s_rel_risk_val_j <- function( #' @inheritParams proposal_argument_convention #' @param .stats (`character`)\cr statistics to select for the table. #' See Value for list of available statistics. -#' #' @param riskdiff (`logical`)\cr #' When `TRUE`, risk difference calculations will be performed and #' presented (if required risk difference column splits are included).\cr @@ -390,42 +390,32 @@ s_rel_risk_val_j <- function( #' @param method Will be passed onto the relative risk function (internal function s_rel_risk_val_j).\cr #' @param weights_method Will be passed onto the relative risk function (internal function s_rel_risk_val_j).\cr #' @param label (`string`)\cr -#' When `val`is a single `string`, +#' When `val` has length 1, #' the row label to be shown on the output can be specified using this argument.\cr #' When `val` is a `character vector`, the `label_map` argument can be specified #' to control the row-labels. -#' #' @param labelstr An argument to ensure this function can be used #' as a `cfun` in a `summarize_row_groups` call.\cr #' It is recommended not to utilize this argument for other purposes.\cr #' The label argument could be used instead (if `val` is a single string)\cr #' An another approach could be to utilize the `label_map` argument #' to control the row labels of the incoming analysis variable. -#' -#' #' @param label_fstr (`string`)\cr #' a sprintf style format string. -#' It can contain up to one "\%s" which takes the current split value and +#' It can contain up to one `"%s"`, which takes the current split value and #' generates the row/column label.\cr #' It will be combined with the `labelstr` argument, #' when utilizing this function as #' a `cfun` in a `summarize_row_groups` call.\cr #' It is recommended not to utilize this argument for other purposes. #' The label argument could be used instead (if `val` is a single string)\cr -#' #' @param label_map (`tibble`)\cr #' A mapping tibble to translate levels from the incoming variable into #' a different row label to be presented on the table.\cr - -#' #' @param .alt_df_full (`dataframe`)\cr Denominator dataset #' for fraction and relative risk calculations.\cr -#' .alt_df_full is a crucial parameter for the relative risk calculations -#' if this parameter is not set to utilize `alt_counts_df`, -#' then the values in the relative risk columns might not be correct.\cr -#' Once the rtables PR is integrated, this argument gets populated by the rtables +#' this argument gets populated by the rtables #' split machinery (see [rtables::additional_fun_params]). -#' #' @param denom_by (`character`)\cr Variables from row-split #' to be used in the denominator derivation.\cr #' This controls both `denom = "n_parentdf"` and `denom = "n_altdf"`.\cr @@ -447,7 +437,6 @@ s_rel_risk_val_j <- function( #' @param colgroup The name of the column group variable that is used as source #' for denominator calculation.\cr #' Required to be specified when `denom = "N_colgroup"`. -#' #' @param addstr2levs string, if not NULL will be appended to the rowlabel for that level, #' eg to add ",n (percent)" at the end of the rowlabels #' @@ -597,52 +586,52 @@ s_rel_risk_val_j <- function( #' For the others (count_unique_fraction, count_unique_denom_fraction), #' the statistic is replaced by the relative risk difference + confidence interval. #' @export -#' a_freq_j <- function( - df, - labelstr = NULL, - .var = NA, - val = NULL, - drop_levels = FALSE, - excl_levels = NULL, - new_levels = NULL, - new_levels_after = FALSE, - addstr2levs = NULL, - .df_row, - .spl_context, - .N_col, - id = "USUBJID", - denom = c("N_col", "n_df", "n_altdf", "N_colgroup", "n_rowdf", "n_parentdf"), - riskdiff = TRUE, - ref_path = NULL, - variables = list(strata = NULL), - conf_level = 0.95, - method = c( - "wald", - "waldcc", - "cmh", - "ha", - "newcombe", - "newcombecc", - "strat_newcombe", - "strat_newcombecc" - ), - weights_method = "cmh", - label = NULL, - label_fstr = NULL, - label_map = NULL, - .alt_df_full = NULL, - denom_by = NULL, - .stats = c("count_unique_denom_fraction"), - .formats = NULL, - .indent_mods = NULL, - na_str = rep("NA", 3), - .labels_n = NULL, - extrablankline = FALSE, - extrablanklineafter = NULL, - restr_columns = NULL, - colgroup = NULL, - countsource = c("df", "altdf")) { + df, + labelstr = NULL, + .var = NA, + val = NULL, + drop_levels = FALSE, + excl_levels = NULL, + new_levels = NULL, + new_levels_after = FALSE, + addstr2levs = NULL, + .df_row, + .spl_context, + .N_col, + id = "USUBJID", + denom = c("N_col", "n_df", "n_altdf", "N_colgroup", "n_rowdf", "n_parentdf"), + riskdiff = TRUE, + ref_path = NULL, + variables = list(strata = NULL), + conf_level = 0.95, + method = c( + "wald", + "waldcc", + "cmh", + "ha", + "newcombe", + "newcombecc", + "strat_newcombe", + "strat_newcombecc" + ), + weights_method = "cmh", + label = NULL, + label_fstr = NULL, + label_map = NULL, + .alt_df_full = NULL, + denom_by = NULL, + .stats = c("count_unique_denom_fraction"), + .formats = NULL, + .indent_mods = NULL, + na_str = rep("NA", 3), + .labels_n = NULL, + extrablankline = FALSE, + extrablanklineafter = NULL, + restr_columns = NULL, + colgroup = NULL, + countsource = c("df", "altdf") +) { denom <- match.arg(denom) method <- match.arg(method) @@ -706,7 +695,7 @@ a_freq_j <- function( alt_df <- res_dataprep$alt_df parentdf <- res_dataprep$parentdf new_denomdf <- res_dataprep$new_denomdf - .stats <- .stats + .stats <- res_dataprep$.stats ## prepare for column based split col_expr <- .spl_context$cur_col_expr[[1]] @@ -888,10 +877,49 @@ a_freq_j <- function( ### add extra blankline to the end of inrows --- as long as section_div is not working as expected # nolint start - if (!is.null(inrows) && extrablankline || + if (!is.null(inrows) && extrablankline || (!is.null(extrablanklineafter) && length(.labels) == 1 && .labels == extrablanklineafter)) { inrows <- add_blank_line_rcells(inrows) } # nolint end return(inrows) } + +#' @describeIn a_freq_j Wrapper for the `afun` which can exclude +#' row split levels from producing the analysis. These have to be specified in the +#' `exclude_levels` argument, see `?do_exclude_split` for details. +#' @export +a_freq_j_with_exclude <- function( + df, + labelstr = NULL, + exclude_levels, + .var = NA, + .spl_context, + .df_row, + .N_col, + .alt_df_full = NULL, + .stats = "count_unique_denom_fraction", + .formats = NULL, + .indent_mods = NULL, + .labels_n = NULL, + ... +) { + if (do_exclude_split(exclude_levels, .spl_context)) { + NULL + } else { + a_freq_j( + df = df, + labelstr = labelstr, + .var = .var, + .spl_context = .spl_context, + .df_row = .df_row, + .N_col = .N_col, + .alt_df_full = .alt_df_full, + .stats = .stats, + .formats = .formats, + .indent_mods = .indent_mods, + .labels_n = .labels_n, + ... + ) + } +} diff --git a/R/a_freq_resp_var_j.R b/R/a_freq_resp_var_j.R index c8d1ab45..347559cf 100644 --- a/R/a_freq_resp_var_j.R +++ b/R/a_freq_resp_var_j.R @@ -19,10 +19,31 @@ #' @param weights_method (`character`)\cr method for calculating weights. #' @param ... Additional arguments passed to other functions. #' -#' @return A list of rcell objects containing the response statistics. +#' @return Formatted analysis function which is used as `afun` in `analyze_vars()` +#' and as `cfun` in `summarize_row_groups()`. #' #' @export -#' @keywords internal +#' +#' @examples +#' library(dplyr) +#' ADSL <- ex_adsl |> select(USUBJID, ARM, SEX) +#' +#' ADAE <- ex_adae |> select(USUBJID, ARM, SEX, AEBODSYS, AEDECOD) +#' +#' ADAE <- ADAE |> +#' mutate(TRTEMFL = "Y") +#' +#' lyt <- basic_table(show_colcounts = TRUE) |> +#' split_cols_by("ARM") |> +#' analyze("SEX", +#' show_labels = "visible", +#' afun = a_freq_resp_var_j, +#' extra_args = list(resp_var = "TRTEMFL", riskdiff = FALSE) +#' ) +#' +#' result <- build_table(lyt, df = ADAE, alt_counts_df = ADSL) +#' +#' result a_freq_resp_var_j <- function( df, .var, diff --git a/R/a_freq_subcol_j.R b/R/a_freq_subcol_j.R index c64e8eee..78a3c9e0 100644 --- a/R/a_freq_subcol_j.R +++ b/R/a_freq_subcol_j.R @@ -5,12 +5,11 @@ #' #' @inheritParams proposal_argument_convention #' @inheritParams a_freq_j -#' @param subcol_split Text to search colid to determine whether further subsetting +#' @param subcol_split (`string`)\cr text to search colid to determine whether further subsetting #' should be performed. -#' @param subcol_var Name of variable containing to be searched for the text +#' @param subcol_var (`string`)\cr name of variable containing to be searched for the text #' identified in subcol_val argument. -#' @param subcol_val Value to use to perform further data sub-setting. - +#' @param subcol_val (`string`)\cr value to use to perform further data sub-setting. #' @param denom (`string`)\cr #' One of \cr #' \itemize{ @@ -29,7 +28,48 @@ #' #' @return list of requested statistics with formatted `rtables::CellValue()`.\cr #' @export - +#' +#' @examples +#' library(dplyr) +#' +#' ADSL <- ex_adsl |> +#' select(USUBJID, ARM) +#' +#' ADSL$COLSPAN_REL <- "AEs" +#' +#' ADAE <- ex_adae |> +#' select(USUBJID, ARM, AEDECOD, AREL) +#' +#' ADAE <- ADAE |> +#' mutate( +#' AEREL = case_when( +#' AREL == "Y" ~ "RELATED", +#' AREL == "N" ~ "NOT RELATED" +#' ), +#' AEREL = factor(AEREL), +#' COLSPAN_REL = "AEs" +#' ) +#' +#' combodf <- tribble( +#' ~valname, ~label, ~levelcombo, ~exargs, +#' "RELATED", "Related AEs", c("AEs"), list() +#' ) +#' +#' lyt <- basic_table(show_colcounts = TRUE) |> +#' split_cols_by("COLSPAN_REL", split_fun = add_combo_levels(combodf, trim = TRUE)) |> +#' split_cols_by("ARM") |> +#' analyze("AEDECOD", +#' afun = a_freq_subcol_j, +#' extra_args = list( +#' subcol_split = "RELATED", +#' subcol_var = "AEREL", +#' subcol_val = "RELATED" +#' ) +#' ) +#' +#' result <- build_table(lyt, ADAE, alt_counts_df = ADSL) +#' +#' result a_freq_subcol_j <- function( df, labelstr = NULL, @@ -99,7 +139,7 @@ a_freq_subcol_j <- function( alt_df <- res_dataprep$alt_df parentdf <- res_dataprep$parentdf new_denomdf <- res_dataprep$new_denomdf - .stats <- .stats + .stats <- res_dataprep$.stats ## colid can be used to figure out if we're in subcolum colid <- .spl_context$cur_col_id[[1]] diff --git a/R/a_maxlev.R b/R/a_maxlev.R new file mode 100644 index 00000000..af36a12f --- /dev/null +++ b/R/a_maxlev.R @@ -0,0 +1,128 @@ +#' Calculate Count and Percentage of the Maximum Level of an Ordered Factor per +#' Subject. +#' +#' @description A formatted analysis function used as an `afun` in +#' \link[rtables]{analyze} and as a `cfun` in \link[rtables]{summarize_row_groups}. +#' +#' It computes count and proportion statistics for the maximum level of an +#' ordered factor, `df[[.var]]`, for each unique subject in `df[[id]]`. +#' Specifically, for each subject, the function identifies the highest level +#' of `df[[.var]]`, producing one value per subject. +#' Then, if `any_level = TRUE`, the function reports the total number of +#' maximum values, excluding those specified in `any_level_exclude`. +#' Otherwise, it tabulates the frequency of each maximum level across all +#' subjects. +#' +#' This function is particularly useful for identifying the maximum severity of +#' adverse events in a treatment sequence, where the most severe event +#' experienced by a subject is used for reporting. +#' +#' @note The denominator for proportions is computed using the `denom_df` +#' argument. This serves as a temporary workaround until the next version of +#' `rtables` is released, which will support `.alt_count_df` for use in +#' `afun`/`cfun`. +#' +#' @details For each unique subject, only the maximum level of the ordered factor +#' `df[[.var]]` is included in the final count and percentage statistics. +#' +#' @inheritParams proposal_argument_convention +#' @param .alt_df_full (`dataframe`)\cr A dataset used to compute the +#' denominator for proportions. This is required when the same subject appears +#' multiple times in the dataset due to treatment sequences. +#' `colnames(.alt_df_full)` must be a superset of `id`. +#' This argument gets populated by the rtables split machinery +#' (see [rtables::additional_fun_params]). +#' @param any_level (`flag`)\cr +#' Should be set to `TRUE` when the function is used as a `cfun`. +#' @param any_level_exclude (`character`)\cr +#' Applicable only when `any_level = TRUE`. Specifies levels of `df[[.var]]` +#' to exclude from the statistic (default = "Missing"). +#' +#' @returns A `RowsVerticalSection` object. +#' @export +#' +#' @examples +#' treatments <- factor(c("a", "b", "c")) +#' ae_severities <- c("Missing", "Mild", "Moderate", "Severe") +#' ae_severities <- ordered(ae_severities, levels = ae_severities) +#' my_adae <- data.frame( +#' ID = c(1, 1, 1, 2, 2, 3, 3, 3, 3, 4), +#' TRT = factor(c("a", "b", "b", "b", "c", "c", "a", "c", "b", "b")), +#' AESEV = ae_severities[c(4L, 1L, 2L, 1L, 2L, 1L, 2L, 3L, 1L, 2L)] +#' ) +#' my_adsl <- data.frame( +#' ID = rep(1:5, each = 3), +#' TRT = factor(rep(c("a", "b", "c"), times = 5)) +#' ) +#' +#' aesevall_spf <- make_combo_splitfun( +#' nm = "AESEV_ALL", +#' label = "Any AE", +#' levels = NULL, +#' ) +#' +#' lyt <- basic_table() |> +#' split_cols_by("TRT") |> +#' add_overall_col("Total") |> +#' split_rows_by("AESEV", split_fun = aesevall_spf) |> +#' summarize_row_groups( +#' "AESEV", +#' cfun = a_maxlev, +#' extra_args = list(id = "ID", any_level = TRUE) +#' ) |> +#' analyze( +#' "AESEV", +#' afun = a_maxlev, +#' extra_args = list(id = "ID") +#' ) +#' build_table(lyt, my_adae, alt_counts_df = my_adsl) +a_maxlev <- function(df, + labelstr = NULL, + .var, + .spl_context, + id = "USUBJID", + .alt_df_full = NULL, + any_level = FALSE, + any_level_exclude = "Missing", + ...) { + checkmate::assert_factor(df[[.var]], ordered = TRUE, any.missing = FALSE) + checkmate::assert_string(id) + checkmate::assert_subset(id, choices = colnames(df)) + checkmate::assert_subset(id, choices = colnames(.alt_df_full)) + checkmate::assert_flag(any_level) + checkmate::assert_character(any_level_exclude, any.missing = FALSE, unique = TRUE) + + varvec <- df[[.var]] + levs <- levels(varvec) + levs_lab <- if (any_level) { + labelstr + } else { + levs + } + + N_row <- nrow(df) + count_pct <- if (N_row != 0) { + max_per_id <- tapply(varvec, df[[id]], max) + max_per_id <- ordered(levs[max_per_id], levels = levs) # tapply loses levels of varvec. + + count_max <- if (any_level) { + sum(max_per_id != any_level_exclude) + } else { + table(max_per_id) + } + + cur_col <- subset(.alt_df_full, eval(.spl_context$cur_col_expr[[1]])) + N <- length(unique(cur_col[[id]])) + as.list(data.frame(rbind(count_max, count_max / N))) + } else { + rep(list(NA), length(levs_lab)) + } + + count_pct <- setNames(count_pct, levs_lab) + + in_rows( + .list = count_pct, + .formats = jjcsformat_count_fraction, + .format_na_strs = "-" + ) +} diff --git a/R/a_summarize_aval_chg_diff.R b/R/a_summarize_aval_chg_diff.R index e1f1a068..964b1095 100644 --- a/R/a_summarize_aval_chg_diff.R +++ b/R/a_summarize_aval_chg_diff.R @@ -219,13 +219,11 @@ format_xxd <- function(str, d = 0, .df_row, formatting_fun = NULL) { #' #' @title Analysis function 3-column presentation #' -#' @inherit proposal_argument_convention -#' #' @description Analysis functions to produce a 1-row summary presented in -#' a 3-column layout in the columns: column 1: N, column 2: Value, column 3: change\cr +#' a 3-column layout in the columns (column 1 = N, column 2 = Value, column 3 = Change).\cr #' In the difference columns, only 1 column will be presented : difference + CI\cr #' When ancova = `TRUE`, the presented statistics will be based on ANCOVA method (`s_summarize_ancova_j`).\cr -#' mean and ci (both for Value (column 2) and Chg (column 3)) using statistic `lsmean_ci`\cr +#' mean and ci (both for Value (column 2) and CHG (column 3)) using statistic `lsmean_ci`\cr #' mean and ci for the difference column are based on same ANCOVA model using statistic `lsmean_diffci`\cr #' When ancova = `FALSE`, descriptive statistics will be used instead.\cr #' In the difference column, the 2-sample t-test will be used. @@ -249,11 +247,11 @@ format_xxd <- function(str, d = 0, .df_row, formatting_fun = NULL) { #' then be an integer. #' #' @param ancova (`logical`)\cr If FALSE, only descriptive methods will be used. \cr -#' If TRUE Ancova methods will be used for each of the columns : AVAL, CHG, DIFF. \cr -#' @param comp_btw_group (`logical`)\cr If TRUE, +#' If TRUE, ANCOVA methods will be used for each of the columns : AVAL, CHG, DIFF. \cr +#' @param comp_btw_group (`logical`)\cr If TRUE, comparison between groups will be performed. #' \cr When ancova = FALSE, the estimate of between group difference (on CHG) -#' will be based upon a two-sample t-test. \cr -#' \cr When ancova = TRUE, the same ancova model will be used for the estimate of between group difference (on CHG). +#' will be based upon a two-sample t-test. +#' \cr When ancova = TRUE, the same ANCOVA model will be used for the estimate of between group difference (on CHG). #' #' @param interaction_y (`character`)\cr Will be passed onto the `tern` function `s_ancova`, when ancova = TRUE. #' @param interaction_item (`character`)\cr Will be passed onto the `tern` function `s_ancova`, when ancova = TRUE. @@ -276,8 +274,8 @@ format_xxd <- function(str, d = 0, .df_row, formatting_fun = NULL) { #' @param .stats (named `list`)\cr column statistics to select for the table. #' The following column names are to be used: `col1`, `col23`, `coldiff`.\cr #' For `col1`, the following stats can be specified.\cr -#' For `col23`, only `mean_ci_3d` is available. When ancova=`TRUE` these are LS Means, otherwise, arithmetic means.\cr -#' For `coldiff`, only `meandiff_ci_3d` is available. When ancova=`TRUE` these +#' For `col23`, only `mean_ci_3d` is available. When ancova = `TRUE` these are LS Means, otherwise, arithmetic means.\cr +#' For `coldiff`, only `meandiff_ci_3d` is available. When ancova = `TRUE` these #' are LS difference in means, otherwise, difference in means based upon 2-sample t-test.\cr #' @param .formats (named `list`)\cr formats for the column statistics. `xx.d` style formats can be used. #' @param .formats_fun (named `list`)\cr formatting functions for the column @@ -290,7 +288,6 @@ format_xxd <- function(str, d = 0, .df_row, formatting_fun = NULL) { #' #' #' @examples -#' #' library(dplyr) #' #' ADEG <- data.frame( diff --git a/R/a_summarize_ex_j.R b/R/a_summarize_ex_j.R index 39f70d9e..d4bd9943 100644 --- a/R/a_summarize_ex_j.R +++ b/R/a_summarize_ex_j.R @@ -2,7 +2,7 @@ #' #' #' @details -#' Creates statistics needed for standard exposure table +#' Creates statistics needed for standard exposure table. #' This includes differences and 95% CI and total treatment years. #' This is designed to be used as an analysis (afun in `analyze`) function. #' @@ -11,16 +11,15 @@ NULL #' @inheritParams proposal_argument_convention -#' @describeIn a_summarize_ex_j Statistics function needed for the exposure tables +#' @describeIn a_summarize_ex_j Statistics function needed for the exposure tables. #' -#' @param daysconv conversion required to get the values into days +#' @param daysconv (`numeric`)\cr conversion required to get the values into days #' (i.e 1 if original PARAMCD unit is days, 30.4375 if original PARAMCD unit is in months) #' @param ancova (`logical`)\cr If FALSE, only descriptive methods will be used. \cr -#' If TRUE Ancova methods will be used for each of the columns : AVAL, CHG, DIFF. \cr -#' @param comp_btw_group (`logical`)\cr If TRUE, -#' \cr When ancova = FALSE, the estimate of between group difference (on CHG) will be based upon two-sample t-test. \cr -#' \cr When ancova = TRUE, the same ancova model will be used for the estimate of between group difference (on CHG). -#' +#' If TRUE, ANCOVA methods will be used for each of the columns : AVAL, CHG, DIFF. \cr +#' @param comp_btw_group (`logical`)\cr If TRUE, comparison between groups will be performed. +#' \cr When ancova = FALSE, the estimate of between group difference (on CHG) will be based upon two-sample t-test. +#' \cr When ancova = TRUE, the same ANCOVA model will be used for the estimate of between group difference (on CHG). #' @param interaction_y (`character`)\cr Will be passed onto the `tern` function `s_ancova`, when ancova = TRUE. #' @param interaction_item (`character`)\cr Will be passed onto the `tern` function `s_ancova`, when ancova = TRUE. #' @param conf_level (`proportion`)\cr Confidence level of the interval @@ -31,7 +30,6 @@ NULL #' Specifically, the first level of arm variable is taken as the reference group. #' * covariates (character)\cr #' a vector that can contain single variable names (such as 'X1'), and/or interaction terms indicated by 'X1 * X2'. -#' s_summarize_ex_j <- function( df, .var, @@ -117,9 +115,6 @@ s_summarize_ex_j <- function( #' @title Analysis Function For Exposure Tables #' @description #' A function to create the appropriate statistics needed for exposure table -#' @details -#' Creates statistics needed for table. This includes differences and 95% CI and total treatment years. -#' This is designed to be used as an analysis (afun in `analyze`) function. #' @inheritParams proposal_argument_convention #' #' @describeIn a_summarize_ex_j Formatted analysis function which is used as `afun`. @@ -130,65 +125,65 @@ s_summarize_ex_j <- function( #' @aliases a_summarize_ex_j #' @examples #' library(dplyr) +#' ADEX <- ex_adsl |> select(USUBJID, ARM, TRTSDTM, EOSSTT, EOSDY) #' -#' ADEX <- data.frame( -#' USUBJID = c( -#' "XXXXX01", "XXXXX02", "XXXXX03", "XXXXX04", "XXXXX05", -#' "XXXXX06", "XXXXX07", "XXXXX08", "XXXXX09", "XXXXX10" -#' ), -#' TRT01A = c( -#' "ARMA", "ARMA", "ARMA", "ARMA", "ARMA", -#' "Placebo", "Placebo", "Placebo", "ARMA", "ARMA" -#' ), -#' AVAL = c(56, 78, 67, 87, 88, 93, 39, 87, 65, 55) -#' ) +#' trtvar <- "ARM" +#' ctrl_grp <- "B: Placebo" +#' cutoffd <- as.Date("2023-09-24") #' #' ADEX <- ADEX |> -#' mutate(TRT01A = as.factor(TRT01A)) -#' -#' ADEX$colspan_trt <- factor(ifelse(ADEX$TRT01A == "Placebo", " ", "Active Study Agent"), -#' levels = c("Active Study Agent", " ") -#' ) -#' -#' ADEX$diff_header <- "Difference in Means (95% CI)" -#' ADEX$diff_label <- paste(ADEX$TRT01A, paste("vs", "Placebo")) +#' create_colspan_var( +#' non_active_grp = ctrl_grp, +#' non_active_grp_span_lbl = " ", +#' active_grp_span_lbl = "Active Study Agent", +#' colspan_var = "colspan_trt", +#' trt_var = trtvar +#' ) |> +#' mutate( +#' diff_header = "Difference in Means (95% CI)", +#' diff_label = paste(!!rlang::sym(trtvar), "vs", ctrl_grp), +#' TRTDURY = case_when( +#' !is.na(EOSDY) ~ EOSDY, +#' TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) +#' ) +#' ) #' #' colspan_trt_map <- create_colspan_map(ADEX, -#' non_active_grp = "Placebo", +#' non_active_grp = ctrl_grp, #' non_active_grp_span_lbl = " ", #' active_grp_span_lbl = "Active Study Agent", #' colspan_var = "colspan_trt", -#' trt_var = "TRT01A" +#' trt_var = trtvar #' ) -#' ref_path <- c("colspan_trt", "", "TRT01A", "Placebo") +#' +#' ref_path <- c("colspan_trt", "", trtvar, ctrl_grp) #' #' lyt <- basic_table() |> #' split_cols_by( #' "colspan_trt", #' split_fun = trim_levels_to_map(map = colspan_trt_map) #' ) |> -#' split_cols_by("TRT01A") |> +#' split_cols_by(trtvar) |> #' split_cols_by("diff_header", nested = FALSE) |> #' split_cols_by( -#' "TRT01A", -#' split_fun = remove_split_levels("Placebo"), +#' trtvar, +#' split_fun = remove_split_levels(ctrl_grp), #' labels_var = "diff_label" #' ) |> -#' analyze("AVAL", +#' analyze("EOSDY", #' afun = a_summarize_ex_j, var_labels = "Duration of treatment (Days)", #' show_labels = "visible", #' indent_mod = 0L, #' extra_args = list( #' daysconv = 1, #' ref_path = ref_path, -#' variables = list(arm = "TRT01A", covariates = NULL), +#' variables = list(arm = trtvar, covariates = NULL), #' ancova = TRUE, #' comp_btw_group = TRUE #' ) #' ) #' -#' result <- build_table(lyt, ADEX) -#' +#' result <- build_table(lyt, ADEX, alt_counts_df = ADEX) #' result #' @export a_summarize_ex_j <- function( diff --git a/R/a_two_tier.R b/R/a_two_tier.R new file mode 100644 index 00000000..90fc60bb --- /dev/null +++ b/R/a_two_tier.R @@ -0,0 +1,235 @@ +#' @name a_two_tier +#' +#' @title Two Tier Analysis Function +#' +#' @author GB, WW. +#' +#' @description The analysis function used as an `afun` in \link[rtables]{analyze}. +#' This function simulates a final additional level of nesting with a +#' traditional analyze call inside it. +#' +#' This makes it possible to create what *appear to be* group summary or +#' content rows and to *optionally or conditionally* generate one or more +#' "detail" rows underneath it. +#' +#' For example, in a disposition table, one might want counts for completed +#' and ongoing patients with no further detail underneath, but a breakdown of +#' specific reasons beneath the count of patients who discontinued treatment. +#' +#' @details Both the analysis variable and `inner_var` must be factors. +#' Detail rows are differentiated by having an indent mod of one, causing them +#' to hang indented under their corresponding group row. +#' +#' @note In its current form, this function may not retain any formatting or +#' labeling instructions added by `grp_fun` or `detail_fun`, and it will +#' override any `.indent_mods` values specified by them. This behavior may +#' change in future versions. +#' +#' @inheritParams proposal_argument_convention +#' @param inner_var (`string`)\cr single variable name to use when generating +#' the detail rows. +#' @param drill_down_levs (`character`)\cr the level(s) of `.var` under which +#' detail rows should be generated. +#' @param use_all_levels (`flag`)\cr controls which factor levels will be +#' present for `inner_var` (both in `df`/`x` and in `.df_row`) when calling +#' `detail_fun`. +#' If `TRUE`, all levels (those present on the factor `.df_row[[inner_var]]`, +#' *regardless if the level is observed in the row group or not) will be +#' present when creating detail rows. +#' Otherwise (the default), only the levels observed +#' *anywhere in the row group, i.e., within `.df_row`* will be present. +#' @param grp_fun (`function`)\cr analysis function to be used when generating +#' the "group summary" outer rows. +#' @param detail_fun (`function`)\cr analysis function to be used when generating +#' "detail" inner rows. +#' @param .alt_df_full (`dataframe`)\cr denominator dataset for fraction and +#' relative risk calculations.\cr +#' this argument gets populated by the rtables split machinery +#' (see [rtables::additional_fun_params]). +#' @param ... additional arguments passed directly to `grp_fun` and `detail_fun`. +#' +#' @return A `RowsVerticalSection` object including both the group row and all +#' detail rows, if applicable, for the facet. +#' +#' @import checkmate +#' @export +#' +#' @examples +#' +#' # Example 1 +#' +#' lyt_obs_levels <- basic_table() |> +#' split_cols_by("ARM") |> +#' split_rows_by("EOSSTT", child_labels = "hidden") |> +#' analyze("EOSSTT", +#' afun = a_two_tier, +#' extra_args = list( +#' grp_fun = simple_analysis, +#' detail_fun = simple_analysis, +#' inner_var = "DCSREAS", +#' drill_down_levs = "DISCONTINUED" +#' ) +#' ) +#' +#' tbl <- build_table(lyt_obs_levels, ex_adsl) +#' tbl +#' +#' lyt_all_levels <- basic_table() |> +#' split_cols_by("ARM") |> +#' split_rows_by("EOSSTT", child_labels = "hidden") |> +#' analyze("EOSSTT", +#' afun = a_two_tier, +#' extra_args = list( +#' grp_fun = simple_analysis, +#' detail_fun = simple_analysis, +#' inner_var = "DCSREAS", +#' drill_down_levs = "DISCONTINUED", +#' use_all_levels = TRUE +#' ) +#' ) +#' +#' adsl_subset <- subset(ex_adsl, DCSREAS != "ADVERSE EVENT") +#' levels(adsl_subset$DCSREAS) +#' +#' tbl_all_levels <- build_table(lyt_all_levels, adsl_subset) +#' tbl_all_levels +#' +#' tbl_obs_levels <- build_table(lyt_obs_levels, adsl_subset) +#' tbl_obs_levels +#' +#' # Example 2 +#' +#' library(dplyr) +#' +#' trtvar <- "ARM" +#' ctrl_grp <- "B: Placebo" +#' +#' adsl <- ex_adsl |> select(c("USUBJID", "STRATA1", "EOSSTT", "DCSREAS", all_of(trtvar))) +#' adsl$colspan_trt <- factor( +#' ifelse(adsl[[trtvar]] == ctrl_grp, " ", "Active Study Agent"), +#' levels = c("Active Study Agent", " ") +#' ) +#' adsl$rrisk_header <- "Risk Difference (%) (95% CI)" +#' adsl$rrisk_label <- paste(adsl[[trtvar]], paste("vs", ctrl_grp)) +#' +#' colspan_trt_map <- create_colspan_map( +#' df = adsl, +#' non_active_grp = ctrl_grp, +#' non_active_grp_span_lbl = " ", +#' active_grp_span_lbl = "Active Study Agent", +#' colspan_var = "colspan_trt", +#' trt_var = trtvar +#' ) +#' +#' a_freq_j_args <- list( +#' .stats = "count_unique_fraction", +#' denom = "n_altdf", +#' ref_path = c("colspan_trt", " ", trtvar, ctrl_grp) +#' ) +#' +#' two_tier_args <- list( +#' grp_fun = a_freq_j, +#' detail_fun = a_freq_j, +#' inner_var = "DCSREAS", +#' drill_down_levs = "DISCONTINUED" +#' ) +#' +#' lyt_rrisk <- basic_table() |> +#' split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> +#' split_cols_by(trtvar) |> +#' split_cols_by("rrisk_header", nested = FALSE) |> +#' split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) |> +#' split_rows_by("STRATA1") |> +#' split_rows_by("EOSSTT", child_labels = "hidden") |> +#' analyze("EOSSTT", afun = a_two_tier, extra_args = c(two_tier_args, a_freq_j_args)) +#' +#' adsl_subset <- subset( +#' adsl, +#' EOSSTT != "COMPLETED" & (is.na(DCSREAS) | DCSREAS != "PROTOCOL VIOLATION") +#' ) +#' +#' tbl_rrisk <- build_table(lyt_rrisk, adsl_subset, alt_counts_df = adsl_subset) +#' tbl_rrisk +#' +a_two_tier <- function(df, + labelstr = NULL, + .var, + .N_col, + .df_row, + inner_var, + drill_down_levs, + .spl_context, + use_all_levels = FALSE, + grp_fun, + detail_fun, + .alt_df_full = NULL, + ...) { + assert_string(inner_var) + assert_character(drill_down_levs) + assert_flag(use_all_levels) + assert_function(grp_fun) + assert_function(detail_fun) + + cur_grp <- tail(.spl_context$value, 1) + df[[.var]] <- factor(df[[.var]], levels = cur_grp) + .df_row[[.var]] <- factor(.df_row[[.var]], levels = cur_grp) + args <- list( + labelstr = labelstr, + .var = .var, + .N_col = .N_col, + .df_row = .df_row, + .spl_context = .spl_context, + .alt_df_full = .alt_df_full, + ... + ) + if (names(formals(grp_fun))[1] == "df") { + args <- c(list(df = df), args) + } else { + args <- c(list(x = df[[.var]]), args) + } + cell_vals <- unclass( + do.call(grp_fun, args) + ) + names(cell_vals) <- attr(cell_vals, "row_label") + + ## calculate the drill-down values if necessary + if (cur_grp %in% drill_down_levs && any(!is.na(df[[inner_var]]))) { + ## have to make sure we use all levels for the whole row group + ## so that each column gets the same number of values in the same order + all_inner_levs <- levels(df[[inner_var]]) + if (use_all_levels) { + detail_levs <- all_inner_levs + } else { + detail_levs <- all_inner_levs[all_inner_levs %in% all_inner_levs[.df_row[[inner_var]]]] + } + + inner_vec <- factor(df[[inner_var]], levels = detail_levs) + df[[inner_var]] <- factor(df[[inner_var]], levels = detail_levs) + .df_row[[inner_var]] <- factor(.df_row[[inner_var]], levels = detail_levs) + det_args <- list( + .var = inner_var, + .N_col = .N_col, + .df_row = .df_row, + .spl_context = .spl_context, + .alt_df_full = .alt_df_full, + ... + ) + if (names(formals(detail_fun))[1] == "df") { + det_args <- c(list(df = df), det_args) + } else { + det_args <- c(list(x = df[[inner_var]]), det_args) + } + + detail_vals <- unclass( + do.call(detail_fun, det_args) + ) + + names(detail_vals) <- attr(detail_vals, "row_label") + } else { + detail_vals <- list() + } + in_rows( + .list = c(cell_vals, detail_vals), + .indent_mods = c(0, rep(1, length.out = length(detail_vals))) + ) +} diff --git a/R/analyze_values.R b/R/analyze_values.R index 47478f86..c0b4de2b 100644 --- a/R/analyze_values.R +++ b/R/analyze_values.R @@ -4,7 +4,6 @@ #' @param formats (`list`)\cr formats including `mean_sd`, `median` and `range` #' specifications. #' -#' @note This is used in `tefmad01` and `tefmad03a` e.g. #' @return Modified layout. #' @export analyze_values <- function(lyt, vars, ..., formats) { diff --git a/R/ancova.R b/R/ancova.R index c2bbb2c1..2e80ccea 100644 --- a/R/ancova.R +++ b/R/ancova.R @@ -1,6 +1,6 @@ #' `ANCOVA` Analysis #' -#' Does the `ANCOVA` analysis, separately for each visit. +#' Performs the `ANCOVA` analysis, separately for each visit. #' #' @param vars (named `list` of `string` or `character`)\cr specifying the variables in the `ANCOVA` analysis. #' The following elements need to be included as character vectors and match corresponding columns diff --git a/R/ancova_rbmi.R b/R/ancova_rbmi.R index a7e80924..335b6788 100644 --- a/R/ancova_rbmi.R +++ b/R/ancova_rbmi.R @@ -5,7 +5,7 @@ #' the least square means estimates in each group. #' #' @param data A `data.frame` containing the data to be used in the model. -#' @param vars A `vars` object as generated by [rbmi::set_vars()]. Only the `group`, +#' @param vars A `vars` object as generated by the set_vars() function from the rbmi package. Only the `group`, #' `visit`, `outcome` and `covariates` elements are required. See details. #' @param visits An optional character vector specifying which visits to #' fit the ancova model at. If `NULL`, a separate ancova model will be fit to the @@ -48,7 +48,7 @@ #' The new "var" refers to the model estimated variance of the residuals. #' #' If you want to include interaction terms in your model this can be done -#' by providing them to the `covariates` argument of [rbmi::set_vars()] +#' by providing them to the `covariates` argument of the set_vars() function from the rbmi package #' e.g. `set_vars(covariates = c("sex*age"))`. #' #' @return a list of variance (`var_*`), treatment effect (`trt_*`), and @@ -64,13 +64,15 @@ #' #' @seealso [rbmi_analyse()] #' @seealso [stats::lm()] -#' @seealso [rbmi::set_vars()] +#' @seealso The set_vars() function from the rbmi package #' @export rbmi_ancova <- function( - data, - vars, - visits = NULL, - weights = c("counterfactual", "equal", "proportional_em", "proportional")) { + data, + vars, + visits = NULL, + weights = c("counterfactual", "equal", "proportional_em", "proportional") +) { + assert_rbmi() outcome <- vars[["outcome"]] group <- vars[["group"]] covariates <- vars[["covariates"]] @@ -120,17 +122,21 @@ rbmi_ancova <- function( #' `trt_*` and `lsm_*` entries. See [rbmi_ancova()] for full details. #' @examples #' -#' iris2 <- iris[iris$Species %in% c("versicolor", "virginica"), ] -#' iris2$Species <- factor(iris2$Species) -#' rbmi_ancova_single(iris2, "Sepal.Length", "Species", c("Petal.Length * Petal.Width")) +#' if (requireNamespace("rbmi", quietly = TRUE)) { +#' iris2 <- iris[iris$Species %in% c("versicolor", "virginica"), ] +#' iris2$Species <- factor(iris2$Species) +#' rbmi_ancova_single(iris2, "Sepal.Length", "Species", c("Petal.Length * Petal.Width")) +#' } #' #' @seealso [rbmi_ancova()] rbmi_ancova_single <- function( - data, - outcome, - group, - covariates, - weights = c("counterfactual", "equal", "proportional_em", "proportional")) { + data, + outcome, + group, + covariates, + weights = c("counterfactual", "equal", "proportional_em", "proportional") +) { + assert_rbmi() checkmate::assert_string(outcome) checkmate::assert_string(group) weights <- match.arg(weights) diff --git a/R/cmhrms.R b/R/cmhrms.R new file mode 100644 index 00000000..584a4a4a --- /dev/null +++ b/R/cmhrms.R @@ -0,0 +1,181 @@ +#' Cochran-Mantel-Haenszel Row Mean Scores test +#' +#' See for a general comparison +#' overview between R and SAS. +#' +#' @inheritParams proposal_argument_convention +#' +#' @name cmhrms +#' @return +#' * `s_cmhrms_j` a single element list containing the p-value from row mean score test. +#' * `a_cmhrms_j` a `VerticalRowsSection` object (single row). +#' @order 1 +NULL + + +#' @describeIn cmhrms Statistics function for the calculation of the p-value +#' based upon the row mean scores test. +#' +#' @export +#' @order 3 +#' @inheritParams proposal_argument_convention +#' @param variables (`list`)\cr list with arm and strata variable names. +#' @param collapse_combo (`logical`)\cr If TRUE, multiple arm levels from df +#' will be combined into 1 level. +#' +s_cmhrms_j <- function(df, .var, .ref_group, .in_ref_col, ..., .df_row, variables, collapse_combo = FALSE) { + checkmate::assert_list(variables) + checkmate::assert_names(names(variables), must.include = "arm") + + colvar <- variables$arm + if (collapse_combo && length(unique(df[[colvar]])) >= 2) { + df[[colvar]] <- "Combined" + } + pwdf <- rbind(df, .ref_group) + inputdf <- if (.in_ref_col) { + # overall p-value -- however not needed on output? + .df_row + } else { + # pairwise p-value + pwdf + } + + inputdf[[colvar]] <- as.character(inputdf[[colvar]]) + inputdf[[.var]] <- droplevels(factor(inputdf[[.var]])) + + strata <- variables$strata + + if (!is.null(strata) && length(strata) > 0) { + get_covariates <- utils::getFromNamespace("get_covariates", "tern") + var_list <- get_covariates(strata) + assert_df_with_variables(.df_row, var_list) + } + strata_part <- paste(strata, collapse = " + ") + formula <- if (strata_part != "") { + stats::as.formula(paste0("Freq ~ ", colvar, " + ", .var, " | ", strata_part)) + } else { + stats::as.formula(paste0("Freq ~ ", colvar, " + ", .var)) + } + + pval <- if (length(stats::na.omit(df[[.var]])) == 0 || length(unique(inputdf[[colvar]])) < 2) { + numeric(0) + } else { + x_stats_cmh <- + tryCatch( + vcdExtra::CMHtest( + formula, + data = inputdf, + overall = TRUE, details = TRUE + ), + error = function(cond) { + message(conditionMessage(cond)) + # Choose a return value in case of error + NULL + } + ) + + x_stats_cmh <- if ((strata_part != "")) { + x_stats_cmh$ALL$table + } else { + x_stats_cmh$table + } + + rmeans <- x_stats_cmh["rmeans", , drop = TRUE] + rmeans_pval <- rmeans[["Prob"]] + + if (is.null(x_stats_cmh)) { + rmeans_pval <- NA + } + if (.in_ref_col) { + numeric(0) + } else { + rmeans_pval + } + } + list(pval = with_label(pval, "p-value")) +} + +#' @describeIn cmhrms Formatted analysis function which is used as `afun`. +#' @export +#' @order 2 +a_cmhrms_j <- function(df, .var, + ref_path, + .spl_context, + .ref_group, + .in_ref_col, + .df_row, + ..., + variables, + collapse_combo = TRUE, + .stats = NULL, + .formats = NULL, + .indent_mods = NULL, + .labels = NULL) { + dots_extra_args <- list(...) + ref <- get_ref_info(ref_path, .spl_context) + .in_ref_col <- ref$in_ref_col + + x_stats <- + .apply_stat_functions( + default_stat_fnc = s_cmhrms_j, + custom_stat_fnc_list = NULL, + args_list = c( + df = list(df), + .var = .var, + .ref_group = list(ref$ref_group), + .in_ref_col = .in_ref_col, + .df_row = list(.df_row), + variables = list(variables), + collapse_combo = collapse_combo, + dots_extra_args + ) + ) + + # Format according to specifications + format_stats( + x_stats, + method_groups = "cmhrms", + stats_in = .stats, + formats_in = .formats, + labels_in = .labels, + indents_in = .indent_mods + ) +} + +#' @describeIn cmhrms Wrapper for the `afun` which can exclude +#' row split levels from producing the analysis. These have to be specified in the +#' `exclude_levels` argument, see `?do_exclude_split` for details. +#' @export +#' @order 3 +a_cmhrms_j_with_exclude <- function( + df, + exclude_levels, + .var, + .spl_context, + .ref_group, + .in_ref_col, + .df_row, + ..., + .stats = NULL, + .formats = NULL, + .indent_mods = NULL, + .labels = NULL +) { + if (do_exclude_split(exclude_levels, .spl_context)) { + NULL + } else { + a_cmhrms_j( + df = df, + .var = .var, + .spl_context = .spl_context, + .ref_group = .ref_group, + .in_ref_col = .in_ref_col, + .df_row = .df_row, + ..., + .stats = .stats, + .formats = .formats, + .indent_mods = .indent_mods, + .labels = .labels + ) + } +} diff --git a/R/cmp_functions.R b/R/cmp_functions.R index e21a81ce..9c20fadd 100644 --- a/R/cmp_functions.R +++ b/R/cmp_functions.R @@ -1,4 +1,4 @@ -#' Split Function for Compliance Columns (TEFSCNCMP01 e.g.) +#' Split Function for Compliance Columns #' #' Here we just split into 3 columns for expected, received and missing visits. #' @@ -9,7 +9,6 @@ #' @param vals (`character`)\cr values to use for the split. #' @param trim (`logical`)\cr whether to trim the values. #' -#' @note This split function is used in the proportion table TEFSCNCMP01 and similar ones. #' @seealso [rtables::make_split_fun()] describing the requirements for this kind of #' post-processing function. cmp_post_fun <- function(ret, spl, fulldf, .spl_context) { @@ -26,11 +25,11 @@ cmp_post_fun <- function(ret, spl, fulldf, .spl_context) { #' @export cmp_split_fun <- make_split_fun(post = list(cmp_post_fun)) -#' @title Summary Analysis Function for Compliance Columns (TEFSCNCMP01 e.g.) +#' @title Summary Analysis Function for Compliance Columns #' @description A simple statistics function which prepares the numbers with percentages #' in the required format, for use in a split content row. The denominator here is #' from the expected visits column. -#' @inherit proposal_argument_convention +#' @inheritParams proposal_argument_convention #' @param variables (`list`)\cr with variable names of logical columns for #' `expected`, `received` and `missing` visits. #' @param formats (`list`)\cr with the `count_percent` format to use for the received diff --git a/R/column_stats.R b/R/column_stats.R index e6d51a4f..4e606730 100644 --- a/R/column_stats.R +++ b/R/column_stats.R @@ -1,144 +1,33 @@ -postfun_cog <- function(ret, spl, fulldf, .spl_context, - var_names = c("AVAL", "CHG", "BASE"), - stats = list( - main = c(N = "N", mean = "Mean", SD = "SD", SE = "SE", Med = "Med", Min = "Min", Max = "Max"), - base = c(mean = "Mean") - )) { - all_expr <- expression(TRUE) - colset <- .spl_context[nrow(.spl_context), "value"][[1]] - - # Check if colset is one of the main variables (default: AVAL or CHG) - if (colset == var_names[1] || colset == var_names[2]) { - # Create vectors for make_split_result - values <- stats$main - labels <- stats$main - - # Create datasplit and subset_exprs lists with the same length as values - datasplit <- replicate(length(values), fulldf, simplify = FALSE) - names(datasplit) <- names(values) - - subset_exprs <- replicate(length(values), all_expr, simplify = FALSE) - - ret <- rtables::make_split_result( - values = values, - labels = labels, - datasplit = datasplit, - subset_exprs = subset_exprs - ) - } else if (colset == var_names[3]) { # Default: BASE - # For base variable, use base stats - values <- stats$base - labels <- stats$base - if (names(values)[1] == "mean") { - # Keep backward compatibility by adding "Base " prefix to the first label if it's "mean" - labels[1] <- paste("Base", labels[1]) - } - - # Create datasplit and subset_exprs lists with the same length as values - datasplit <- replicate(length(values), fulldf, simplify = FALSE) - names(datasplit) <- names(values) - - subset_exprs <- replicate(length(values), all_expr, simplify = FALSE) - - ret <- rtables::make_split_result( - values = values, - labels = labels, - datasplit = datasplit, - subset_exprs = subset_exprs - ) - } else { - stop("something bad happened :(") - } - ret -} - -postfun_eq5d <- function(ret, spl, fulldf, .spl_context) { - all_expr <- expression(TRUE) - colset <- .spl_context[nrow(.spl_context), "value"][[1]] - if (colset == "AVAL") { - ret <- make_split_result( - values = c(N = "N", mean = "Mean", SD = "SD", Med = "Med", Min = "Min", Max = "Max"), - labels = c(N = "N", mean = "Mean", SD = "SD", Med = "Med", Min = "Min", Max = "Max"), - datasplit = list(N = fulldf, mean = fulldf, SD = fulldf, Med = fulldf, Min = fulldf, Max = fulldf), - subset_exprs = list(all_expr, all_expr, all_expr, all_expr, all_expr, all_expr) - ) - } else if (colset == "BASE") { - ret <- make_split_result( - values = c(mean_sd = "mean_sd"), - labels = c(mean_sd = "Base Mean (SD)"), - datasplit = list(mean_sd = fulldf), - subset_exprs = list(all_expr) - ) - } else if (colset == "CHG") { - ret <- make_split_result( - values = c(N = "N", mean = "Mean", SE = "SE", SD = "SD", Med = "Med", Min = "Min", Max = "Max"), - labels = c(N = "N", mean = "Mean", SE = "SE", SD = "SD", Med = "Med", Min = "Min", Max = "Max"), - datasplit = list(N = fulldf, mean = fulldf, SE = fulldf, SD = fulldf, Med = fulldf, Min = fulldf, Max = fulldf), - subset_exprs = list(all_expr, all_expr, all_expr, all_expr, all_expr, all_expr, all_expr) - ) - } else { - stop("something bad happened :(") - } - ret -} - -calc_one_visit <- function(datvec, decimal, statnm, visit, varnm, roundmethod = c("sas", "iec"), exclude_visits, +calc_one_visit <- function(datvec, decimal, statnm, visit, varnm, round_type = valid_round_type, exclude_visits, var_names = c("AVAL", "CHG", "BASE")) { - roundmethod <- match.arg(roundmethod) + round_type <- match.arg(round_type) if (is.na(decimal)) { decimal <- 0 } if ((varnm == var_names[2] || varnm == var_names[3]) && (visit %in% exclude_visits)) { return(NULL) } - if (roundmethod == "sas") { - switch(statnm, - N = length(stats::na.omit(datvec)), - SE = format( - tidytlg::roundSAS(stats::sd(datvec) / sqrt(length(stats::na.omit(datvec))), decimal + 2), - nsmall = decimal + 2 - ), - SD = format( - tidytlg::roundSAS(stats::sd(datvec), decimal + 2), - nsmall = decimal + - 2 - ), - Mean = format(tidytlg::roundSAS(mean(datvec), decimal + 1), nsmall = decimal + 1), - mean_sd = paste0( - format(tidytlg::roundSAS(mean(datvec), decimal + 1), nsmall = decimal + 1), - " (", - format( - tidytlg::roundSAS(stats::sd(datvec), decimal + 2), - nsmall = decimal + - 2 - ), - ")" - ), - Med = format(tidytlg::roundSAS(stats::median(datvec), decimal + 1), nsmall = decimal + 1), - Min = format(tidytlg::roundSAS(min(datvec), decimal), nsmall = decimal), - Max = format(tidytlg::roundSAS(max(datvec), decimal), nsmall = decimal) - ) - } else { - switch(statnm, - N = length(stats::na.omit(datvec)), - SE = format(round(stats::sd(datvec) / sqrt(length(stats::na.omit(datvec))), decimal + 2), nsmall = decimal + 2), - SD = format(round(stats::sd(datvec), decimal + 2), nsmall = decimal + 2), - Mean = format(round(mean(datvec), decimal + 1), nsmall = decimal + 1), - mean_sd = paste0( - format(round(mean(datvec), decimal + 1), nsmall = decimal + 1), - " (", - format( - round(stats::sd(datvec), decimal + 2), - nsmall = decimal + - 2 - ), - ")" - ), - Med = format(round(stats::median(datvec), decimal + 1), nsmall = decimal + 1), - Min = format(round(min(datvec), decimal), nsmall = decimal), - Max = format(round(max(datvec), decimal), nsmall = decimal) - ) - } + + switch(statnm, + N = length(stats::na.omit(datvec)), + SE = round_fmt(stats::sd(datvec) / sqrt(length(stats::na.omit(datvec))), + decimal + 2, + round_type = round_type + ), + SD = round_fmt(stats::sd(datvec), decimal + 2, round_type = round_type), + Mean = round_fmt(mean(datvec), decimal + 1, + round_type = round_type + ), + mean_sd = paste0( + round_fmt(mean(datvec), decimal + 1, round_type = round_type), + " (", + round_fmt(stats::sd(datvec), decimal + 2, round_type = round_type), + ")" + ), + Med = round_fmt(stats::median(datvec), decimal + 1, round_type = round_type), + Min = round_fmt(min(datvec), decimal, round_type = round_type), + Max = round_fmt(max(datvec), decimal, round_type = round_type), + ) } #' @name column_stats @@ -146,20 +35,21 @@ calc_one_visit <- function(datvec, decimal, statnm, visit, varnm, roundmethod = #' @description #' A function factory used for obtaining statistics within the columns of your table. #' Used in change from baseline tables. This takes the visit names as its row labels. -#' @param exclude_visits Vector of visit(s) for which you do not want the statistics displayed +#' @param exclude_visits (`character vector`)\cr Vector of visit(s) for which you do not want the statistics displayed #' in the baseline mean or change from baseline sections of the table. -#' @param var_names Vector of variable names to use instead of the default AVAL, CHG, BASE. +#' @param var_names (`character vector`)\cr Vector of variable names to use instead of the default AVAL, CHG, BASE. #' The first two elements are treated as main variables with full statistics, and the third element #' is treated as the base variable. By default, the function expects these specific variable names in your data, #' but you can customize them to match your dataset's column names. -#' @param stats A list with two components, `main` and `base`, that define the statistics to be calculated -#' for the main variables (default: AVAL, CHG) and the base variable (default: BASE). -#' Default for main variables: c(N = "N", mean = "Mean", SD = "SD", SE = "SE", Med = "Med", Min = "Min", Max = "Max") -#' Default for base variable: c(mean = "Mean") +#' @param stats (`list`)\cr A list with two components, `main` and `base`, that define the statistics to be calculated +#' for the main variables (default: AVAL, CHG) and the base variable (default: BASE).\cr +#' Default for main variables: c(N = "N", mean = "Mean", SD = "SD", SE = "SE", +#' Med = "Med", Min = "Min", Max = "Max").\cr +#' Default for base variable: c(mean = "Mean").\cr #' You can customize these statistics by providing your own named vectors in the list. The names are used #' internally for calculations, and the values are used as display labels in the table. #' -#' @return an analysis function (for use with [rtables::analyze]) implementing +#' @return An analysis function (for use with [rtables::analyze]) implementing #' the specified statistics. #' @export column_stats <- function(exclude_visits = c("Baseline (DB)"), @@ -202,15 +92,3 @@ calc_N <- function(datvec, statnm, trt, varnm) { } length(stats::na.omit(datvec)) } - -column_N <- function(df, .var, .spl_context, id = "USUBJID", var_names = c("AVAL", "CHG", "BASE")) { - allcolsplvals <- .spl_context[nrow(.spl_context), "cur_col_split_val"][[1]] - statnm <- utils::tail(allcolsplvals, 1) - varnm <- allcolsplvals[length(allcolsplvals) - 1] - datvec <- unique(df[[id]]) - datpertrt <- split(datvec, df[[.var]]) ## ,var is Treatment - in_rows( - .list = mapply(calc_N, datvec = datpertrt, trt = names(datpertrt), MoreArgs = list(statnm = statnm, varnm = varnm)), - .names = names(datpertrt) - ) -} diff --git a/R/colwidths.R b/R/colwidths.R index c09c3a7e..6d54f715 100644 --- a/R/colwidths.R +++ b/R/colwidths.R @@ -1,17 +1,17 @@ ## contribute to formatters #' @name inches_to_spaces -#' @title Conversion of inches to spaces -#' @param ins numeric. Vector of widths in inches -#' @param fontspec font_spec. The font specification to use -#' @param raw logical(1). Should the answer be returned unrounded +#' @title Conversion of inches to spaces. +#' @param ins (`numeric`)\cr Vector of widths in inches. +#' @param fontspec (`font_spec`)\cr The font specification to use. +#' @param raw (`logical(1)`)\cr Should the answer be returned unrounded #' (`TRUE`), or rounded to the nearest reasonable value (`FALSE`, -#' the default) -#' @param tol numeric(1). The numeric tolerance, values +#' the default). +#' @param tol (`numeric(1)`)\cr The numeric tolerance. Values #' between an integer `n`, and `n+tol` will be returned #' as `n`, rather than `n+1`, if `raw == FALSE`. Ignored #' when `raw` is `TRUE`. -#' @return the number of either fractional (`raw = TRUE`) or whole (`raw = FALSE`) -#' spaces that will fit within `ins` inches in the specified font +#' @return The number of either fractional (`raw = TRUE`) or whole (`raw = FALSE`) +#' spaces that will fit within `ins` inches in the specified font. #' @export inches_to_spaces <- function(ins, fontspec, raw = FALSE, tol = sqrt(.Machine$double.eps)) { newdev <- open_font_dev(fontspec) @@ -33,7 +33,7 @@ ttype_wrap_vec <- function(vec, fontspec, width, wordbreak_ok = TRUE, ...) { lapply( vec, wrap_string_ttype, - width_spc = width, + width = width, fontspec = fontspec, wordbreak_ok = wordbreak_ok, ... @@ -42,13 +42,13 @@ ttype_wrap_vec <- function(vec, fontspec, width, wordbreak_ok = TRUE, ...) { #' @name check_wrap_nobreak #' @title Check Word Wrapping -#' @description Check a set of column widths for word-breaking wrap behavior -#' @param tt TableTree -#' @param colwidths numeric. Column widths (in numbers of spaces under `fontspec`) -#' @param fontspec font_spec. +#' @description Check a set of column widths for word-breaking wrap behavior. +#' @param tt (`TableTree`)\cr TableTree object +#' @param colwidths (`numeric`)\cr Column widths (in numbers of spaces under `fontspec`) +#' @param fontspec (`font_spec`)\cr Font specification object #' #' @return `TRUE` if the wrap is able to be done without breaking words, -#' `FALSE` if wordbreaking is required to apply `colwidths` +#' `FALSE` if wordbreaking is required to apply `colwidths`. #' @rdname check_wrap_nobreak #' @export check_wrap_nobreak <- function(tt, colwidths, fontspec) { @@ -72,15 +72,15 @@ check_wrap_nobreak <- function(tt, colwidths, fontspec) { all(colok) } -#' Colwidths for all columns to be forced on one page +#' Colwidths for all columns to be forced on one page. #' -#' @param tt TableTree object to calculate column widths for -#' @param fontspec Font specification object -#' @param col_gap Column gap in spaces -#' @param rowlabel_width Width of row labels in spaces -#' @param print_width_ins Print width in inches -#' @param landscape Whether the output is in landscape orientation -#' @param lastcol_gap Whether to include a gap after the last column +#' @param tt (`TableTree`)\cr TableTree object to calculate column widths for +#' @param fontspec (`font_spec`)\cr Font specification object +#' @param col_gap (`numeric`)\cr Column gap in spaces +#' @param rowlabel_width (`numeric`)\cr Width of row labels in spaces +#' @param print_width_ins (`numeric`)\cr Print width in inches +#' @param landscape (`logical`)\cr Whether the output is in landscape orientation +#' @param lastcol_gap (`logical`)\cr Whether to include a gap after the last column #' @keywords internal smart_colwidths_1page <- function( tt, @@ -290,7 +290,8 @@ make_poss_wdf <- function( #' height. #' @param verbose (`logical(1)`)\cr Should additional information messages be #' displayed during the calculation of the column widths? Defaults to `FALSE`. -#' @returns A vector of column widths suitable to use in `tt_to_tlgrtf` and +#' @return +#' * `listing_column_widths`: a vector of column widths suitable to use in `tt_to_tlgrtf` and #' other exporters. #' @rdname def_colwidths #' @export @@ -343,9 +344,9 @@ find_free_colspc <- function(curposs, fullposs, thresh = 0.99, skip = integer(), curposs } -constrict_lbl_lns <- function(curdf, possdf, avail_spc, verbose = TRUE) { +constrict_lbl_lns <- function(curdf, possdf, avail_spc = 0, verbose = TRUE) { old_lbl_lns <- max(curdf$lbl_lines) - cols_to_pack <- which(curdf$lbl_lns == old_lbl_lns) + cols_to_pack <- which(curdf$lbl_lines == old_lbl_lns) olddf <- curdf success <- TRUE for (ii in cols_to_pack) { @@ -481,22 +482,22 @@ j_mf_col_widths <- utils::getFromNamespace("mf_col_widths", "formatters") #' `def_colwidths` uses heuristics to determine suitable column widths given a #' table or listing, and a font. #' -#' @param tt input Tabletree +#' @param tt input TableTree #' @param fontspec Font specification #' @param label_width_ins Label Width in Inches. #' @param col_gap Column gap in spaces. Defaults to `.5` for listings and `3` #' for tables. -#' @param type Type of the table tree, used to determine column width calculation method. +#' @param type Type of the TableTree, used to determine column width calculation method. #' #' @details Listings are assumed to be rendered landscape on standard A1 paper, #' such that all columns are rendered on one page. Tables are allowed to #' be horizontally paginated, and column widths are determined based only on #' required word wrapping. See the `Automatic Column Widths` vignette for #' a detailed discussion of the algorithms used. -#' @return a vector of column widths (including the label row pseudo-column in the table +#' @return +#' * `def_colwidths`: a vector of column widths (including the label row pseudo-column in the table #' case) suitable for use rendering `tt` in the specified font. #' @export -#' def_colwidths <- function(tt, fontspec, label_width_ins = 2, diff --git a/R/count_denom_fraction.R b/R/count_denom_fraction.R index 644bd11b..b208059a 100644 --- a/R/count_denom_fraction.R +++ b/R/count_denom_fraction.R @@ -1,7 +1,7 @@ #' @name response_by_var #' @title Count denom fraction statistic #' -#' @description Derives the count_denom_fraction statistic (i.e., 'xx /xx (xx.x percent)' ) +#' @description Derives the count_denom_fraction statistic (i.e., 'xx /xx (xx.x percent)' )\cr #' Summarizes the number of unique subjects with a response = 'Y' for a given variable #' (e.g. TRTEMFL) within each category of another variable (e.g., SEX). #' Note that the denominator is derived using input df, @@ -11,20 +11,17 @@ #' `df`, `.var` will be populated automatically by rtables during #' the tabulation process. #' -#' @param df Name of dataframe being analyzed. -#' @param labelstr Custom label for the variable being analyzed. -#' @param .var Name of the variable being analyzed. Records with non-missing +#' @param df (`data.frame`)\cr Name of dataframe being analyzed. +#' @param labelstr (`character vector`)\cr Custom label for the variable being analyzed. +#' @param .var (`character`)\cr Name of the variable being analyzed. Records with non-missing #' values will be counted in the denominator. -#' @param .N_col numeric(1). The total for the current column. -#' @param resp_var Name of variable, for which, records with a value of 'Y' +#' @param .N_col (`numeric`)\cr The total for the current column. +#' @param resp_var (`character`)\cr Name of variable, for which, records with a value of 'Y' #' will be counted in the numerator. -#' @param id Name of column in df which will have patient identifiers -#' @param .format Format for the count/denominator/fraction output. +#' @param id (`character`)\cr Name of column in df which will have patient identifiers +#' @param .format (`character`)\cr Format for the count/denominator/fraction output. #' @param ... Additional arguments passed to the function. -# @examples #analyze(vars='AGEGR1_DECODE', var_labels = 'Age group (years), n/Ns (%)', afun = response_by_var, -# extra_args = list(resp_var = 'TRTEMFL')) #' @examples -#' #' library(dplyr) #' #' ADAE <- data.frame( @@ -65,7 +62,6 @@ #' result #' @return a `RowsVerticalSection` for use by the internal tabulation machinery of `rtables` #' @export - response_by_var <- function( df, labelstr = NULL, diff --git a/R/coxph_hr.R b/R/coxph_hr.R index 729cbfdd..22db740c 100644 --- a/R/coxph_hr.R +++ b/R/coxph_hr.R @@ -7,15 +7,16 @@ #' #' #' @name coxph_hr -#' @return for `s_coxph_hr` a list containing the same statistics returned by [tern::s_coxph_pairwise] -#' and the additional `lr_stat_df` statistic. for `a_coxph_hr`, a `VerticalRowsSection` -#' object. +#' @return +#' * `s_coxph_hr` returns a list containing the same statistics returned by +#' [tern::s_coxph_pairwise] and the additional `lr_stat_df` statistic. +#' * `a_coxph_hr` returns a `VerticalRowsSection` object. #' @order 1 NULL #' @describeIn coxph_hr Statistics function forked from [tern::s_coxph_pairwise()]. -#' the difference is that: -#' 1) It returns the additional statistic `lr_stat_df` (log rank statistic with degrees of freedom). +#' The difference is that it returns the additional statistic `lr_stat_df` +#' (log rank statistic with degrees of freedom). #' @export #' @order 3 #' diff --git a/R/docx_exporter_functions.R b/R/docx_exporter_functions.R new file mode 100644 index 00000000..8d65271a --- /dev/null +++ b/R/docx_exporter_functions.R @@ -0,0 +1,1894 @@ +dps_markup_df_docx <- tibble::tibble( + keyword = c("super", "sub"), + replace_by = c("flextable::as_sup", "flextable::as_sub") +) + +remove_table_shading <- function(doc) { + # by default, Word adds a table shading white, which covers the watermark + # the XML nodes responsible for this are: + # + # if we delete all these nodes, then the table becomes transparent + + xml2::xml_remove(xml2::xml_find_all(doc$doc_obj$get(), ".//w:shd")) +} + +remove_security_popup_page_numbers <- function(doc, tlgtype = "Table", + pagenum = tlgtype == "Listing") { + # if we are working with listings, we previously had added + # the page numbers using officer::run_word_field() + # the problem with this function is that it inserts in the XML + # the field w:dirty="true", see: + # https://github.com/davidgohel/officer/blob/master/R/ooxml_run_objects.R#L225 + # w:dirty="true" tells Word that the current "Page" and "NumPages" fields + # are outdated and need to updated. + # when trying to open such docx, a security pop up emerges saying: + # "This document contains fields that may refer to other files. Do you want + # to update the fields in the document?" + # To disable that pop up, we just need to remove field w:dirty="true". + # This functions does that. + + # this function must only be run for Word docs that + # contain page numbers in the footers, i.e. listings + # look for all nodes with attribute w:dirty="true" + # for example: + # [1] + # [2] Page + # [3] + # [4] + # [5] NumPages + # [6] + # and remove that attribute + + if (tlgtype != "Listing" || isFALSE(pagenum)) { + return(invisible(NULL)) + } + + l_x <- xml2::xml_find_all(doc$doc_obj$get(), ".//w:instrText[@w:dirty='true'] | .//w:fldChar[@w:dirty='true']") + for (x in l_x) { + xml2::xml_set_attr(x = x, attr = "w:dirty", value = "NULL") + } +} + +insert_keepNext_vertical_pagination <- function(tt, flx) { + # this function updates flx by calling flextable::keep_with_next() + + # calculate where to add the page breaks + df <- utils::getFromNamespace("tt_to_tbldf", "junco")(tt = tt) + newrows <- df$newrows + idx_page_breaks <- as.integer(df$row_type == "VALUE" & df$newrows == 1) + idx <- which(newrows == 1) + new_idx_page_breaks <- idx_page_breaks + for (i in rev(idx)) { + new_idx_page_breaks <- append(new_idx_page_breaks, 0, after = i - 2) + } + new_idx_page_breaks <- which(new_idx_page_breaks == 1) + + # update the flextable + flx <- flx |> + flextable::keep_with_next(i = new_idx_page_breaks, value = TRUE, part = "body") + + # remove the lines just above the beginning of the chunk + # these lines are expected to be all blank + # they are not needed because there will be a page break in their place + # i.e. flx$body$dataset[new_idx_page_breaks - 1, ] should be all blank + + mask <- flx$body$dataset[new_idx_page_breaks - 1, ] |> apply(1, function(x) { + all(x == "") + }) + lines_to_remove <- new_idx_page_breaks[mask] - 1 + flx <- flx |> flextable::delete_rows(part = "body", i = lines_to_remove) + + return(flx) +} + +add_vertical_pagination_XML <- function(doc) { + # look for all nodes '' + l_x <- xml2::xml_find_all(doc$doc_obj$get(), ".//w:keepNext") + + # look for a parent 'w:pPr' + # this parent should have a first child 'w:pageBreakBefore' + for (x in l_x) { + siblings <- x |> xml2::xml_siblings() + + has_jc_left <- any( + sapply(siblings, function(node) { + xml2::xml_name(node) == "jc" && xml2::xml_attr(node, "val") == "left" + }) + ) + + if (has_jc_left) { + # insert pageBreakBefore only if one of the siblings is: + # + # i.e. the first column in that row + x |> xml2::xml_add_sibling(.value = "w:pageBreakBefore") + } + } +} + + +add_title_style_caption <- function(doc, string_to_look_for) { + # this function modifies the XML of the docx to add the "Caption" style to the Title + + s_xpath <- paste0("//*[contains(text(),'", string_to_look_for, "')]") + l_x <- doc$doc_obj$get() |> + xml2::xml_find_all(s_xpath) + + for (x2 in l_x) { + # look for a parent 'w:pPr' + # this parent should have a first child 'w:pStyle w:val="Caption"' + x <- x2 |> xml2::xml_parent() + children <- x |> xml2::xml_children() + while (!any(xml2::xml_name(children) == "pPr")) { + x <- x |> xml2::xml_parent() + children <- x |> xml2::xml_children() + } + + # set style "Caption" + child_i <- which(xml2::xml_name(children) == "pPr") |> head(1) + x <- x |> xml2::xml_child(child_i) + x |> xml2::xml_add_child(.value = 'w:pStyle w:val="Caption"', .where = 0) + + # set hanging indent of 0.8 inches + children <- x |> xml2::xml_children() + child_i <- which(xml2::xml_name(children) == "ind") |> head(1) + x <- x |> xml2::xml_child(child_i) + xml2::xml_set_attr(x, "w:hanging", 1152) + xml2::xml_set_attr(x, "w:left", 1152) + } +} + +add_little_gap_bottom_borders_spanning_headers <- function( + flx, + border = flextable::fp_border_default(width = 0.75, color = "black") +) { + n <- nrow(flx$header$styles$cells$border.width.bottom$data) + spanning_headers <- flx$header$spans$rows + for (i in seq_len(n - 1)) { + j <- which(flx$header$styles$cells$border.width.bottom$data[i, ] > 0) + if (length(which(spanning_headers[i, j] > 0)) > 1) { + # remove the border before inserting a paragraph border + flx <- flextable::border( + x = flx, + part = "header", + i = i, + j = j, + border.bottom = officer::fp_border(color = "white", width = 0.1) + ) + flx <- flextable::style( + x = flx, + part = "header", + i = i, + j = j, + pr_c = officer::fp_cell(margin.right = 3, margin.left = 3, vertical.align = "bottom"), + pr_p = officer::fp_par( + border.bottom = border, + text.align = "center" + ) + ) + } + } + + return(flx) +} + + +wrap_string_with_indent <- function(text, + max_width_inch, + font_family = "Times New Roman", + font_size = 9, + hanging_indent = 0.06, + dpi = 96) { + # NOTE: this function converts 'text' into another string with '\n\t' inserted + # to simulate the hanging indent + # This function is applied to the first column of the body + # Steps: given 'max_width_inch' (available space in inches to show text + # in a particular cell): + # - convert it to pixels + # - split 'text' into words + # - for each word, calculate the width in pixels with systemfonts::string_width(font) + # - if it fits in available space, concatenate it with existing line + # - if it doesn't fit, store the line in list and create a new line + # - if we are now in second line, decrease available space by 0.06 inches + # 5. in the end, paste/merge all lines and return concatenated lines + + # Convert inches to pixels + max_width_px <- max_width_inch * dpi + + # Split text into words + words <- strsplit(text, " ")[[1]] + + current_line <- "" + current_width <- 0 + lines <- c() + we_are_in_second_line <- FALSE + + for (word in words) { + test_line <- if (nchar(current_line) > 0) paste(current_line, word) else word + test_width <- systemfonts::string_width(test_line, + family = font_family, + size = font_size + ) + + if (test_width <= max_width_px) { + current_line <- test_line + } else { + lines <- c(lines, current_line) + current_line <- paste0("\t", word) + if (!we_are_in_second_line) { + we_are_in_second_line <- TRUE + # from the second line onwards, the available space is reduced + # by the hanging indent (only once) + max_width_inch <- max_width_inch - hanging_indent + max_width_px <- max_width_inch * dpi + } + } + } + + if (nchar(current_line) > 0) { + lines <- c(lines, current_line) + } + + return(paste(lines, collapse = "\n")) +} + +add_hanging_indent_first_column <- function(flx, column_widths, hanging_indent = 0.06) { + # will need: + # - table of indentations -> flx$body$styles$pars$padding.left$data + # - list of column widths -> flx$body$colwidths + + table_of_paddings <- flx$body$styles$pars$padding.left$data + cw_in_inches <- column_widths[1] + + for (i in seq_len(nrow(table_of_paddings))) { + left_padding_in_inches <- (table_of_paddings[[i, 1]] / 9) * 0.125 + # this is the available space for the string to be displayed at a particular level, + # which is equal to the width of the first column, minus the left padding at that level + available_space_in_inches <- cw_in_inches - left_padding_in_inches + + s <- flx$body$dataset[[i, 1]] + new_s <- wrap_string_with_indent(s, + max_width_inch = available_space_in_inches, + dpi = 78 + ) + + if (grepl("\n\t", new_s)) { + # insert new_s in row = i, j = 1 + flx <- flextable::compose(flx, + part = "body", i = i, j = 1, + value = flextable::as_paragraph(new_s) + ) + # insert a tab stop at current indentation level + hanging indent + # nolint start + flx <- flextable::tab_settings(flx, + part = "body", i = i, j = 1, + value = officer::fp_tabs(officer::fp_tab(pos = left_padding_in_inches + hanging_indent, style = "left")) + ) + # nolint end + } + } + + return(flx) +} + +insert_footer_text <- function(flx, tblid) { + if (is.null(getOption("docx.add_datetime")) || isTRUE(getOption("docx.add_datetime"))) { + footer_text <- paste0( + "[", tolower(tblid), ".docx]", + "[", utils::getFromNamespace("get_file_name", "tidytlg")(), "] ", + toupper(format(Sys.time(), format = "%d%b%Y, %H:%M")) + ) + flx <- flextable::add_footer_lines(flx, values = footer_text) + } + return(flx) +} + +insert_title_hanging_indent_v3 <- function(flx, + title, + border = flextable::fp_border_default(width = 0.75, color = "black")) { + # this version of the function inserts the Title as a header but does not attempt + # to simulate the hanging indent. Instead, it adds the string as is, and the hanging indent + # will be handled further downstream when exporting to docx by manipulating the XML. + # see function "add_title_style_caption()" + + if (flextable::nrow_part(flx, "header") == 0) { + title_font_size <- 10 + title_font_family <- "Times New Roman" + } else { + flx_fpt <- utils::getFromNamespace(".extract_font_and_size_from_flx", "rtables.officer")(flx) + title_style <- flx_fpt$fpt + title_font_size <- title_style$font.size + 1 # 10 + title_font_family <- title_style$font.family + } + + + new_title <- sub(":", ":\t", title) + + flx <- + utils::getFromNamespace(".add_titles_as_header", "rtables.officer")(flx, all_titles = new_title) |> + flextable::padding(part = "header", i = 1, padding.left = 0) |> + flextable::fontsize(part = "header", i = 1, size = title_font_size) |> + flextable::border(part = "header", i = 1, border.top = border, border.bottom = border) + + # nolint start + flx <- flx |> flextable::tab_settings( + i = 1, j = 1, part = "header", + value = officer::fp_tabs(officer::fp_tab(pos = 0.8, style = "left")) + ) + # nolint end + + flx <- flextable::style(x = flx, part = "header", i = 1, pr_p = officer::fp_par(word_style = "Caption")) + + return(flx) +} + +interpret_cell_content <- function(str_before, markup_df_docx = dps_markup_df_docx) { + if (inherits(str_before, "list") && length(str_before) == 1 && + inherits(str_before[[1]], "character") && length(str_before[[1]]) > 1) { + str_before <- paste(str_before[[1]], collapse = "") + } + + pos_start <- gregexpr("~\\{|~\\[", str_before)[[1]] + pos_end <- gregexpr("\\}|\\]", str_before)[[1]] + pos_end <- pos_start |> + lapply(function(x) { + y <- which(pos_end > x) + if (length(y) <= 0) { + return(NA) + } + return(pos_end[min(y)]) + }) |> + unlist() + pos <- data.frame(pos_start = pos_start, pos_end = pos_end) + pos <- pos |> dplyr::filter(!is.na(pos_end)) + pos$replacement <- "" + + for (i in seq_len(nrow(pos))) { + text_inside_brackets <- + substr(str_before, pos[i, "pos_start"] + 2, pos[i, "pos_end"] - 1) + if (grepl(" ", text_inside_brackets)) { + operation <- sub(pattern = " .*", "", text_inside_brackets) + operation <- trimws(x = operation) + text_after_operation <- + sub("^[^[:space:]]*\\s", "", text_inside_brackets) + text_after_operation <- trimws(x = text_after_operation) + if (operation %in% markup_df_docx[["keyword"]]) { + idx <- which(operation == markup_df_docx[["keyword"]]) |> head(1) + new_op <- as.character(markup_df_docx[idx, "replace_by"]) + pos[i, "replacement"] <- + paste0(", ", new_op, "('", text_after_operation, "'), ") + } else { + # the operation is not found in the 'markup_df_docx' dictionary, + # e.g. operation 'optional' + # in this case, just add the text after the operation as is, without + # interpreting it. + pos[i, "replacement"] <- paste0(", '", text_after_operation, "', ") + } + } + } + + # from now on we only need 'str_before' and 'pos' + res <- "" + j <- 1 + for (i in seq_len(nrow(pos))) { + res <- paste0(res, "'", substr(str_before, j, pos[i, "pos_start"] - 1), "'") + res <- paste0(res, pos[i, "replacement"]) + j <- pos[i, "pos_end"] + 1 + } + if (j <= nchar(str_before)) { + res <- paste0(res, "'", substr(str_before, j, nchar(str_before)), "'") + } else { + res <- sub(", $", "", res) + } + + res <- paste0("flextable::as_paragraph(", res, ")") + res +} + + +interpret_all_cell_content <- function(flx, markup_df_docx = dps_markup_df_docx) { + pattern <- "~\\[|~\\{" + + # Title and Headers + tmp <- flx$header$content$data |> apply(1:2, function(x) { + return(x[[1]]$txt) + }) + locations <- which(apply(tmp, 1:2, function(x) grepl(pattern, x)), arr.ind = TRUE) + for (idx in seq_len(nrow(locations))) { + i <- locations[idx, "row"] + j <- locations[idx, "col"] + str_before <- tmp[i, j] + str_after <- interpret_cell_content(str_before, markup_df_docx) + flx <- flextable::compose(flx, + part = "header", i = i, j = j, + value = eval(parse(text = str_after)) + ) + } + + # Body + # only look in the first column of the body + tmp <- flx$body$content$data[, 1] |> lapply(function(x) x$txt) + tmp <- tmp |> + lapply(function(x) paste(x, collapse = "")) |> + unlist() + locations <- which(grepl(pattern, tmp)) + for (idx in seq_along(locations)) { + i <- locations[idx] + j <- 1 + str_before <- tmp[i] + str_after <- interpret_cell_content(str_before, markup_df_docx) + flx <- flextable::compose(flx, + part = "body", i = i, j = j, + value = eval(parse(text = str_after)) + ) + } + + # Footers + tmp <- flx$footer$content$data |> apply(1:2, function(x) { + return(x[[1]]$txt) + }) + # only look in the first column of the footer + matches <- as.data.frame(lapply(tmp[, 1] |> as.data.frame(), function(col) grepl(pattern, col))) + locations <- which(as.matrix(matches), arr.ind = TRUE) + for (idx in seq_len(nrow(locations))) { + i <- locations[idx, "row"] + j <- locations[idx, "col"] + str_before <- tmp[i, j] + str_after <- interpret_cell_content(str_before, markup_df_docx) + flx <- flextable::compose(flx, + part = "footer", i = i, j = j, + value = eval(parse(text = str_after)) + ) + } + + flx +} + + +my_pg_width_by_orient <- function(orientation = "portrait") { + if (orientation == "landscape") { + return(8.88) + } + return(6.38) +} + +#' Obtain the default theme for the docx +#' +#' @description `r lifecycle::badge('experimental')` +#' +#' This function is based on [rtables.officer::theme_docx_default()]. +#' See notes to understand why this is experimental. +#' +#' +#' @param font (`string`)\cr font. Defaults to "Times New Roman". +#' @param font_size (`integer(1)`)\cr font size. Defaults to 9. +#' @param cell_margins (`numeric(1) or numeric(4)`)\cr +#' a numeric or a vector of four numbers indicating +#' c("left", "right", "top", "bottom"). It defaults to 0mm in Word pt to all 4 margins. +#' @param bold (`character`)\cr parts of the table text that should be in bold. +#' Can be any combination of c("header", "content_rows", "label_rows", "top_left"). +#' The first one renders all column names bold (not topleft content). +#' The second and third option use formatters::make_row_df() to render +#' content or/and label rows as bold. +#' @param bold_manual (`named list or NULL`)\cr list of index lists. +#' See example for needed structure. Accepted groupings/names are c("header", "body"). +#' @param border (`fp_border`)\cr border to use. Defaults to width = 0.75 +#' and color = "black" +#' +#' @note +#' This function has been tested for common use cases but may not work or have +#' unexpected or undesired behavior in corner cases. As such it is not considered +#' fully production ready and is being made available for further testing +#' and early adoption. Please report any issues you encounter to the developers. +#' This function may be removed from junco in the future if the functionality +#' is merged into `rtables.officer`. +#' +#' @returns a function that applies the given theme to a flextable. +#' @export +theme_docx_default_j <- function( + font = "Times New Roman", + font_size = 9L, + cell_margins = c(0, 0, 0, 0), + bold = c("header", "content_rows", "label_rows", "top_left"), + bold_manual = NULL, + border = flextable::fp_border_default(width = 0.75, color = "black") +) { + function(flx, ...) { + if (!inherits(flx, "flextable")) { + stop(sprintf( + "Function `%s` supports only flextable objects.", + "theme_box()" + )) + } + checkmate::assert_int(font_size, lower = 6, upper = 12) + checkmate::assert_string(font) + checkmate::assert_subset(bold, eval(formals(theme_docx_default_j)$bold), + empty.ok = TRUE + ) + if (length(cell_margins) == 1) { + cell_margins <- rep(cell_margins, 4) + } + checkmate::assert_numeric(cell_margins, lower = 0, len = 4) + args <- list(...) + tbl_row_class <- args$tbl_row_class + tbl_ncol_body <- flextable::ncol_keys(flx) + # NOTE: this is new + flx <- flextable::fontsize(flx, size = font_size, part = "all") |> + flextable::fontsize(size = font_size, part = "header") |> + flextable::font(fontname = font, part = "all") + + + flx <- flx |> + flextable::valign(j = seq(2, tbl_ncol_body), valign = "bottom", part = "body") |> + flextable::valign(j = 1, valign = "bottom", part = "all") |> + flextable::valign(j = 1, valign = "bottom", part = "header") |> + flextable::valign(j = seq(2, tbl_ncol_body), valign = "bottom", part = "header") + flx <- flextable::padding(flx, part = "header", padding = 0, j = -1) + flx <- + utils::getFromNamespace( + ".apply_indentation_and_margin", + "rtables.officer" + )(flx, cell_margins = cell_margins, + tbl_row_class = tbl_row_class, tbl_ncol_body = tbl_ncol_body) + if (any(tbl_row_class == "LabelRow")) { + flx <- flextable::padding(flx, + j = 1, i = which(tbl_row_class == "LabelRow"), + padding.top = 0, + padding.bottom = 0, + part = "body" + ) + } + if (any(tbl_row_class == "ContentRow")) { + flx <- flextable::padding(flx, + i = which(tbl_row_class == "ContentRow"), + padding.top = 0, + padding.bottom = 0, + part = "body" + ) + } + flx <- flextable::line_spacing(flx, space = 1, part = "all") + + if (any(bold == "header")) { + flx <- flextable::bold(flx, + j = seq(2, tbl_ncol_body), + part = "header" + ) + } + if (any(bold == "content_rows")) { + if (is.null(tbl_row_class)) { + stop("bold = \"content_rows\" needs tbl_row_class = rtables::make_row_df(tt).") + } + flx <- flextable::bold(flx, j = 1, i = which(tbl_row_class == "ContentRow"), part = "body") + } + if (any(bold == "label_rows")) { + if (is.null(tbl_row_class)) { + stop("bold = \"content_rows\" needs tbl_row_class = rtables::make_row_df(tt).") + } + flx <- flextable::bold(flx, j = 1, i = which(tbl_row_class == "LabelRow"), part = "body") + } + if (any(bold == "top_left")) { + flx <- flextable::bold(flx, j = 1, part = "header") + } + flx <- utils::getFromNamespace(".apply_bold_manual", "rtables.officer")(flx, bold_manual) + + # NOTE: the following block styles the footer and footnotes + n_footnotes <- flextable::nrow_part(flx, "footer") + if (n_footnotes > 0) { + if (is.null(getOption("docx.add_datetime")) || isTRUE(getOption("docx.add_datetime"))) { + flx <- flx |> + flextable::fontsize(part = "footer", i = n_footnotes, size = 8) |> + flextable::align(part = "footer", i = n_footnotes, align = "right") |> + utils::getFromNamespace(".remove_hborder", "rtables.officer")(part = "footer", w = "bottom") |> + utils::getFromNamespace( + ".add_hborder", + "rtables.officer" + )(part = "footer", ii = n_footnotes - 1, border = border) + } + flx <- flx |> + flextable::padding(padding = 0, part = "footer") + } + # END + + flx + } +} + + +#' Convert a VTableTree or a listing_df object to a flextable +#' +#' @description `r lifecycle::badge('experimental')` +#' +#' This function is based on [rtables.officer::tt_to_flextable()]. +#' See notes to understand why this is experimental. +#' +#' @param tt a VTableTree or a listing_df object +#' @param tblid Character. Output ID to be displayed in the Title and last line of footer. +#' @param theme (optional) a function factory. See theme_docx_default_j() +#' or rtables.officer::theme_docx_default() for more details. +#' @param border (optional) an `fp_border` object. +#' @param indent_size (optional) Numeric. Not used and set to 9 points internally. +#' @param titles_as_header (optional) Default = TRUE. +#' @param bold_titles (optional) Default = TRUE. +#' @param integrate_footers (optional) Default = TRUE. +#' @param counts_in_newline (optional) Default = FALSE. +#' @param paginate (optional) Default = FALSE. +#' @param fontspec (optional) a font_spec object. +#' @param lpp (optional) Default = NULL. Not used. +#' @param cpp (optional) Default = NULL. Not used. +#' @param ... other arguments. +#' @param colwidths (optional) Default = NULL. +#' @param tf_wrap (optional) Default = FALSE. Not used. +#' @param max_width (optional) Default = NULL. Not used. +#' @param total_page_height (optional) Default = 10. Not used. +#' @param total_page_width (optional). No need to be specified by end user. +#' Set to 6.38 ("portrait") or 8.88 ("landscape"). +#' @param autofit_to_page (optional) Default = TRUE. Not used and set to FALSE internally. +#' @param orientation (optional) Default = "portrait". +#' One of: "portrait", "landscape". +#' @param nosplitin (optional) Default = character(). Named list. +#' @param string_map (optional) Default = default_str_map. +#' @param markup_df_docx (optional) Default = dps_markup_df_docx. +#' @param reduce_first_col_indentation (optional) Default = FALSE. +#' @param tlgtype (optional). No need to be specified by end user. +#' @param col_gap (optional). Default = 3 (Tables) or 0.5 (Listings). +#' @param pagenum (optional). Default = FALSE (Tables) or TRUE (Listings). +#' @param round_type (`"iec"` or `"sas"`)\cr the type of rounding to perform. iec, +#' the default, performs rounding compliant with IEC 60559, while +#' sas performs nearest-value rounding consistent with rounding within SAS. +#' See `[formatters::format_value()]` for more details. +#' @param alignments (`list`)\cr List of named lists. Vectorized. +#' (Default = `list()`) Used to specify individual column or cell alignments. +#' Each named list contains `row`, `col`, and `value`. +#' @param border_mat (`matrix`)\cr A `m x k` matrix where m is the number of columns of `tt` +#' and k is the number of lines the header takes up. See [tidytlg::add_bottom_borders] +#' for what the matrix should contain. Users should only specify this when the +#' default behavior does not meet their needs. +#' +#' +#' @note +#' This function has been tested for common use cases but may not work or have +#' unexpected or undesired behavior in corner cases. As such it is not considered +#' fully production ready and is being made available for further testing +#' and early adoption. Please report any issues you encounter to the developers. +#' This function may be removed from junco in the future if the functionality +#' is merged into `rtables.officer`. +#' +#' @returns a flextable object. +#' @export +tt_to_flextable_j <- function( + tt, + tblid, + theme = theme_docx_default_j(font = "Times New Roman", font_size = 9L, bold = NULL), + border = flextable::fp_border_default(width = 0.75, color = "black"), + indent_size = NULL, + titles_as_header = TRUE, + bold_titles = TRUE, + integrate_footers = TRUE, + counts_in_newline = FALSE, + paginate = FALSE, + fontspec = formatters::font_spec("Times", 9L, 1.2), + lpp = NULL, + cpp = NULL, + ..., + colwidths = NULL, + tf_wrap = !is.null(cpp), + max_width = cpp, + total_page_height = 10, + total_page_width = my_pg_width_by_orient(orientation), + autofit_to_page = TRUE, + orientation = "portrait", + nosplitin = character(), + string_map = junco::default_str_map, + markup_df_docx = dps_markup_df_docx, + reduce_first_col_indentation = FALSE, + tlgtype = utils::getFromNamespace("tlg_type", "junco")(tt), + col_gap = ifelse(tlgtype == "Listing", .5, 3), + pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE), + round_type = formatters::obj_round_type(tt), + alignments = list(), + border_mat = make_header_bordmat(obj = tt) +) { + if (inherits(tt, "list")) { + stop("Please use paginate = TRUE or mapply() to create multiple outputs. export_as_docx accepts lists.") + } + if (!inherits(tt, "VTableTree") && !inherits(tt, "listing_df")) { + stop("Input object is not an rtables' or rlistings' object.") + } + checkmate::assert_flag(titles_as_header) + checkmate::assert_flag(integrate_footers) + checkmate::assert_flag(counts_in_newline) + checkmate::assert_flag(autofit_to_page) + checkmate::assert_number(total_page_width, lower = 1) + checkmate::assert_number(total_page_height, lower = 1) + checkmate::assert_numeric(colwidths, lower = 0, len = ncol(tt) + 1, null.ok = TRUE) + + # Validate `alignments` here because of its complicated data structure + stopifnot("`alignments` must be a list" = is.list(alignments)) + for (alignment in alignments) { + stopifnot("Each item of `alignments` must be a list" = is.list(alignment)) + } + + if (tlgtype == "Listing" && nrow(tt) == 0) { + dat <- as.list(c("No data to report", rep("", ncol(tt) - 1))) + names(dat) <- names(tt) + df <- as.data.frame(dat) + formatters::var_labels(df) <- formatters::var_labels(tt) + + titles <- list() + titles$title <- main_title(tt) + titles$subtitles <- subtitles(tt) + titles$main_footer <- main_footer(tt) + titles$prov_footer <- prov_footer(tt) + + tt <- rlistings::as_listing( + df, + key_cols = rlistings::get_keycols(tt), + disp_cols = rlistings::listing_dispcols(tt) + ) + tt <- set_titles(tt, titles) + } + + if (is.null(colwidths)) { + # NOTE: calculate page width and column widths + + label_width_ins <- 2 + colwidths <- junco::def_colwidths( + tt, + fontspec, + col_gap = col_gap, + label_width_ins = label_width_ins, + type = tlgtype + ) + colwidths_2 <- colwidths + if (tlgtype == "Table") { + colwidths <- utils::getFromNamespace("cwidths_final_adj", "junco")( + labwidth_ins = label_width_ins, + total_width = total_page_width, + colwidths = colwidths[-1] + ) + } + colwidths <- (colwidths / sum(colwidths)) * total_page_width + # END + } + + + autofit_to_page <- FALSE + # NOTE + left_right_fixed_margins <- rtables.officer::word_mm_to_pt(1.9) + + if (paginate) { + ## implies type Table + if (tlgtype != "Table") { + stop( + "pagination is not currently supported for tlg types other than Table." + ) + } + if (methods::is(tt, "VTableTree")) { + hdrmpf <- rtables::matrix_form(tt[1, , keep_topleft = TRUE], round_type = round_type) + } else if (methods::is(tt, "list") && methods::is(tt[[1]], "MatrixPrintForm")) { + hdrmpf <- tt[[1]] + } else { + hdrmpf <- tt + } + + pags <- formatters::paginate_to_mpfs( + tt, + fontspec = fontspec, + landscape = orientation == "landscape", + colwidths = colwidths_2, + col_gap = col_gap, + pg_width = my_pg_width_by_orient(orientation), + pg_height = NULL, + margins = rep(0, 4), + lpp = NULL, + nosplitin = nosplitin, + verbose = FALSE, + round_type = round_type + ) + if (rtables::has_force_pag(tt)) { + nslices <- which( + cumsum(vapply(pags, formatters::mf_ncol, 1L)) == ncol(tt) + ) + oldpags <- pags + pags <- lapply( + seq_len(nslices), + function(ii) { + inds <- seq(ii, by = nslices, length.out = length(oldpags) / nslices) + oldpags[inds] + } + ) + } + pag_bord_mats <- lapply( + seq_along(pags), + function(i) { + if (methods::is(pags[[i]], "MatrixPrintForm")) { + partmpf <- pags[[i]] + } else { + partmpf <- pags[[i]][[1]] + } + subset_border_mat(border_mat, hdrmpf, partmpf) + } + ) + ret <- lapply( + seq_along(pags), + function(i) { + if (!is.null(tblid) && length(pags) > 1) { + fmti <- paste0("%0", ceiling(log(length(pags), base = 10)), "d") + fname <- paste0(tblid, "part", sprintf(fmti, i), "of", length(pags)) + } else { + fname <- tblid + } + full_pag_i <- pags[[i]] + # NOTE: if there is also vertical pagination, full_pag_i will have more than 1 page + if (is.list(full_pag_i) && !methods::is(full_pag_i, "MatrixPrintForm")) { + pgi_for_cw <- full_pag_i[[1]] + } else { + pgi_for_cw <- full_pag_i + } + + # if there is no vertical pagination, make each horizontal pagination + # a list of 1 page + if (is.list(full_pag_i) && methods::is(full_pag_i, "MatrixPrintForm")) { + full_pag_i <- list(full_pag_i) + } + + # Note: slice the big table into multiple subtables, by rows and columns + jj <- pgi_for_cw$col_info$label + subt <- tt[, jj, + drop = FALSE, keep_titles = TRUE, keep_topleft = TRUE, + reindex_refs = FALSE + ] + sub_ft <- tt_to_flextable_j( + tt = subt, + theme = theme, + border = border, + indent_size = indent_size, + titles_as_header = titles_as_header, + bold_titles = bold_titles, + integrate_footers = integrate_footers, + counts_in_newline = counts_in_newline, + paginate = FALSE, + fontspec = fontspec, + lpp = lpp, + cpp = cpp, + ... = ..., + colwidths = NULL, + tf_wrap = tf_wrap, + max_width = max_width, + total_page_height = total_page_height, + total_page_width = total_page_width, + autofit_to_page = autofit_to_page, + orientation = orientation, + tblid = fname, + nosplitin = nosplitin, + string_map = string_map, + markup_df_docx = markup_df_docx, + reduce_first_col_indentation = (length(full_pag_i) > 1), + tlgtype = tlgtype, + col_gap = col_gap, + pagenum = pagenum, + round_type = round_type, + alignments = alignments, + border_mat = pag_bord_mats[[i]], + ) + + return(sub_ft) + } + ) + + if (is.null(file) && length(pags) > 1) { + ret <- unlist(ret, recursive = FALSE) + } + return(ret) + } + + + matform <- rtables::matrix_form(tt, + fontspec = fontspec, + indent_rownames = FALSE, round_type = round_type + ) + body <- formatters::mf_strings(matform) + spans <- formatters::mf_spans(matform) + mpf_aligns <- formatters::mf_aligns(matform) + hnum <- formatters::mf_nlheader(matform) + rdf <- rtables::make_row_df(tt) + + + # check if the user passed 'alignments' + # if so, overwrite the default ones + for (al in alignments) { + mpf_aligns[al$row, al$col] <- al$value + } + + # NOTE: convert the '>=', '<=', etc symbols + body <- strmodify(body, string_map) + + + # NOTE: + # calculate where to place the blank rows + mpf <- matform + rowdf <- formatters::mf_rinfo(mpf) + nhl <- formatters::mf_nlheader(mpf) + rinds <- formatters::mf_lgrouping(mpf)[-(1:nhl)] - formatters::mf_nrheader(mpf) + anbr <- cumsum(!is.na(c(0, utils::head(rowdf$trailing_sep, -1))))[rinds] + 1 ## so it starts at 1 + newrows <- c(0, ifelse(utils::tail(anbr, -1) == utils::head(anbr, -1), 0, 1)) + # END + + if (any(grepl("dec", mpf_aligns))) { + body <- formatters::decimal_align(body, mpf_aligns) + mpf_aligns[mpf_aligns == "decimal"] <- "center" + mpf_aligns[mpf_aligns == "dec_left"] <- "left" + mpf_aligns[mpf_aligns == "dec_right"] <- "right" + } + if (tlgtype == "Listing") { + # NOTE: left-align the first column for listings + mpf_aligns[, 1] <- "left" + } + + content <- as.data.frame(body[-seq_len(hnum), , drop = FALSE]) + content[content == ""] <- " " + # NOTE: + # insert blank lines previously calculated + content <- utils::getFromNamespace("insert_empty_rows", "tidytlg")(content, newrows) + # update 'mpf_aligns' + idx <- which(newrows == 1) + # NOTE: here, it is important to traverse 'idx' in reverse order + # to avoid shifting by 1 position every time we insert a row in mpf_aligns + for (i in rev(idx)) { + new_row <- matrix(data = mpf_aligns[i, ], nrow = 1) + n <- nrow(mpf_aligns) + new_mpf_aligns <- rbind(mpf_aligns[seq(1, i), ], new_row) + new_mpf_aligns <- rbind(new_mpf_aligns, mpf_aligns[seq(i + 1, n), ]) + mpf_aligns <- new_mpf_aligns + } + # END + + flx <- flextable::qflextable(content) |> + utils::getFromNamespace(".remove_hborder", "rtables.officer")(part = "body", w = "bottom") + + hdr <- body[seq_len(hnum), , drop = FALSE] + if (hnum > 1) { + det_nclab <- apply(hdr, 2, grepl, pattern = "\\(N=[0-9]+\\)$") + has_nclab <- apply(det_nclab, 1, any) + whsnc <- which(has_nclab) + if (any(has_nclab)) { + for (i in seq_along(whsnc)) { + wi <- whsnc[i] + what_is_nclab <- det_nclab[wi, ] + colcounts_split_chr <- if (isFALSE(counts_in_newline)) { + " " + } else { + "\n" + } + hdr[wi, what_is_nclab] <- paste(hdr[wi - 1, what_is_nclab], + hdr[wi, what_is_nclab], + sep = colcounts_split_chr + ) + hdr[wi - 1, what_is_nclab] <- "" + row_to_pop <- wi - 1 + what_to_put_up <- hdr[row_to_pop, what_is_nclab, + drop = FALSE + ] + if (all(!nzchar(what_to_put_up)) && row_to_pop > 1) { + reconstructed_hdr <- + rbind( + cbind( + hdr[seq(row_to_pop), !what_is_nclab], + rbind(what_to_put_up, hdr[seq(row_to_pop - 1), what_is_nclab]) + ), + hdr[seq(row_to_pop + 1, nrow(hdr)), ] + ) + row_to_pop <- 1 + hdr <- reconstructed_hdr + } + if (all(!nzchar(hdr[row_to_pop, ]))) { + hdr <- hdr[-row_to_pop, , drop = FALSE] + spans <- spans[-row_to_pop, , drop = FALSE] + body <- body[-row_to_pop, , drop = FALSE] + mpf_aligns <- mpf_aligns[-row_to_pop, , drop = FALSE] + hnum <- hnum - 1 + whsnc <- whsnc - 1 + det_nclab <- det_nclab[-row_to_pop, , drop = FALSE] + # also remove that row from 'border_mat' + border_mat <- border_mat[-row_to_pop, , drop = FALSE] + } + } + } + } + hdr[hdr == ""] <- " " + flx <- flx |> flextable::set_header_labels(values = setNames(as.vector(hdr[hnum, , drop = TRUE]), names(content))) + + # NOTE: this block of code calculates where to put horizontal borders + # within the Header + l_pos <- list() + for (i in seq(1, nrow(border_mat))) { + for (j in seq(1, ncol(border_mat))) { + if (border_mat[i, j] != 0) { + l_pos <- append(l_pos, list(c(i, j))) + } + } + } + + if (hnum > 1) { + for (i in seq(hnum - 1, 1)) { + sel <- formatters::spans_to_viscell(spans[i, ]) + flx <- flextable::add_header_row(flx, + top = TRUE, + values = as.vector(hdr[i, sel]), + colwidths = as.integer(spans[i, sel]) + ) + + col_widths_in_header <- as.integer(spans[i, sel]) + cnt <- 1 + for (j in seq(1, length(col_widths_in_header))) { + cur_width <- col_widths_in_header[j] + if (cur_width > 1 && + !grepl("^N=", as.vector(hdr[i + 1, sel])[j]) && + trimws(as.vector(hdr[i, sel])[j]) != "") {} + cnt <- cnt + cur_width + } + } + } + nr_body <- flextable::nrow_part(flx, part = "body") + nr_header <- flextable::nrow_part(flx, part = "header") + flx <- flx |> + flextable::border(part = "header", border = flextable::fp_border_default(width = 0)) |> + flextable::border(part = "header", i = 1, border.top = border) + + for (ij in l_pos) { + i <- ij[1] + j <- ij[2] + flx <- flx |> flextable::hline(part = "header", i = i, j = j, border = border) + } + # END + + if (length(alignments) == 0) { + flx <- flx |> + utils::getFromNamespace( + ".apply_alignments", + "rtables.officer" + )(mpf_aligns[seq_len(hnum), , drop = FALSE], "header") |> + utils::getFromNamespace( + ".apply_alignments", + "rtables.officer" + )(mpf_aligns[seq(hnum + 1, nrow(mpf_aligns)), , drop = FALSE], "body") + } else { + flx <- flx |> + utils::getFromNamespace( + ".apply_alignments", + "rtables.officer" + )(mpf_aligns[seq_len(hnum), , drop = FALSE], "header") + for (i in seq(hnum + 1, nrow(mpf_aligns))) { + flx <- flx |> + flextable::align( + part = "body", i = i - hnum, + align = mpf_aligns[i, , drop = FALSE] + ) + } + } + + checkmate::check_number(indent_size, null.ok = TRUE) + if (is.null(indent_size)) { + indent_size <- matform$indent_size * rtables.officer::word_mm_to_pt(1) + } else { + indent_size <- indent_size * rtables.officer::word_mm_to_pt(1) + } + # NOTE: + flx <- flextable::line_spacing(flx, space = 0, part = "body") + indent_size <- rtables.officer::word_mm_to_pt(3.175) + left_right_fixed_margins <- 0 + updated_indents <- rdf$indent + idx <- which(newrows == 1) + # NOTE: here, it is important to traverse 'idx' in reverse order + # to avoid shifting by 1 position every time we insert a 0 + for (i in rev(idx)) { + updated_indents <- append(updated_indents, 0, after = i - 1) + } + + # NOTE: this simulates the "indentme" part in tt_to_tlgrtf() + # basically reduce by 1 the indentation in the first column, if we have vertical pagination + if (reduce_first_col_indentation) { + updated_indents <- updated_indents - 1 + updated_indents[which(updated_indents < 0)] <- 0 + } + for (i in seq_len(nr_body)) { + # NOTE: this line adds the left padding to each row column 1 (Body only) + flx <- flextable::padding(flx, + i = i, j = 1, + padding.left = indent_size * updated_indents[[i]] + left_right_fixed_margins, # NOTE: + padding.right = left_right_fixed_margins, + padding.top = 0, padding.bottom = 0, + part = "body" + ) + } + for (i in seq_len(nr_header)) { + # NOTE: conversion ratio + # 1 inches = 72 points = 25.4 mm + # I'd like 0.1 inches every 2 spaces + # 0.05 inches = 3.6 points = 1.27 mm + leading_spaces_count <- nchar(hdr[i, 1]) - + nchar(stringi::stri_replace(hdr[i, 1], regex = "^ +", "")) + header_indent_size <- leading_spaces_count * rtables.officer::word_mm_to_pt(1.27) + hdr[i, 1] <- stringi::stri_replace(hdr[i, 1], regex = "^ +", "") + + flx <- flextable::compose(flx, i = i, j = 1, value = flextable::as_paragraph(hdr[i, 1]), part = "header") + + # NOTE: this line adds the left padding to each row column 1 (Header only) + flx <- flextable::padding(flx, + i = i, j = 1, + padding.left = header_indent_size + left_right_fixed_margins, + padding.right = left_right_fixed_margins, + part = "header" + ) + } + + footers_with_blank_line <- c() + if (length(matform$ref_footnotes) > 0 && isTRUE(integrate_footers)) { + footers_with_blank_line <- c("", matform$ref_footnotes) + footers_with_blank_line <- strmodify(footers_with_blank_line, string_map) + flx <- flextable::add_footer_lines(flx, values = footers_with_blank_line) |> + utils::getFromNamespace(".add_hborder", "rtables.officer")(part = "body", ii = nrow(content), border = border) |> + utils::getFromNamespace( + ".add_hborder", + "rtables.officer" + )(part = "footer", ii = length(footers_with_blank_line), border = border) + } + if (length(formatters::all_footers(tt)) > 0 && isTRUE(integrate_footers)) { + footers_with_blank_line <- c("", formatters::all_footers(tt)) + footers_with_blank_line <- strmodify(footers_with_blank_line, string_map) + flx <- flextable::add_footer_lines(flx, values = footers_with_blank_line) |> + utils::getFromNamespace(".add_hborder", "rtables.officer")(part = "body", ii = nrow(content), border = border) |> + utils::getFromNamespace( + ".add_hborder", + "rtables.officer" + )(part = "footer", ii = length(footers_with_blank_line), border = border) + } + + # NOTE: the following block adds the footer, this is, the last line below footnotes + flx <- insert_footer_text(flx, tblid) + + # here you can use ii = nrow(content), nr_body, ... + flx <- flx |> + utils::getFromNamespace(".add_hborder", "rtables.officer")(part = "body", ii = nr_body, border = border) + + flx <- utils::getFromNamespace(".apply_themes", "rtables.officer")(flx, theme = theme, tbl_row_class = rdf$node_class) + + # NOTE: for Listings, vertical alignment is "top" for the whole body + if (tlgtype == "Listing") { + flx <- flx |> flextable::valign(part = "body", valign = "top") + flx <- flx |> flextable::align(part = "body", j = 1, align = "left") + flx <- flx |> flextable::align(part = "body", j = -1, align = "center") + } + # END + + if (is.null(fontspec)) { + fontspec <- utils::getFromNamespace(".extract_fontspec", "rtables.officer")(flx) + } + if (is.null(colwidths)) { + colwidths <- formatters::propose_column_widths(matform, + fontspec = fontspec, + indent_size = indent_size + ) + } + if (titles_as_header && + length(formatters::all_titles(tt)) > 0 && + any(nzchar(formatters::all_titles(tt)))) { + # NOTE: the following block appends the Table ID to the Title, + # inserts the Title with the hanging indent as part of the Header, + # and adds the borders above and below the Title + ts_tbl <- formatters::all_titles(tt) + ts_tbl <- paste0(tblid, ":", ts_tbl) + + flx <- insert_title_hanging_indent_v3( + flx = flx, + title = ts_tbl, + border = border + ) + # END + } + + + # NOTE: if it's a listing, set font size = 8 (instead of 9) everywhere + # except the Titles, which remain font size = 10 + if (tlgtype == "Listing") { + header_start_pos <- length(formatters::all_titles(tt)) + 1 + header_end_pos <- nrow(flx$header$dataset) + flx <- flextable::fontsize( + flx, + part = "header", + i = seq(header_start_pos, header_end_pos), + size = 8 + ) + flx <- flextable::fontsize(flx, part = "body", size = 8) + flx <- flextable::fontsize(flx, part = "footer", size = 8) + } + + # NOTE: here, even though page width is 8.88 inches, table width has + # to be 8.82 inches, so leave a gap of 0.03 inches on both sides + if (orientation == "landscape") { + final_cwidths <- (total_page_width - 0.03 * 2) * colwidths / sum(colwidths) + } else { + final_cwidths <- total_page_width * colwidths / sum(colwidths) + } + flx <- flextable::width(flx, width = final_cwidths) + if (tlgtype == "Table") { + flx <- add_hanging_indent_first_column(flx = flx, column_widths = final_cwidths) + } + flx <- flextable::set_table_properties(flx, + layout = ifelse(autofit_to_page, "autofit", "fixed"), + align = "left", opts_word = list(split = FALSE, keep_with_next = TRUE) + ) + + if (!all(is.na(matform$row_info$trailing_sep))) { + # NOTE: this block adds indentation after some rows to simulate blank lines + new_trailing_sep <- matform$row_info$trailing_sep + idx <- which(newrows == 1) + # here, it is important to traverse 'idx' in reverse order + # to avoid shifting by 1 position every time we insert a 'NA' + for (i in rev(idx)) { + new_trailing_sep <- append(new_trailing_sep, NA, after = i - 2) + } + new_trailing_sep[length(new_trailing_sep)] <- NA + flx <- rtables.officer::add_flextable_separators(flx, new_trailing_sep, + border = border, + padding = 0 + ) # NOTE: here, we used to have padding = 10 + # END + } + flx <- flextable::fix_border_issues(flx) + + # NOTE: add the vertical pagination break pages + if (tlgtype == "Table" && nrow(tt) > 1) { + pags <- formatters::paginate_to_mpfs( + tt, + fontspec = fontspec, + landscape = orientation == "landscape", + colwidths = colwidths_2, + col_gap = col_gap, + pg_width = my_pg_width_by_orient(orientation), + pg_height = NULL, + margins = rep(0, 4), + lpp = NULL, + nosplitin = nosplitin, + verbose = FALSE, + round_type = round_type + ) + if (!is.null(names(pags))) { + flx <- insert_keepNext_vertical_pagination(tt = tt, flx = flx) + } + } + # END + + + # NOTE: + # the following block adds the Title with its own style + if (isFALSE(titles_as_header)) { + title <- formatters::all_titles(tt) + title <- paste0(tblid, ":\t", title) + + w <- ifelse(orientation == "portrait", 155, 215) + new_title <- formatters::wrap_string_ttype( + str = title, + width = w, + fontspec = formatters::font_spec("Times", 10L, 1.2), + collapse = "\n\t", + wordbreak_ok = FALSE + ) + new_title <- sub(": ", ":\t", new_title) + + p <- ifelse(orientation == "portrait", 4.32, 7.8) + fpp <- officer::fp_par( + text.align = "left", + padding.left = p, + padding.right = p, + border.top = border + ) + + flx_fpt <- utils::getFromNamespace(".extract_font_and_size_from_flx", "rtables.officer")(flx) + title_style <- flx_fpt$fpt + title_style$font.size <- title_style$font.size + 1 # 10 + title_style$bold <- bold_titles + flx <- flx |> flextable::set_caption( + caption = flextable::as_paragraph(flextable::as_chunk(new_title, title_style)), + word_stylename = "Caption", + fp_p = fpp, + align_with_table = FALSE + ) + } + # END + + # NOTE: convert the super- and sub-scripts + flx <- interpret_all_cell_content(flx, markup_df_docx) + + # NOTE: add the little gap between the bottom borders of 2 spanning headers + flx <- add_little_gap_bottom_borders_spanning_headers(flx, border) + + flx +} + +#' Export a VTableTree or a listing_df object into docx +#' +#' @description `r lifecycle::badge('experimental')` +#' +#' This function is based on [rtables.officer::export_as_docx()]. +#' See notes to understand why this is experimental. +#' +#' @param tt a VTableTree or a listing_df object to export. +#' @param tblid Character. Output ID to be displayed in the Title and last line of footer. +#' @param output_dir a directory path to save the docx. +#' @param theme (optional) a function factory. See theme_docx_default_j() +#' or rtables.officer::theme_docx_default() for more details. +#' @param add_page_break (optional) Default = FALSE. +#' @param titles_as_header (optional) Default = TRUE. +#' @param integrate_footers (optional) Default = TRUE. +#' @param section_properties (optional). A "prop_section" object containing +#' information about page size, orientation, margins, etc. +#' See officer::prop_section() for more details. +#' No need to be specified by end user. +#' @param doc_metadata (optional). Default = NULL. +#' @param template_file (optional). Default = "doc/template_file.docx". +#' Paragraph styles are inherited from this file. +#' @param orientation (optional) Default = "portrait". +#' One of: "portrait", "landscape". +#' @param paginate (optional) Default = FALSE. +#' @param nosplitin (optional) Default = character(). Named list. +#' @param string_map (optional) Default = default_str_map. +#' @param markup_df_docx (optional) Default = dps_markup_df_docx. +#' @param combined_docx (optional). Default = FALSE. Whether to also export an "allparts" +#' docx version. +#' @param tlgtype (optional). No need to be specified by end user. +#' @param col_gap (optional). Default = 3 (Tables) or 0.5 (Listings). +#' @param pagenum (optional). Whether to display page numbers. Only applicable +#' to listings (i.e. for tables and figures this argument is ignored). +#' @param round_type (`"iec"` or `"sas"`)\cr the type of rounding to perform. iec, +#' the default, performs rounding compliant with IEC 60559, while +#' sas performs nearest-value rounding consistent with rounding within SAS. +#' See `[formatters::format_value()]` for more details. +#' @param alignments (`list`)\cr List of named lists. Vectorized. +#' (Default = `list()`) Used to specify individual column or cell alignments. +#' Each named list contains `row`, `col`, and `value`. +#' @param border (optional) an `fp_border` object. +#' @param border_mat (`matrix`)\cr A `m x k` matrix where m is the number of columns of `tt` +#' and k is the number of lines the header takes up. See [tidytlg::add_bottom_borders] +#' for what the matrix should contain. Users should only specify this when the +#' default behavior does not meet their needs. +#' @param watermark (`logical`)\cr whether to display the watermark "Confidential". +#' By default, this is set to FALSE. In the future, this argument will be the +#' actual watermark (i.e. a string) to display. +#' @param ... other parameters. +#' +#' @note +#' This function has been tested for common use cases but may not work or have +#' unexpected or undesired behavior in corner cases. As such it is not considered +#' fully production ready and is being made available for further testing +#' and early adoption. Please report any issues you encounter to the developers. +#' This function may be removed from junco in the future if the functionality +#' is merged into `rtables.officer`. +#' +#' @export +export_as_docx_j <- function( + tt, + tblid, + output_dir, + theme = theme_docx_default_j( + font = "Times New Roman", + font_size = 9L, + bold = NULL + ), + add_page_break = FALSE, + titles_as_header = TRUE, + integrate_footers = TRUE, + section_properties = officer::prop_section( + page_size = officer::page_size(width = 11, height = 8.5, orient = orientation), + page_margins = officer::page_mar(bottom = 1, top = 1, right = 1, left = 1, gutter = 0, footer = 1, header = 1) + ), + doc_metadata = NULL, + template_file = system.file("template_file.docx", package = "junco"), + orientation = "portrait", + paginate = FALSE, + nosplitin = character(), + string_map = junco::default_str_map, + markup_df_docx = dps_markup_df_docx, + combined_docx = FALSE, + tlgtype = utils::getFromNamespace("tlg_type", "junco")(tt), + col_gap = ifelse(tlgtype == "Listing", .5, 3), + pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE), + round_type = formatters::obj_round_type(tt), + alignments = list(), + border = flextable::fp_border_default(width = 0.75, color = "black"), + border_mat = make_header_bordmat(obj = tt), + watermark = FALSE, + ... +) { + # Validate `alignments` here because of its complicated data structure + stopifnot("`alignments` must be a list" = is.list(alignments)) + for (alignment in alignments) { + stopifnot("Each item of `alignments` must be a list" = is.list(alignment)) + } + + checkmate::assert_flag(add_page_break) + checkmate::assert_flag(watermark) + + do_tt_error <- FALSE + if (tlgtype != "Listing") { + pagenum <- FALSE + } + + + if (inherits(tt, "VTableTree") || inherits(tt, "listing_df")) { + tt <- tt_to_flextable_j(tt, + titles_as_header = titles_as_header, + integrate_footers = integrate_footers, + tblid = tblid, + orientation = orientation, + paginate = paginate, + nosplitin = nosplitin, + string_map = string_map, + markup_df_docx = markup_df_docx, + tlgtype = tlgtype, + col_gap = col_gap, + pagenum = pagenum, + theme = theme, + round_type = round_type, + alignments = alignments, + border = border, + border_mat = border_mat, + ... + ) + } + if (inherits(tt, "flextable")) { + flex_tbl_list <- list(tt) + } else if (inherits(tt, "list")) { + if (inherits(tt[[1]], "VTableTree") || inherits( + tt[[1]], + "listing_df" + )) { + flex_tbl_list <- mapply(tt_to_flextable_j, + tt = tt, + MoreArgs = + list( + titles_as_header = titles_as_header, + integrate_footers = integrate_footers, + tblid = tblid, + orientation = orientation, + paginate = paginate, + nosplitin = nosplitin, + string_map = string_map, + markup_df_docx = markup_df_docx, + tlgtype = tlgtype, + col_gap = col_gap, + pagenum = pagenum, + theme = theme, + round_type = round_type, + alignments = alignments, + border = border, + border_mat = border_mat, + ... + ), + SIMPLIFY = FALSE + ) + } else if (inherits(tt[[1]], "flextable") || + (inherits(tt[[1]], "list") && inherits(tt[[1]][[1]], "flextable"))) { + flex_tbl_list <- tt + } else { + do_tt_error <- TRUE + } + } else { + do_tt_error <- TRUE + } + if (isTRUE(do_tt_error)) { + stop("tt must be a TableTree/listing_df, a flextable, or a list of TableTree/listing_df or flextable objects.") + } + if (isFALSE(titles_as_header) || isFALSE(integrate_footers)) { + if (inherits(flex_tbl_list[[1]], "list")) { + flx_fpt <- utils::getFromNamespace(".extract_font_and_size_from_flx", "rtables.officer")(flex_tbl_list[[1]][[1]]) + } else { + flx_fpt <- utils::getFromNamespace(".extract_font_and_size_from_flx", "rtables.officer")(flex_tbl_list[[1]]) + } + } + if (!is.null(template_file) && !file.exists(template_file)) { + template_file <- NULL + } + + if (combined_docx) { + if (length(flex_tbl_list) > 1) { + export_as_docx_j( + tt = flex_tbl_list, + output_dir = output_dir, + theme = theme, + add_page_break = TRUE, + titles_as_header = titles_as_header, + integrate_footers = integrate_footers, + section_properties = section_properties, + doc_metadata = doc_metadata, + template_file = template_file, + orientation = orientation, + tblid = paste0(tblid, "allparts"), + paginate = FALSE, + string_map = string_map, + markup_df_docx = markup_df_docx, + combined_docx = FALSE, + tlgtype = "Table", + col_gap = col_gap, + pagenum = pagenum, + round_type = round_type, + alignments = alignments, + border = border, + border_mat = border_mat, + watermark = watermark, + ... = ... + ) + } else { + message( + "Table ", tblid, ": No combined DOCX created, output fit within one part." + ) + } + } + + if (paginate && length(flex_tbl_list) > 1) { + # export individual subtables as separate docx files + for (i in seq(1, length(flex_tbl_list))) { + flex_tbl_i <- flex_tbl_list[[i]] + fmti <- paste0("%0", ceiling(log(length(flex_tbl_list), base = 10)), "d") + fname <- paste0(tolower(tblid), "part", sprintf(fmti, i), "of", length(flex_tbl_list)) + export_as_docx_j( + tt = flex_tbl_i, + output_dir = output_dir, + theme = theme, + add_page_break = add_page_break, + titles_as_header = titles_as_header, + integrate_footers = integrate_footers, + section_properties = section_properties, + doc_metadata = doc_metadata, + template_file = template_file, + orientation = orientation, + tblid = fname, + paginate = FALSE, + nosplitin = nosplitin, + string_map = string_map, + markup_df_docx = markup_df_docx, + combined_docx = FALSE, + tlgtype = tlgtype, + col_gap = col_gap, + pagenum = pagenum, + round_type = round_type, + alignments = alignments, + border = border, + border_mat = border_mat, + watermark = watermark, + ... = ... + ) + } + } else { + if (isTRUE(watermark)) { + template_file <- "template_file_watermark" + template_file <- paste0(template_file, "_", orientation) + if (pagenum) { + template_file <- paste0(template_file, "_pagenum") + } + template_file <- paste0(template_file, ".docx") + template_file <- system.file(template_file, package = "junco") + } + + if (!is.null(template_file)) { + doc <- officer::read_docx(template_file) + doc <- officer::body_remove(doc) + } else { + doc <- officer::read_docx() + } + + # NOTE: the following block adds the page numbering + if (tlgtype == "Listing" && pagenum) { + # nolint start + formatted_par <- officer::fpar( + "Listing Page ", + officer::run_word_field("Page", prop = officer::fp_text(font.size = 8, font.family = "Times New Roman")), + " of ", + officer::run_word_field("NumPages", prop = officer::fp_text(font.size = 8, font.family = "Times New Roman")), + fp_p = officer::fp_par(text.align = "right", padding.top = 12), + fp_t = officer::fp_text(font.size = 8, font.family = "Times New Roman") + ) + # nolint end + footer_default <- officer::block_list(formatted_par) + section_properties$footer_default <- footer_default + } + # END + if (isFALSE(watermark)) { + doc <- officer::body_set_default_section(doc, section_properties) + } + + flex_tbl_list <- lapply(flex_tbl_list, function(flx) { + if (flx$properties$layout != "autofit") { + page_width <- my_pg_width_by_orient(section_properties$page_size$orient) + # NOTE: here, even though page width is 8.88 inches, table width has + # to be 8.82 inches, so leave a gap of 0.03 inches on both sides + if (orientation == "landscape") { + page_width <- (page_width - 0.03 * 2) + } + dflx <- dim(flx) + if (abs(sum(unname(dflx$widths)) - page_width) > 0.01) { + warning( + "The total table width does not match the page width. The column widths", + " will be resized to fit the page. Please consider modifying the parameter", + " total_page_width in tt_to_flextable_j()." + ) + final_cwidths <- page_width * unname(dflx$widths) / sum(unname(dflx$widths)) + flx <- flextable::width(flx, width = final_cwidths) + } + } + flx + }) + for (ii in seq(1, length(flex_tbl_list))) { + flex_tbl_i <- flex_tbl_list[[ii]] + if (endsWith(tblid, "allparts")) { + tmp <- gsub(pattern = ".*:\t", replacement = paste0(tblid, ":\t"), flex_tbl_i$header$dataset[1, 1]) + flex_tbl_i <- flextable::compose(flex_tbl_i, part = "header", i = 1, value = flextable::as_paragraph(tmp)) + n_footer_lines <- flextable::nrow_part(flex_tbl_i, part = "footer") + tmp <- gsub( + pattern = "^\\[.*\\.docx\\]", + replacement = paste0("[", tolower(tblid), ".docx]"), + flex_tbl_i$footer$dataset[n_footer_lines, 1] + ) + flex_tbl_i <- flextable::compose(flex_tbl_i, + part = "footer", + i = n_footer_lines, + value = flextable::as_paragraph(tmp) + ) + } + # NOTE: this align = "left" is the alignment of the entire table relative to the page, + # not the content within the table + # calculate vertical pagination, where to place the new page breaks + doc <- flextable::body_add_flextable(doc, flex_tbl_i, align = "center") + if (isTRUE(add_page_break) && ii < length(flex_tbl_list)) { + doc <- officer::body_add_break(doc) + } + } + if (isFALSE(integrate_footers) && inherits(tt, "VTableTree")) { + matform <- rtables::matrix_form(tt, indent_rownames = TRUE, round_type = round_type) + if (length(matform$ref_footnotes) > 0) { + doc <- utils::getFromNamespace( + "add_text_par", + "rtables.officer" + )(doc, matform$ref_footnotes, flx_fpt$fpt_footer) + } + if (length(formatters::all_footers(tt)) > 0) { + doc <- utils::getFromNamespace( + "add_text_par", + "rtables.officer" + )(doc, formatters::all_footers(tt), + flx_fpt$fpt_footer) + } + } + if (!is.null(doc_metadata)) { + doc <- do.call(officer::set_doc_properties, c( + list(x = doc), + doc_metadata + )) + } + if (endsWith(tblid, "allparts")) { + string_to_look_for <- paste0(tblid, ":") + } else { + string_to_look_for <- sub(pattern = ":\t.*", replacement = ":", flex_tbl_list[[1]]$header$dataset[1, 1]) + } + add_title_style_caption(doc, string_to_look_for) + add_vertical_pagination_XML(doc) + remove_security_popup_page_numbers(doc, tlgtype, pagenum) + if (isTRUE(watermark)) { + remove_table_shading(doc) + } + + print(doc, target = paste0(output_dir, "/", tolower(tblid), ".docx")) + invisible(TRUE) + } +} + + +#' export_graph_as_docx +#' +#' @description `r lifecycle::badge('experimental')` +#' +#' Export graph in DOCX format. See notes to understand why this is experimental. +#' +#' @param g (optional) Default = NULL. A `ggplot2` object, or a list +#' of them, to export. At least one of `g` or `plotnames` must be provided. +#' If both are provided, 'g' precedes and 'plotnames' will be ignored. +#' @param plotnames (optional) Default = NULL. A file path, or a list of them, +#' to previously saved .png files. These will be opened and +#' exported in the output file. At least one of `g` or `plotnames` must be provided. +#' If both are provided, 'g' precedes and 'plotnames' will be ignored. +#' @param tblid Character. Output ID that will appear in the Title and footer. +#' @param output_dir Character. File path where to save the output. +#' @param title (optional) Default = NULL. Character, or list of them, +#' with the titles to be displayed. +#' @param footers (optional) Default = NULL. Character, or list of them, +#' with the footers to be displayed. +#' @param orientation (optional) Default = "portrait". +#' One of: "portrait", "landscape". +#' @param plotwidth (optional) Default = 8. Plot size in units expressed by +#' the units argument. If not supplied, uses the size of the current graphics device. +#' @param plotheight (optional) Default = 5.51. Plot size in units expressed by +#' the units argument. If not supplied, uses the size of the current graphics device. +#' @param units (optional) Default = "in". One of the following units in which the +#' plotwidth and plotheight arguments are expressed: "in", "cm", "mm" or "px". +#' @param border (optional). An `fp_border` object to use as borders for the Title +#' and Footers. +#' +#' @note +#' This function has been tested for common use cases but may not work or have +#' unexpected or undesired behavior in corner cases. As such it is not considered +#' fully production ready and is being made available for further testing +#' and early adoption. Please report any issues you encounter to the developers. +#' This function may be removed from junco in the future if the functionality +#' is merged into `rtables.officer`. +#' +#' @export +export_graph_as_docx <- function(g = NULL, + plotnames = NULL, + tblid, + output_dir, + title = NULL, + footers = NULL, + orientation = "portrait", + plotwidth = 8, + plotheight = 5.51, + units = c("in", "cm", "mm", "px")[1], + border = flextable::fp_border_default(width = 0.75, color = "black")) { + # TREATMENT OF ARGUMENTS ---- + + if (is.null(g) && is.null(plotnames)) { + stop("Both arguments 'g' and 'plotnames' are NULL. Please provide at least one.") + } + + if (!is.null(g) && !is.null(plotnames)) { + message("Both arguments 'g' and 'plotnames' are not NULL. Argument 'g' precedes and 'plotnames' will be ignored.") + plotnames <- NULL + } + + if (!is.null(g)) { + if (length(g) == 1) { + g <- list(g) + } + + for (e in g) { + checkmate::assert_true(ggplot2::is.ggplot(e)) + } + } + + if (!is.null(plotnames)) { + if (length(plotnames) == 1) { + plotnames <- list(plotnames) + } + + for (e in plotnames) { + checkmate::assert_character(e) + checkmate::assert_file_exists(e) + } + } + + checkmate::assert_character(tblid) + checkmate::assert_character(output_dir) + checkmate::assert_directory_exists(output_dir) + checkmate::assert_numeric(plotwidth, null.ok = TRUE) + checkmate::assert_numeric(plotheight, null.ok = TRUE) + checkmate::assert_choice(units, choices = c("in", "cm", "mm", "px")) + checkmate::assert_choice(orientation, choices = c("portrait", "landscape")) + checkmate::assert_character(title) + checkmate::assert_character(footers, null.ok = TRUE) + + if (is.null(plotnames)) { + # we have to save the ggplot2 objects (argument 'g') as temporary files + # and save those paths + plotnames <- list() + for (e in g) { + temp_file <- paste0(base::tempfile(), ".png") + grDevices::png(temp_file, + width = 22, + height = 14, + units = "cm", + res = 300, + type = "cairo" + ) + print(e) + grDevices::dev.off() + + plotnames <- append(plotnames, temp_file) + } + } + + + # CREATION OF THE FLEXTABLE ---- + + # create initial flextable with just 1 column + flx <- matrix(nrow = length(plotnames), ncol = 1) |> + as.data.frame() |> + flextable::flextable() + flx <- flx |> flextable::delete_part("header") + nrow_body <- flextable::nrow_part(x = flx, part = "body") + + # set the Title + ts_tbl <- paste0(tblid, ":", title) + flx <- insert_title_hanging_indent_v3(flx = flx, title = ts_tbl) + + # set the Body (the plots) + for (i in seq_along(plotnames)) { + f <- plotnames[[i]] + flx <- flextable::compose( + flx, + part = "body", + i = i, + j = 1, + value = + flextable::as_paragraph(flextable::as_image( + src = f, width = plotwidth, + height = plotheight, unit = "in" + )) + ) + } + + # set the Footers + if (!is.null(footers)) { + footers <- c("", footers) + } + for (line in footers) { + flx <- flextable::add_footer_lines(flx, values = line) + } + + flx <- insert_footer_text(flx, tblid) + + # style the flextable + flx <- flx |> flextable::border_remove() + flx <- flx |> + flextable::fontsize(part = "header", size = 10) + flx <- flx |> + flextable::align(part = "body", align = "center") + flx <- flx |> flextable::valign(part = "body", valign = "top") + nrow_footers <- flextable::nrow_part(flx, "footer") + flx <- flx |> + flextable::fontsize(part = "footer", size = 8) |> + flextable::align(part = "footer", i = nrow_footers, align = "right") |> + flextable::padding(padding = 0, part = "footer") + flx <- flx |> + flextable::font(fontname = "Times New Roman", part = "all") + flx <- flx |> + flextable::border( + part = "header", i = 1, + border.top = border, border.bottom = border + ) |> + flextable::border( + part = "body", i = nrow_body, + border.bottom = border + ) + if (nrow_footers > 1) { + flx <- flx |> + flextable::border( + part = "footer", i = nrow_footers - 1, + border.bottom = border + ) + } + + w <- ifelse(orientation == "portrait", 6.38, 8.82) + flx <- flx |> flextable::width(width = w) + flx <- flextable::padding(flx, part = "all", padding = 0) + # add a little paragraph padding on top so that the figures don't overlap + # with the bottom border of the Titles + if (nrow_body > 1) { + flx <- flextable::padding(flx, + part = "body", i = seq(2, nrow_body), + padding.top = 1 + ) + } + + + # EXPORT AS DOCX ---- + template_file <- system.file("template_file.docx", package = "junco") + section_properties <- officer::prop_section( + page_size = officer::page_size(width = 11, height = 8.5, orient = orientation), + page_margins = officer::page_mar(bottom = 1, top = 1, right = 1, left = 1, gutter = 0, footer = 1, header = 1) + ) + doc <- officer::read_docx(template_file) + doc <- officer::body_remove(doc) + doc <- officer::body_set_default_section(doc, section_properties) + doc <- flextable::body_add_flextable(doc, flx, align = "center") + string_to_look_for <- paste0(tblid, ":") + add_title_style_caption(doc, string_to_look_for) + print(doc, target = paste0(output_dir, "/", tolower(tblid), ".docx")) +} diff --git a/R/estimate_proportion_diff.R b/R/estimate_proportion_diff.R index c928eee2..9ffe78cd 100644 --- a/R/estimate_proportion_diff.R +++ b/R/estimate_proportion_diff.R @@ -41,8 +41,8 @@ NULL #' * `s_proportion_diff_j()` returns a named list of elements `diff`, #' `diff_ci`, `diff_est_ci` and `diff_ci_3d`. #' -#' @note When performing an unstratified analysis, methods `'cmh'`, `'strat_newcombe'`, -#' and `'strat_newcombecc'` are not permitted. +#' @note When performing an unstratified analysis, methods `'cmh'`, `'cmh_sato'`, `'cmh_mn'`, +#' `'strat_newcombe'`, and `'strat_newcombecc'` are not permitted. #' #' @examples #' @@ -68,14 +68,18 @@ NULL #' @export #' @order 3 s_proportion_diff_j <- function( - df, - .var, - .ref_group, - .in_ref_col, - variables = list(strata = NULL), - conf_level = 0.95, - method = c("waldcc", "wald", "cmh", "ha", "newcombe", "newcombecc", "strat_newcombe", "strat_newcombecc"), - weights_method = "cmh") { + df, + .var, + .ref_group, + .in_ref_col, + variables = list(strata = NULL), + conf_level = 0.95, + method = c( + "waldcc", "wald", "cmh", "cmh_sato", "cmh_mn", "ha", + "newcombe", "newcombecc", "strat_newcombe", "strat_newcombecc" + ), + weights_method = "cmh" +) { start <- s_proportion_diff( df = df, .var = .var, @@ -135,15 +139,16 @@ s_proportion_diff_j <- function( #' @export #' @order 2 a_proportion_diff_j <- function( - df, - .var, - ref_path, - .spl_context, - ..., - .stats = NULL, - .formats = NULL, - .labels = NULL, - .indent_mods = NULL) { + df, + .var, + ref_path, + .spl_context, + ..., + .stats = NULL, + .formats = NULL, + .labels = NULL, + .indent_mods = NULL +) { # Check for additional parameters to the statistics function dots_extra_args <- list(...) diff --git a/R/event_free.R b/R/event_free.R index 76218945..ab24dd02 100644 --- a/R/event_free.R +++ b/R/event_free.R @@ -6,11 +6,11 @@ #' #' @inheritParams proposal_argument_convention #' -#' @return for `s_event_free`, a list as returned by the [tern::s_surv_timepoint()] +#' @return +#' * `s_event_free` returns a list as returned by the [tern::s_surv_timepoint()] #' with an additional three-dimensional statistic `event_free_ci` which #' combines the `event_free_rate` and `rate_ci` statistics. -#' -#' For `a_event_free`, analogous to [tern::a_surv_timepoint] but with the additional +#' * `a_event_free` is analogous to [tern::a_surv_timepoint] but with the additional #' three-dimensional statistic described above available via `.stats`. #' #' @name event_free diff --git a/R/get_ref_info.R b/R/get_ref_info.R index 4616ba96..9853be71 100644 --- a/R/get_ref_info.R +++ b/R/get_ref_info.R @@ -6,8 +6,8 @@ #' #' @param ref_path (`character`)\cr reference group specification as an `rtables` #' `colpath`, see details. -#' @param .spl_context see [rtables::spl_context]. -#' @param .var the variable being analyzed, see [rtables::additional_fun_params]. +#' @param .spl_context (`data.frame`)\cr see [rtables::spl_context]. +#' @param .var (`character`)\cr the variable being analyzed, see [rtables::additional_fun_params]. #' #' @return A list with `ref_group` and `in_ref_col`, which can be used as #' `.ref_group` and `.in_ref_col` as if being directly passed to an analysis @@ -15,7 +15,7 @@ #' #' @details #' The reference group is specified in `colpath` hierarchical fashion in `ref_path`: -#' The first column split variable is the first element, and the level to use is the +#' the first column split variable is the first element, and the level to use is the #' second element. It continues until the last column split variable with last #' level to use. #' Note that depending on `.var`, either a `data.frame` (if `.var` is `NULL`) or diff --git a/R/h_freq_funs.R b/R/h_freq_funs.R index 9317a2b3..6b1f602c 100644 --- a/R/h_freq_funs.R +++ b/R/h_freq_funs.R @@ -1,15 +1,10 @@ -#' Non-blank Sentinel -#' -#' @keywords internal -non_blank_sentinel <- structure("", class = "non_blank_sentinel") - #' Get Control Subset #' #' Retrieves a subset of the DataFrame based on treatment variable and control group. #' -#' @param df Data frame to subset. -#' @param trt_var Treatment variable name. -#' @param ctrl_grp Control group value. +#' @param df (`data.frame`)\cr Data frame to subset. +#' @param trt_var (`character`)\cr Treatment variable name. +#' @param ctrl_grp (`character`)\cr Control group value. #' @return Subset of the data frame. #' @keywords internal get_ctrl_subset <- function(df, trt_var, ctrl_grp) { @@ -17,19 +12,6 @@ get_ctrl_subset <- function(df, trt_var, ctrl_grp) { } -# sfunction to perform counting of records or subjects on an incoming df and .alt_df - -#' Null Function -#' -#' A function that returns NULL. -#' -#' @return NULL -#' @keywords internal -null_fn <- function(...) { - NULL -} - - #' Create Alternative Data Frame #' #' Creates an alternative data frame based on the current split context. @@ -42,8 +24,16 @@ null_fn <- function(...) { #' @param variables Variables to include in the analysis. #' @param denom Denominator type. #' @return Grand parent dataset. -#' @export +#' @noRd +#' @keywords Internal h_create_altdf <- function(.spl_context, .df_row, denomdf, denom_by = NULL, id, variables, denom) { + colid <- .spl_context$cur_col_id[[1]] + inriskdiffcol <- grepl("difference", tolower(colid), fixed = TRUE) + if (is.null(denomdf) && denom %in% c("N_col") && length(.spl_context$split) > 1 && inriskdiffcol) { + stop("In order to get correct numbers in relative risk column, + the alt_counts_df dataset should be passed to build_table") + } + ### parent df in the current row-split (all col splits are still in) pardf <- .spl_context$full_parent_df[[NROW(.spl_context)]] @@ -114,7 +104,7 @@ no_data_to_report_str <- "No data to report" #' @param val Values to keep. #' @param excl_levels Levels to exclude from the factor. #' @return Updated data frame. -#' @export +#' @noRd h_update_factor <- function(df, .var, val = NULL, excl_levels = NULL) { if (!is.factor(df[[.var]]) || (is.null(val) && is.null(excl_levels))) { return(df) @@ -156,7 +146,8 @@ h_update_factor <- function(df, .var, val = NULL, excl_levels = NULL) { #' @param var Variable to extract from the expression. #' @param col_expr Column expression string. #' @return Substring corresponding to the variable. -#' @export +#' @noRd +#' @keywords internal h_colexpr_substr <- function(var, col_expr) { # reconstructing the strings is not an option as doesn't work for combined columns facets cur_col_expr <- as.character(col_expr) @@ -202,7 +193,8 @@ h_colexpr_substr <- function(var, col_expr) { #' @param denom Denominator type. #' @param denom_by Denominator grouping variable. #' @return Parent data frame. -#' @export +#' @noRd +#' @keywords internal h_denom_parentdf <- function(.spl_context, denom, denom_by) { if (denom != "n_parentdf") { return(NULL) @@ -229,7 +221,8 @@ h_denom_parentdf <- function(.spl_context, denom, denom_by) { #' @param addstr2levs String to add to new levels. #' @param new_levels_after Boolean, indicating if new levels should be added after existing levels. #' @return Updated data frame. -#' @export +#' @noRd +#' @keywords internal h_df_add_newlevels <- function(df, .var, new_levels, addstr2levs = NULL, new_levels_after) { varvec <- df[[.var]] @@ -293,9 +286,9 @@ h_df_add_newlevels <- function(df, .var, new_levels, addstr2levs = NULL, new_lev #' #' Retrieves the treatment variable reference path from the provided context. #' -#' @param ref_path Reference path for treatment variable. -#' @param .spl_context Current split context. -#' @param df Data frame. +#' @param ref_path (`character`)\cr Reference path for treatment variable. +#' @param .spl_context (`data.frame`)\cr Current split context. +#' @param df (`data.frame`)\cr Data frame. #' @return List containing treatment variable details. #' @export h_get_trtvar_refpath <- function(ref_path, .spl_context, df) { @@ -343,21 +336,23 @@ h_get_trtvar_refpath <- function(ref_path, .spl_context, df) { #' @param label_fstr Format string for labels. #' @param .spl_context Current split context. #' @return List containing updated data frames and values. -#' @export +#' @noRd +#' @keywords internal h_upd_dfrow <- function( - df_row, - .var, - val, - excl_levels, - drop_levels, - new_levels, - new_levels_after, - addstr2levs, - label, - label_map, - labelstr, - label_fstr, - .spl_context) { + df_row, + .var, + val, + excl_levels, + drop_levels, + new_levels, + new_levels_after, + addstr2levs, + label, + label_map, + labelstr, + label_fstr, + .spl_context +) { if (!is.null(label) && !is.null(label_map)) { stop("a_freq_j: label and label_map cannot be used together.") } @@ -421,6 +416,11 @@ h_upd_dfrow <- function( excl_levels <- NULL } + if (is.null(val) && !is.null(label_map)) { + split_info <- .spl_context[c("split", "value")] + val <- h_restrict_val(df_row, .var, label_map, split_info) + } + if (!is.null(val)) { # do not yet restrict to val levels, only update factors to the requested levels df_row <- df_row <- h_update_factor(df_row, .var, val) @@ -470,7 +470,8 @@ h_upd_dfrow <- function( #' @param .var Variable name. #' @param split_info Current split information. #' @return Mapped labels. -#' @export +#' @noRd +#' @keywords internal h_get_label_map <- function(.labels, label_map, .var, split_info) { if (!is.null(label_map)) { if (!all(c("split", "value") %in% names(split_info))) { @@ -510,7 +511,7 @@ h_get_label_map <- function(.labels, label_map, .var, split_info) { #' A Frequency Data Preparation Function #' #' Prepares frequency data for analysis. -#' +#' @noRd #' @param df Data frame to prepare. #' @param labelstr Label string. #' @param .var Variable name. @@ -533,29 +534,29 @@ h_get_label_map <- function(.labels, label_map, .var, split_info) { #' @param denom_by Denominator grouping variable. #' @param .stats Statistics to compute. #' @return List containing prepared data frames and values. -#' @export h_a_freq_dataprep <- function( - df, - labelstr = NULL, - .var = NA, - val = NULL, - drop_levels = FALSE, - excl_levels = NULL, - new_levels = NULL, - new_levels_after = FALSE, - addstr2levs = NULL, - .df_row, - .spl_context, - .N_col, - id = "USUBJID", - denom = c("N_col", "n_df", "n_altdf", "N_colgroup", "n_rowdf", "n_parentdf"), - variables, - label = NULL, - label_fstr = NULL, - label_map = NULL, - .alt_df_full = NULL, - denom_by = NULL, - .stats) { + df, + labelstr = NULL, + .var = NA, + val = NULL, + drop_levels = FALSE, + excl_levels = NULL, + new_levels = NULL, + new_levels_after = FALSE, + addstr2levs = NULL, + .df_row, + .spl_context, + .N_col, + id = "USUBJID", + denom = c("N_col", "n_df", "n_altdf", "N_colgroup", "n_rowdf", "n_parentdf"), + variables, + label = NULL, + label_fstr = NULL, + label_map = NULL, + .alt_df_full = NULL, + denom_by = NULL, + .stats +) { denom <- match.arg(denom) df <- df[!is.na(df[[.var]]), ] @@ -628,7 +629,7 @@ h_a_freq_dataprep <- function( #' Frequency Preparation in Rows #' #' Prepares frequency data in rows based on provided parameters. -#' +#' @noRd #' @param x_stats Statistics data. #' @param .stats_adj Adjusted statistics. #' @param .formats Format settings. @@ -639,17 +640,19 @@ h_a_freq_dataprep <- function( #' @param .labels_n Labels for statistics. #' @param na_str String for NA values. #' @return List containing prepared statistics, formats, labels, and indentation. -#' @export +#' @noRd +#' @keywords internal h_a_freq_prepinrows <- function( - x_stats, - .stats_adj, - .formats, - labelstr, - label_fstr, - label, - .indent_mods, - .labels_n, - na_str) { + x_stats, + .stats_adj, + .formats, + labelstr, + label_fstr, + label, + .indent_mods, + .labels_n, + na_str +) { # Fill in formatting defaults x_stats <- x_stats[.stats_adj] @@ -747,7 +750,7 @@ h_a_freq_prepinrows <- function( #' Subset Combination #' #' Subsets a data frame based on specified combination criteria. -#' +#' @noRd #' @param df Data frame to subset. #' @param combosdf Data frame containing combinations. #' @param do_not_filter Variables to not filter. @@ -755,24 +758,63 @@ h_a_freq_prepinrows <- function( #' @param flag_var Flag variable for filtering. #' @param colid Column ID for identification. #' @return Subsetted data frame. -#' @export h_subset_combo <- function(df, combosdf, do_not_filter, filter_var, flag_var, colid) { ### this is the core code for subsetting to appropriate combo level if (!is.null(flag_var)) { - df <- df[df[[flag_var]] == "Y", ] + df <- df[df[[flag_var]] %in% "Y", ] } # get the string related to combosdf text from colid it is the last part of the column id after the . eg 'Active - # Study Agent.Apalutamide.Thru 3 months' colid_str is 'Thru 3 months' colid_str <- stringr::str_split_i(colid, + # Study Agent.Xanomeline High Dose.Thru 3 months' colid_str is 'Thru 3 months' + # colid_str <- stringr::str_split_i(colid, # '\\.', i = -1) colid_str <- tail(unlist(strsplit(colid, "\\.")), 1) filter_val <- combosdf[combosdf$valname == colid_str, ]$label if (!(colid_str %in% do_not_filter)) { - df <- df |> - dplyr::filter(get(filter_var) == filter_val) + df <- df[df[[filter_var]] %in% filter_val, ] } return(df) } + +#' @noRd +#' @param df_row Data frame row to update. +#' @param .var Variable name. +#' @param label_map Mapping for labels. +#' @param split_info Current split information. +#' +#' @return Restriction of val to appropriate levels from `label_map`. +h_restrict_val <- function(df_row, .var, label_map, split_info) { + val <- NULL + xval_row <- unique(df_row[[.var]]) + xval_map <- label_map$value + + diff <- setdiff(xval_row, xval_map) + + if (length(diff) == 0) { + # If label_map has a variable from row split, apply + # current splits on label_map tibble as well. + rowsplits <- split_info$split + + label_map_split <- intersect(names(label_map), rowsplits) + + if (length(label_map_split) != 0) { + for (i in seq_along(label_map_split)) { + cursplvar <- label_map_split[i] + cid <- match(cursplvar, rowsplits) + cursplval <- split_info$value[cid] + + label_map <- label_map[label_map[[cursplvar]] == cursplval, ] + } + } + + if ("var" %in% names(label_map)) { + label_map <- label_map[label_map[["var"]] == .var, ] + } + + val <- label_map$value + } + val +} diff --git a/R/jjcs_num_formats.R b/R/jjcs_num_formats.R index ae6f41cf..1938c5b0 100644 --- a/R/jjcs_num_formats.R +++ b/R/jjcs_num_formats.R @@ -3,17 +3,18 @@ #' @title Numeric Formatting Function #' #' @description -#' Formatting setter for selected numerical statistics +#' Formatting setter for selected numerical statistics. #' -#' @param d precision of individual values -#' @param cap cap to numerical precision (d > cap -- will use precision as if cap was specified as precision) +#' @param d (`numeric`)\cr precision of individual values +#' @param cap (`numeric`)\cr cap to numerical precision (d > cap -- +#' will use precision as if cap was specified as precision) #' #' @return list: #' - fmt : named vector with formatting function (jjcsformat_xx) for numerical stats: range, median, mean_sd, sd #' - spec : named vector with formatting specifications for numerical stats: range, median, mean_sd, sd #' @export #' @examples -#' P1_precision <- jjcs_num_formats(d=0)$fmt +#' P1_precision <- jjcs_num_formats(d = 0)$fmt #' jjcs_num_formats(2)$fmt #' jjcs_num_formats(2)$spec jjcs_num_formats <- function(d, cap = 4) { diff --git a/R/jjcsformats.R b/R/jjcsformats.R index 2a81c89b..cfd04ca8 100644 --- a/R/jjcsformats.R +++ b/R/jjcsformats.R @@ -1,46 +1,61 @@ -#' @title Function factory for xx style formatting -#' @description A function factory to generate formatting functions for value -#' formatting that support the xx style format and control the rounding method +#' @name jjcsformat_xx +#' @title Utility for specifying custom formats +#' +#' @description #' -#' @param roundmethod (`string`)\cr choice of rounding methods. Options are: -#' * `sas`: the underlying rounding method is `tidytlg::roundSAS`, where \cr -#' roundSAS comes from this Stack Overflow post https://stackoverflow.com/questions/12688717/round-up-from-5 -#' * `iec`: the underlying rounding method is `round` +#' Utility for specifying custom formats that can be used as a format in `formatters::format_value` #' +#' @param str The formatting that is required specified as a text string, eg "xx.xx" #' @param na_str_dflt Character to represent NA value #' @param replace_na_dflt logical(1). Should an `na_string` of "NA" within #' the formatters framework be overridden by `na_str_default`? Defaults to #' `TRUE`, as a way to have a different default na string behavior from the #' base `formatters` framework. -#' @return `format_xx_fct()` format function that can be used in rtables formatting calls +#' @param na_str String for NA values. +#' @return Either a supported format string, or a formatting function that can be +#' used as format in `formatters::format_value` +#' @family JJCS formatting functions +#' @rdname jjcsformat_xx #' @export -#' -#' @family JJCS formats #' @examples -#' jjcsformat_xx_SAS <- format_xx_fct(roundmethod = "sas") -#' jjcsformat_xx <- jjcsformat_xx_SAS -#' rcell(c(1.453), jjcsformat_xx("xx.xx")) -#' rcell(c(), jjcsformat_xx("xx.xx")) -#' rcell(c(1.453, 2.45638), jjcsformat_xx("xx.xx (xx.xxx)")) +#' value <- c(1.65, 8.645) +#' fmt <- jjcsformat_xx("xx.x") +#' is.function(fmt) +#' fmt +#' format_value(value[1], fmt, round_type = "sas") +#' format_value(value[1], fmt, round_type = "iec") +#' if (is.function(fmt)) fmt(value[1]) +#' +#' fmt2 <- jjcsformat_xx("xx.x (xx.xxx)") +#' is.function(fmt2) +#' value <- c(1.65, 8.645) +#' format_value(value, fmt2, round_type = "sas") +#' format_value(value, fmt2, round_type = "iec") +#' # only possible when resulting format is a function +#' if (is.function(fmt2)) fmt2(value, round_type = "sas") #' -format_xx_fct <- function(roundmethod = c("sas", "iec"), na_str_dflt = "NE", - replace_na_dflt = TRUE) { - roundmethod <- match.arg(roundmethod) +#' value <- c(1.65, NA) +#' format_value(value, fmt2, round_type = "iec", na_str = c("ne1", "ne2")) +#' if (is.function(fmt2)) fmt2(value, round_type = "iec", na_str = c("ne1", "ne2")) +jjcsformat_xx <- function( + str, + na_str = na_str_dflt, + na_str_dflt = "NE", + replace_na_dflt = TRUE +) { + if (grepl("xxx.", str, fixed = TRUE)) { + stop("Error: jjcsformat_xx do not use xxx. in input str, replace by xx. instead.") + } - if (roundmethod == "sas") { - roundfunc <- tidytlg::roundSAS - } else { - roundfunc <- round + if (identical(str, "default")) { + return(str) } - fnct <- function(str, na_str = na_str_dflt) { - if (grepl("xxx.", str, fixed = TRUE)) { - stop( - "Error: jjcs_format_xx: do not use xxx. in input str, replace by xx. instead." - ) - } + if (is_valid_format(str)) { + rtable_format <- str + } else { if (!grepl("xx", str, fixed = TRUE)) { - stop("Error: jjcs_format_xx: input str must contain xx.") + stop("Error: jjcsformat_xx input str must contain xx.") } positions <- gregexpr( pattern = "xx\\.?x*", @@ -48,282 +63,202 @@ format_xx_fct <- function(roundmethod = c("sas", "iec"), na_str_dflt = "NE", perl = TRUE ) x_positions <- regmatches(x = str, m = positions)[[1]] - ### str is splitted into pieces as xx. xx xx.xxx - ### xx is no rounding - ### xx. rounding to integer - ### xx.x rounding to 1 decimal, etc - - no_round <- function(x, na_str = na_str_dflt) { - if (is.na(x)) { - return(na_str) - } else { - return(x) - } - } - roundings <- lapply(X = x_positions, function(x) { - y <- strsplit(split = "\\.", x = x)[[1]] - ### "xx.x" will result in c("xx","x") - ### "xx." will result in "xx" - ### "xx" will remain "xx" - - if (x == "xx") { - rounding <- no_round - } else { - rounding <- function(x, na_str = na_str_dflt) { - if (is.na(x)) { - return(na_str) - } else { - format( - roundfunc(x, digits = ifelse(length(y) > 1, nchar(y[2]), 0)), - nsmall = ifelse(length(y) > 1, nchar(y[2]), 0) - ) - } + single_rounding <- function(fmt) { + function(x, + na_str, + round_type) { + if (fmt %in% list_valid_format_labels()$`1d`) { + res <- format_value(x, + fmt, + na_str = na_str[1], + round_type = round_type + ) + } else if (fmt %in% paste0("xx.", strrep("x", times = 5:12))) { + # p-value fmt sometimes might need more digits + d <- nchar(sub(".*\\.", "", fmt)) + res <- round_fmt(x, digits = d, round_type = round_type, na_str = na_str[1]) } + res } - return(rounding) + } + + roundings <- lapply(X = x_positions, function(fmt) { + single_rounding(fmt) }) - rtable_format <- function(x, output, na_str = na_str_dflt) { - if (anyNA(na_str) || (replace_na_dflt && any(na_str == "NA"))) { - na_inds <- which(is.na(na_str) | (replace_na_dflt & na_str == "NA")) - na_str[na_inds] <- rep(na_str_dflt, length.out = length(na_str))[na_inds] - } - if (length(x) == 0 || isTRUE(all(x == ""))) { - return(NULL) - } else if (!length(positions[[1]]) == length(x)) { - stop( - "Error: input str in call to jjcs_format_xx must contain same number of xx as the number of stats." - ) - } - values <- Map(y = x, fun = roundings, na_str = na_str, function(y, fun, na_str) fun(y, na_str = na_str)) - regmatches(x = str, m = positions)[[1]] <- values - return(str) - } - return(rtable_format) - } - return(fnct) -} + rtable_format <- + function(x, + output, + round_type = valid_round_type, + na_str = na_str_dflt) { + if (anyNA(na_str) || (replace_na_dflt && any(na_str == "NA"))) { + na_inds <- which(is.na(na_str) | (replace_na_dflt & na_str == "NA")) + na_str[na_inds] <- rep(na_str_dflt, length.out = length(na_str))[na_inds] + } + if (length(x) == 0 || isTRUE(all(x == ""))) { + return(NULL) + } else if (!length(positions[[1]]) == length(x)) { + stop( + "Error: input str in call to jjcsformat_xx must contain same number of xx as the number of stats." + ) + } + round_type <- match.arg(round_type) -jjcsformat_xx_SAS <- format_xx_fct(roundmethod = "sas") -jjcsformat_xx_R <- format_xx_fct(roundmethod = "iec") + values <- Map(y = x, fun = roundings, na_str = na_str, function(y, fun, na_str, output) { + fun(y, na_str = na_str, round_type = round_type) + }) + regmatches(x = str, m = positions)[[1]] <- values + return(str) + } -### if we ever decide to switch rounding method, we just have to update jjcsformat_xx here + return(rtable_format) + } +} -#' @title Formatting of values -#' @name jjcsformat_xx -#' @description jjcs formatting function -#' @param str The formatting that is required specified as a text string, eg "xx.xx" -#' @param na_str character. Na string that will be passed from `formatters` into -#' our formatting functions. -#' @return a formatting function with `"sas"`-style rounding. -#' @export -jjcsformat_xx <- jjcsformat_xx_SAS -#' @name count_fraction -#' @title Formatting count and fraction values +#' @name count and fraction related formatting functions +#' @title Formatting functions for count and fraction, and for count denominator and fraction values #' #' @description #' #' Formats a count together with fraction (and/or denominator) with special #' consideration when count is 0, or fraction is 1. -#' \cr See also: tern::format_count_fraction_fixed_dp() +#' \cr See also: [tern::format_count_fraction_fixed_dp()] #' -#' @inheritParams format_xx_fct -#' @param x `numeric`\cr with elements `num` and `fraction` or `num`, `denom` and `fraction`. -#' @param d numeric(1). Number of digits to round fraction to (default=1) +#' @param x (`numeric vector`)\cr Vector with elements `num` and `fraction` or `num`, `denom` and `fraction`. +#' @param d (`numeric(1)`)\cr Number of digits to round fraction to (default = 1) #' @param ... Additional arguments passed to other methods. -#' @return A string in the format `count / denom (ratio percent)`. If `count` +#' @param type (`character(1`)\cr One of `count_fraction`, `count_denom_fraction`, `fraction_count_denom`, +#' to specify the type of format the function will represent. +#' @param verbose (`logical`)\cr Whether to print verbose output +#' @param round_type (`character(1)`)\cr the type of rounding to perform. +#' See [formatters::format_value()] for more details. +#' @param output (`string`)\cr output type. +#' See [formatters::format_value()] for more details. +#' @return A formatting function to format input into string in the format `count / denom (ratio percent)`. If `count` #' is 0, the format is `0`. If fraction is >0.99, the format is #' `count / denom (>99.9 percent)` -#' @family JJCS formats +#' @family JJCS formatting functions #' @rdname count_fraction #' @export -#' @examples -#' jjcsformat_count_fraction(c(7, 0.7)) -#' jjcsformat_count_fraction(c(70000, 0.9999999)) -#' jjcsformat_count_fraction(c(70000, 1)) -#' -jjcsformat_count_fraction <- function( - x, - d = 1, - roundmethod = c("sas", "iec"), - ...) { - roundmethod <- match.arg(roundmethod) - attr(x, "label") <- NULL - if (any(is.na(x))) { - return("-") - } - checkmate::assert_vector(x) - checkmate::assert_integerish(x[1]) - assert_proportion_value( - x[2], - include_boundaries = TRUE - ) +jjcsformat_cnt_den_fract_fct <- function(d = 1, + type = c("count_fraction", "count_denom_fraction", "fraction_count_denom"), + verbose = FALSE) { + type <- match.arg(type) + + function(x, + round_type = valid_round_type, + output, + ...) { + obj_label(x) <- NULL + if (any(is.na(x))) { + return("-") + } - fraction <- x[2] + round_type <- match.arg(round_type) - if (isTRUE(all.equal(fraction, 1))) fraction <- 1 + checkmate::assert_vector(x) + count <- x[1] + checkmate::assert_integerish(count) - if (roundmethod == "sas") { - fmtpct <- format(tidytlg::roundSAS(fraction * 100, d), nsmall = d) - } else { - fmtpct <- format(round(fraction * 100, d), nsmall = d) - } + fraction <- switch(type, + "count_fraction" = x[2], + "count_denom_fraction" = x[3], + "fraction_count_denom" = x[3] + ) - result <- if (x[1] == 0) { - "0" - } else if (fraction == 1) { - ## per conventions still report as 100.0% - paste0(x[1], " (100.0%)") - } else if (fmtpct == format(0, nsmall = d)) { - # else if (100*x[2] < 10**(-d)) { - ### example pct = 0.09999 ### <0.1% (even if fmtpct == 0.1, - # but the actual value of pct <0.1) - paste0(x[1], " (<", 10**(-d), "%)") - } else if (fmtpct == format(100, nsmall = d)) { - # else if (100*x[2] > 100-10**(-d)) { - ### example pct = 99.90001 ### >99.9% (even if fmtpct == 99.9, - # but the actual value of pct >99.9) - paste0(x[1], " (>", 100 - 10**(-d), "%)") - } else { - paste0(x[1], " (", fmtpct, "%)") - } - return(result) -} -#' @title Formatting count, denominator and fraction values -#' -#' @inheritParams count_fraction -#' @param ... Additional arguments passed to other methods. -#' @export -#' @rdname count_denom_fraction -#' @return `x`, formatted into a string with the appropriate -#' format and `d` digits of precision. -#' @examples -#' jjcsformat_count_denom_fraction(c(7, 10, 0.7)) -#' jjcsformat_count_denom_fraction(c(70000, 70001, 70000 / 70001)) -#' jjcsformat_count_denom_fraction(c(235, 235, 235 / 235)) -jjcsformat_count_denom_fraction <- function( - x, - d = 1, - roundmethod = c("sas", "iec"), - ...) { - roundmethod <- match.arg(roundmethod) - attr(x, "label") <- NULL - if (any(is.na(x))) { - return("-") - } - checkmate::assert_vector(x) - checkmate::assert_integerish(x[1]) - assert_proportion_value( - x[3], - include_boundaries = TRUE - ) + assert_proportion_value( + fraction, + include_boundaries = TRUE + ) - fraction <- x[3] - if (x[2] == x[1]) fraction <- 1 + if (isTRUE(all.equal(fraction, 1))) fraction <- 1 - fmt_x12 <- paste0(x[1], "/", x[2]) + if (type == "count_fraction") fmt_cd <- format_value(x = count, format = "xx") + if (type %in% c("count_denom_fraction", "fraction_count_denom")) { + denom <- x[2] + checkmate::assert_integerish(denom) + fmt_cd <- paste0(count, "/", denom) + } - if (roundmethod == "sas") { - fmtpct <- format(tidytlg::roundSAS(fraction * 100, d), nsmall = d) - } else { - fmtpct <- format(round(fraction * 100, d), nsmall = d) - } + if (verbose) message(paste0("round_type used: ", round_type)) - result <- if (x[1] == 0) { - # "0" - # same as in general situation - paste0(fmt_x12, " (", fmtpct, "%)") - } else if (100 * fraction == 100) { - paste0(fmt_x12, " (100.0%)") - } else if (100 * fraction < 10**(-d)) { - ### example pct = 0.09999 ### <0.1% (even if fmtpct == 0.1, but the actual value of pct <0.1) - paste0(fmt_x12, " (<", 10**(-d), "%)") - } else if (100 * fraction > 100 - 10**(-d)) { - ### example pct = 99.90001 ### >99.9% (even if fmtpct == 99.9, but the actual value of pct >99.9) - paste0(fmt_x12, " (>", 100 - 10**(-d), "%)") - } else { - paste0(fmt_x12, " (", fmtpct, "%)") + fmtpct <- format_value(100 * fraction, + format = paste0("xx.", strrep("x", times = d)), + output = "ascii", + round_type = round_type + ) + + fmtpct_p2 <- fmtpct + # deal with special cases + if (fraction == 1) { + fmtpct_p2 <- "100.0" + } else if (fmtpct == format(100, nsmall = d)) { + fmtpct_p2 <- paste0(">", 100 - 10**(-d)) + } else if (count != 0 && fmtpct == format(0, nsmall = d)) { + fmtpct_p2 <- paste0("<", 10**(-d)) + } + + fmtpct_p2 <- paste0(fmtpct_p2, "%") + fmtpct_p <- paste0(" (", fmtpct_p2, ")") + + result <- if (type == "fraction_count_denom") { + paste0(fmtpct_p2, " (", fmt_cd, ")") + } else if (count == 0 && type == "count_fraction") { + 0 + } else { + paste0(fmt_cd, fmtpct_p) + } + + return(result) } - return(result) } -#' @title Formatting fraction, count and denominator values +#' @rdname count_fraction +#' @export +#' @examples #' -#' @details -#' Formats a 3-dimensional value such that percent values -#' near 0 or 100% are formatted as .e.g, `"<0.1%"` and -#' `">99.9%"`, where the cutoff is controlled by `d`, and -#' formatted as `"xx.x% (xx/xx)"` otherwise, with the -#' precision of the percent also controlled by `d`. +#' jjcsformat_count_fraction(c(7, 0.7)) +#' jjcsformat_count_fraction(c(70000, 70000 / 70001)) +#' jjcsformat_count_fraction(c(235, 235 / 235)) +#' fmt <- jjcsformat_cnt_den_fract_fct(type = "count_fraction", d = 2) +#' fmt(c(23, 23 / 235)) +jjcsformat_count_fraction <- jjcsformat_cnt_den_fract_fct(type = "count_fraction") + +#' @rdname count_fraction +#' @export +#' @examples #' -#' @inheritParams count_fraction -#' @param ... Additional arguments passed to other methods. +#' jjcsformat_count_denom_fraction(c(7, 10, 0.7)) +#' jjcsformat_count_denom_fraction(c(70000, 70001, 70000 / 70001)) +#' jjcsformat_count_denom_fraction(c(235, 235, 235 / 235)) +#' fmt <- jjcsformat_cnt_den_fract_fct(type = "count_denom_fraction", d = 2) +#' fmt(c(23, 235, 23 / 235)) +jjcsformat_count_denom_fraction <- jjcsformat_cnt_den_fract_fct(type = "count_denom_fraction") + +#' @rdname count_fraction #' @export -#' @rdname fraction_count_denom -#' @return `x` formatted as a string with `d` digits of precision, -#' with special cased values as described in Details above. #' @examples +#' #' jjcsformat_fraction_count_denom(c(7, 10, 0.7)) #' jjcsformat_fraction_count_denom(c(70000, 70001, 70000 / 70001)) #' jjcsformat_fraction_count_denom(c(235, 235, 235 / 235)) -jjcsformat_fraction_count_denom <- function( - x, - d = 1, - roundmethod = c("sas", "iec"), - ...) { - roundmethod <- match.arg(roundmethod) - attr(x, "label") <- NULL - if (any(is.na(x))) { - return("-") - } - checkmate::assert_vector(x) - checkmate::assert_integerish(x[1]) - assert_proportion_value( - x[3], - include_boundaries = TRUE - ) - - fraction <- x[3] - if (x[2] == x[1]) fraction <- 1 - - fmt_x12 <- paste0(x[1], "/", x[2]) - - if (roundmethod == "sas") { - fmtpct <- format(tidytlg::roundSAS(fraction * 100, d), nsmall = d) - } else { - fmtpct <- format(round(fraction * 100, d), nsmall = d) - } +#' fmt <- jjcsformat_cnt_den_fract_fct(type = "fraction_count_denom", d = 2) +#' fmt(c(23, 235, 23 / 235)) +jjcsformat_fraction_count_denom <- jjcsformat_cnt_den_fract_fct(type = "fraction_count_denom") - result <- if (x[1] == 0) { - # "0" - # same as in general situation - paste0("(", fmt_x12, ")") - } else if (100 * fraction == 100) { - paste0("100.0%", " (", fmt_x12, ")") - } else if (100 * fraction < 10**(-d)) { - ### example pct = 0.09999 ### <0.1% (even if fmtpct == 0.1, but the actual value of pct <0.1) - paste0("<", 10**(-d), "%", " (", fmt_x12, ")") - } else if (100 * fraction > 100 - 10**(-d)) { - ### example pct = 99.90001 ### >99.9% (even if fmtpct == 99.9, but the actual value of pct >99.9) - paste0(">", 100 - 10**(-d), "%", " (", fmt_x12, ")") - } else { - paste0(fmtpct, "%", " (", fmt_x12, ")") - } - return(result) -} #' @title Function factory for p-value formatting #' #' @description A function factory to generate formatting functions for p-value -#' formatting that support rounding close to the significance level specified +#' formatting that support rounding close to the significance level specified. #' -#' @param alpha `number`\cr the significance level to account for during rounding. +#' @param alpha (`numeric`)\cr the significance level to account for during rounding. #' @return The p-value in the standard format. If `count` is 0, the format is `0`. #' If it is smaller than 0.001, then `<0.001`, if it is larger than 0.999, then #' `>0.999` is returned. Otherwise, 3 digits are used. In the special case that @@ -332,7 +267,7 @@ jjcsformat_fraction_count_denom <- function( #' For example, 0.0048 is not rounded to 0.005 but stays at 0.0048 if `alpha = 0.005` #' is set. #' -#' @family JJCS formats +#' @rdname jjcsformat_xx #' @export #' #' @examples @@ -348,27 +283,36 @@ jjcsformat_fraction_count_denom <- function( jjcsformat_pval_fct <- function(alpha = 0.05) { checkmate::assert_number(alpha, lower = 0, upper = 1) - function(x, ...) { + function(x, round_type = valid_round_type, na_str, ...) { + round_type <- match.arg(round_type) checkmate::assert_number( x, lower = 0, upper = 1 + .Machine$double.eps, # Be a bit tolerant here. na.ok = TRUE ) + xx_format <- "xx.xxx" + if (!is.na(x) && alpha < 0.001 && alpha > 0) { + stop("jjcsformat_pval_fct: argument alpha should be 0 or at least 0.001.") + } + if (is.na(x)) { - "NE" + format_value(x, jjcsformat_xx(xx_format), na_str = na_str) } else if (x < 0.001) { "<0.001" } else if (x > 0.999) { ">0.999" } else { - xx_format <- "xx.xxx" - res <- jjcsformat_xx(xx_format)(x) - while (as.numeric(res) == alpha && x < alpha) { + res <- format_value(x, jjcsformat_xx(xx_format), round_type = round_type) # nolint start + while (as.numeric(res) == alpha && x < alpha && + xx_format != paste0("xx.", strrep("x", times = 10))) { # Increase precision by 1 digit until the result # is different from threshold alpha. - xx_format <- paste0(xx_format, "x") - res <- jjcsformat_xx(xx_format)(x) + xx_format <- paste0(xx_format, "x") # nolint end + res <- format_value(x, jjcsformat_xx(xx_format), round_type = round_type) + } + if (xx_format == paste0("xx.", strrep("x", times = 10))) { + # produce message eg "stopped increasing precision for p-value"? } res } @@ -379,30 +323,35 @@ jjcsformat_pval_fct <- function(alpha = 0.05) { #' @description A function factory to generate formatting functions for range formatting #' that includes information about the censoring of survival times. #' -#' @param str `string`\cr the format specifying the number of digits to be used, +#' @param str (`string`)\cr the format specifying the number of digits to be used, #' for the range values, e.g. `"xx.xx"`. +#' +#' @param censor_char (`string`)\cr the character (of length 1) to be appended to `min` or `max` #' @return A function that formats a numeric vector with 4 elements: #' - minimum #' - maximum #' - censored minimum? (1 if censored, 0 if event) #' - censored maximum? (1 if censored, 0 if event) #' The range along with the censoring information is returned as a string -#' with the specified numeric format as `(min, max)`, and the `+` is appended +#' with the specified numeric format as `(min, max)`, and the `censor_char` is appended #' to `min` or `max` if these have been censored. #' -#' @family JJCS formats #' @export -#' +#' @rdname jjcsformat_xx #' @examples #' my_range_format <- jjcsformat_range_fct("xx.xx") #' my_range_format(c(0.35235, 99.2342, 1, 0)) #' my_range_format(c(0.35235, 99.2342, 0, 1)) #' my_range_format(c(0.35235, 99.2342, 0, 0)) #' my_range_format(c(0.35235, 99.2342, 1, 1)) -jjcsformat_range_fct <- function(str) { +#' my_range_format <- jjcsformat_range_fct("xx.xx", censor_char = "*") +#' my_range_format(c(0.35235, 99.2342, 1, 1)) +jjcsformat_range_fct <- function(str, censor_char = "+") { format_xx <- jjcsformat_xx(str) + checkmate::assert_string(censor_char, na.ok = FALSE, n.chars = 1) - function(x, ...) { + function(x, output, round_type = valid_round_type, ...) { + round_type <- match.arg(round_type) checkmate::assert_numeric( x, len = 4L, @@ -411,9 +360,11 @@ jjcsformat_range_fct <- function(str) { ) checkmate::assert_true(all(x[c(3, 4)] %in% c(0, 1))) - res <- vapply(x[c(1, 2)], format_xx, character(1)) - if (x[3] == 1) res[1] <- paste0(res[1], "+") - if (x[4] == 1) res[2] <- paste0(res[2], "+") + res <- vapply(x[c(1, 2)], FUN = function(x) { + format_value(x, format_xx, round_type = round_type) + }, character(1)) + if (x[3] == 1) res[1] <- paste0(res[1], censor_char) + if (x[4] == 1) res[2] <- paste0(res[2], censor_char) paste0("(", res[1], ", ", res[2], ")") } } diff --git a/R/junco_utils_default_stats_formats_labels.R b/R/junco_utils_default_stats_formats_labels.R index 892911f3..c75a76b8 100644 --- a/R/junco_utils_default_stats_formats_labels.R +++ b/R/junco_utils_default_stats_formats_labels.R @@ -46,10 +46,11 @@ NULL #' #' @export junco_get_stats <- function( - method_groups = "analyze_vars_numeric", - stats_in = NULL, - custom_stats_in = NULL, - add_pval = FALSE) { + method_groups = "analyze_vars_numeric", + stats_in = NULL, + custom_stats_in = NULL, + add_pval = FALSE +) { tern_get_stats( method_groups = method_groups, stats_in = stats_in, @@ -96,10 +97,11 @@ junco_get_formats_from_stats <- function(stats, formats_in = NULL, levels_per_st #' #' @export junco_get_labels_from_stats <- function( - stats, - labels_in = NULL, - levels_per_stats = NULL, - label_attr_from_stats = NULL) { + stats, + labels_in = NULL, + levels_per_stats = NULL, + label_attr_from_stats = NULL +) { tern_get_labels_from_stats( stats = stats, labels_in = labels_in, @@ -184,6 +186,7 @@ format_stats <- function(x_stats, method_groups, stats_in, formats_in, labels_in #' #' @export junco_default_stats <- list( + cmhrms = c("pval"), coxph_hr = c("n_tot", "n_tot_events", "hr", "hr_ci", "hr_ci_3d", "pvalue", "lr_stat_df"), event_free = c("pt_at_risk", "event_free_rate", "rate_se", "rate_ci", "event_free_ci"), kaplan_meier = c("quantiles_lower", "median_ci_3d", "quantiles_upper", "range_with_cens_info"), @@ -254,6 +257,7 @@ junco_default_formats_start <- c( adj_mean_ci = jjcsformat_xx("(xx.xxx, xx.xxx)"), adj_mean_est_ci = jjcsformat_xx("xx.xxx (xx.xxx, xx.xxx)"), change = "xx.x%", + cv = jjcsformat_xx("xx.xx"), diff = jjcsformat_xx("xx.x"), diff_ci = jjcsformat_xx("(xx.x, xx.x)"), diff_est_ci = jjcsformat_xx("xx.x (xx.x, xx.x)"), @@ -262,6 +266,10 @@ junco_default_formats_start <- c( diff_mean_est_ci = jjcsformat_xx("xx.xxx (xx.xxx, xx.xxx)"), event_free_ci = jjcsformat_xx("xx.xx (xx.xx, xx.xx)"), event_free_rate = jjcsformat_xx("xx.xx"), + geom_sd = jjcsformat_xx("xx.xxx"), + geom_se = jjcsformat_xx("xx.xxx"), + geom_mean_sd = jjcsformat_xx("xx.xx (xx.xxx)"), + geom_mean_se = jjcsformat_xx("xx.xx (xx.xxx)"), hr = jjcsformat_xx("xx.xx"), hr_ci = jjcsformat_xx("(xx.xx, xx.xx)"), hr_ci_3d = jjcsformat_xx("xx.xx (xx.xx, xx.xx)"), @@ -272,10 +280,14 @@ junco_default_formats_start <- c( lsmean_diffci = jjcsformat_xx("xx.xx (xx.xx, xx.xx)"), lsmean_diff_ci = jjcsformat_xx("(xx.xx, xx.xx)"), lsmean_se = jjcsformat_xx("xx.xx (xx.xx)"), + mean = jjcsformat_xx("xx.xx"), mean_sd = jjcsformat_xx("xx.xx (xx.xxx)"), + mean_se = jjcsformat_xx("xx.xx (xx.xxx)"), + mean_pval = jjcsformat_pval_fct(0), median = jjcsformat_xx("xx.xx"), median_ci = jjcsformat_xx("(xx.xx, xx.xx)"), median_ci_3d = jjcsformat_xx("xx.xx (xx.xx, xx.xx)"), + median_range = jjcsformat_xx("xx.xx (xx.x, xx.x)"), n = jjcsformat_xx("xx."), n_tot = jjcsformat_xx("xx."), n_tot_events = jjcsformat_xx("xx."), @@ -285,12 +297,14 @@ junco_default_formats_start <- c( pvalue = jjcsformat_pval_fct(0), p_value = jjcsformat_pval_fct(0), quantiles = jjcsformat_xx("xx.xx, xx.xx"), - range = jjcsformat_xx("xx.xx, xx.xx"), + range = jjcsformat_xx("xx.x, xx.x"), range_with_cens_info = jjcsformat_range_fct("xx.xx"), rate_ci = jjcsformat_xx("(xx.xx, xx.xx)"), rate_se = jjcsformat_xx("xx.xx"), rel_risk_ci = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), quantiles_upper = jjcsformat_xx("xx.xx (xx.xx, xx.xx)"), + sd = jjcsformat_xx("xx.xxx"), + se = jjcsformat_xx("xx.xxx"), n_altdf = "xx", n_df = "xx", n_rowdf = "xx", diff --git a/R/lsmeans.R b/R/lsmeans.R index bb50e9bb..8bfe65b1 100644 --- a/R/lsmeans.R +++ b/R/lsmeans.R @@ -1,7 +1,7 @@ #' Helpers for Processing Least Square Means #' -#' @param fit result of model fitting function, e.g. [mmrm::mmrm()] or [stats::lm()]. #' @inheritParams fit_mmrm_j +#' @param fit result of model fitting function, e.g. [mmrm::mmrm()] or [stats::lm()]. #' @param averages (`list`)\cr optional named list of visit levels which should be averaged #' and reported along side the single visits. #' @param weights (`string`)\cr argument from [emmeans::emmeans()], 'counterfactual' by default. @@ -87,6 +87,7 @@ h_get_average_visit_specs <- function(emmeans_res, vars, averages, fit) { #' #' @note The difference here compared to the original tern.mmrm::h_get_spec_visit_estimates() #' function is that additional arguments for [emmeans::contrast()] can be passed via the +#' dots (`...`) argument. #' Once this has been added to the `tern.mmrm` package then its functions can be used instead. #' #' @param tests (`flag`)\cr whether to add test results to the estimates. diff --git a/R/mmrm.R b/R/mmrm.R index 1019e910..4a3cda92 100644 --- a/R/mmrm.R +++ b/R/mmrm.R @@ -32,6 +32,9 @@ h_check_and_get_label <- function(x, vars, data) { #' Extraction of Covariate Parts from Character Vector #' +#' @description +#' Extraction of Covariate Parts from Character Vector. +#' #' @param covariates (`character`)\cr specification in the usual way, see examples. #' #' @return Character vector of the covariates involved in `covariates` specification. @@ -128,8 +131,8 @@ build_formula <- function( #' #' Extracts the least square means from an `MMRM` fit. #' -#' @param fit (`mmrm`)\cr result of [mmrm::mmrm()]. #' @inheritParams fit_mmrm_j +#' @param fit (`mmrm`)\cr result of [mmrm::mmrm()]. #' @param averages (`list`)\cr named list of visit levels which should be averaged #' and reported along side the single visits. #' @param weights (`string`)\cr type of weights to be used for the least square means, diff --git a/R/mmrm_rbmi.R b/R/mmrm_rbmi.R index 2eee6ccf..817b507e 100644 --- a/R/mmrm_rbmi.R +++ b/R/mmrm_rbmi.R @@ -5,7 +5,8 @@ #' group) and the least square means estimates in each group. #' #' @param data (`data.frame`)\cr containing the data to be used in the model. -#' @param vars (`vars`)\cr list as generated by [rbmi::set_vars()]. Only the `subjid`, `group`, +#' @param vars (`vars`)\cr list as generated by the set_vars() function from the rbmi package. +#' Only the `subjid`, `group`, #' `visit`, `outcome` and `covariates` elements are required. See details. #' @param cov_struct (`string`)\cr the covariance structure to use. Note that the same #' covariance structure is assumed for all treatment groups. @@ -27,7 +28,8 @@ #' 3. Extract the 'treatment effect' & least square means for each treatment group #' vs the control group. #' -#' In order to meet the formatting standards set by [rbmi::analyse()] the results will be collapsed +#' In order to meet the formatting standards set by the analyse() function from the rbmi package, +#' the results will be collapsed #' into a single list suffixed by the visit name, e.g.: #' ``` #' list( @@ -48,7 +50,7 @@ #' visit, together with the degrees of freedom (which is treatment group specific). #' #' If you want to include additional interaction terms in your model this can be done -#' by providing them to the `covariates` argument of [rbmi::set_vars()] +#' by providing them to the `covariates` argument of the set_vars() function from the rbmi package #' e.g. `set_vars(covariates = c('sex*age'))`. #' #' @note The `group` and `visit` interaction `group:visit` is not included by @@ -58,15 +60,17 @@ #' #' @seealso [rbmi_analyse()] #' @seealso [mmrm::mmrm()] -#' @seealso [rbmi::set_vars()] +#' @seealso The set_vars() function from the rbmi package #' @export rbmi_mmrm <- function( - data, - vars, - cov_struct = c("us", "toep", "cs", "ar1"), - visits = NULL, - weights = c("counterfactual", "equal"), - ...) { + data, + vars, + cov_struct = c("us", "toep", "cs", "ar1"), + visits = NULL, + weights = c("counterfactual", "equal"), + ... +) { + assert_rbmi() subjid <- vars[["subjid"]] outcome <- vars[["outcome"]] group <- vars[["group"]] diff --git a/R/odds_ratio.R b/R/odds_ratio.R index 5422fe21..6094e414 100644 --- a/R/odds_ratio.R +++ b/R/odds_ratio.R @@ -1,6 +1,7 @@ #' Odds ratio estimation #' #' @description `r lifecycle::badge('stable')` +#' A set of functions for Odds-Ratio (OR) calculation. #' #' @param method (`string`)\cr whether to use the correct (`'exact'`) calculation in the conditional likelihood or one #' of the approximations, or the CMH method. See [survival::clogit()] for details. diff --git a/R/pool_rbmi.R b/R/pool_rbmi.R index e4e4359f..b1e0aa01 100644 --- a/R/pool_rbmi.R +++ b/R/pool_rbmi.R @@ -1,10 +1,33 @@ -#' @note: This has been forked from the `rbmi` package, mainly to support in addition -#' the pooling of variance estimates. +#' Pool analysis results obtained from the imputed datasets +#' +#' @details This has been forked from the `rbmi` package, mainly to support in +#' addition the pooling of variance estimates. See pool() for more details. +#' +#' @param results an analysis object created by analyse(). +#' +#' @param conf.level confidence level of the returned confidence interval. +#' Must be a single number between 0 and 1. Default is 0.95. +#' +#' @param alternative a character string specifying the alternative hypothesis, +#' must be one of `"two.sided"` (default), `"greater"` or `"less"`. +#' +#' @param type a character string of either `"percentile"` (default) or +#' `"normal"`. Determines what method should be used to calculate the bootstrap +#' confidence intervals. See details. +#' Only used if `method_condmean(type = "bootstrap")` was specified +#' in the original call to draws(). +#' +#' @returns A list of class `pool`. +#' +#' @export rbmi_pool <- function( - results, - conf.level = 0.95, - alternative = c("two.sided", "less", "greater"), - type = c("percentile", "normal")) { + results, + conf.level = 0.95, + alternative = c("two.sided", "less", "greater"), + type = c("percentile", "normal") +) { + assert_rbmi() + rbmi::validate(results) alternative <- match.arg(alternative) diff --git a/R/proportions.R b/R/proportions.R index 5b6b84fc..dfff6fb6 100644 --- a/R/proportions.R +++ b/R/proportions.R @@ -80,6 +80,9 @@ c_proportion_logical <- function(x, labelstr, label_fstr, format, .N_col) { #' Helper Function to Create Logical Design Matrix from Factor Variable #' +#' @description +#' Helper Function to Create Logical Design Matrix from Factor Variable. +#' #' @param df (`data.frame`)\cr including a factor variable with name in `.var`. #' @param .var (`string`)\cr name of the factor variable. #' @@ -102,6 +105,9 @@ h_get_design_mat <- function(df, .var) { #' Formatted Analysis Function For Proportion Confidence Interval for Logical #' +#' @description +#' Formatted Analysis Function For Proportion Confidence Interval for Logical. +#' #' @param x (`logical`)\cr including binary response values. #' @param .alt_df (`data.frame`)\cr alternative data frame used for denominator calculation. #' @param formats (`list`)\cr including element `prop_ci` with the @@ -137,6 +143,9 @@ a_proportion_ci_logical <- function(x, .alt_df, conf_level, method, formats) { #' Formatted Analysis Function For Proportion Confidence Interval for Factor #' +#' @description +#' Formatted Analysis Function For Proportion Confidence Interval for Factor. +#' #' @param df (`data.frame`)\cr including factor `.var`. #' @param .var (`string`)\cr name of the factor variable. #' @param .var (`string`)\cr name of the factor variable. @@ -164,7 +173,7 @@ a_proportion_ci_factor <- function(df, .var, ...) { in_rows(.list = res, .labels = colnames(design_mat)) } -#' Split Function for Proportion Analysis Columns (TEFCGIS08 e.g.) +#' Split Function for Proportion Analysis Columns #' #' Here we just split into 3 columns `n`, `%` and `Cum %`. #' @@ -173,7 +182,6 @@ a_proportion_ci_factor <- function(df, .var, ...) { #' @param fulldf (`data.frame`)\cr full data frame. #' @param .spl_context (`environment`)\cr split context environment. #' -#' @note This split function is used in the proportion table TEFCGIS08 and similar ones. #' @seealso [rtables::make_split_fun()] describing the requirements for this kind of #' post-processing function. prop_post_fun <- function(ret, spl, fulldf, .spl_context) { @@ -190,7 +198,7 @@ prop_post_fun <- function(ret, spl, fulldf, .spl_context) { #' @export prop_split_fun <- make_split_fun(post = list(prop_post_fun)) -#' Formatted Analysis Function for Proportion Analysis (TEFCGIS08 e.g.) +#' Formatted Analysis Function for Proportion Analysis #' #' This function applies to a factor `x` when a column split was prepared with #' [prop_split_fun()] before. diff --git a/R/proposal_argument_convention.R b/R/proposal_argument_convention.R index 891eb7c3..4eef0673 100644 --- a/R/proposal_argument_convention.R +++ b/R/proposal_argument_convention.R @@ -36,6 +36,8 @@ #' @param data (`data.frame`)\cr the dataset containing the variables to summarize. #' @param df (`data.frame`)\cr data set containing all analysis variables. #' @param draw (`flag`)\cr whether the plot should be drawn. +#' @param exclude_levels (`list`)\cr A named list where names correspond to split variables +#' and values are vectors of levels to exclude. #' @param grp (`factor`)\cr defining the groups. #' @param groups_lists (named `list` of `list`)\cr optionally contains for each `subgroups` variable a #' list, which specifies the new group levels via the names and the @@ -50,7 +52,7 @@ #' for more information. #' @param lyt (`layout`)\cr input layout where analyses will be added to. #' @param method (`string`)\cr specifies the test used to calculate the p-value for the difference between -#' two proportions. For options, see [s_test_proportion_diff()]. Default is `NULL` so no test is performed. +#' two proportions. For options, see [tern::s_test_proportion_diff()]. Default is `NULL` so no test is performed. #' @param na.rm (`flag`)\cr whether `NA` values should be removed from `x` prior to analysis. #' @param na_level `r lifecycle::badge('deprecated')` Please use the `na_str` argument instead. #' @param na_str (`string`)\cr string used to replace all `NA` or empty values in the output. @@ -68,7 +70,7 @@ #' @param section_div (`string`)\cr string which should be repeated as a section divider after each group #' defined by this split instruction, or `NA_character_` (the default) for no section divider. #' @param show_labels (`string`)\cr label visibility: one of 'default', 'visible' and 'hidden'. -#' @param show_relative should the 'reduction' (`control - treatment`, default) or the 'increase' +#' @param show_relative (`string`)\cr should the 'reduction' (`control - treatment`, default) or the 'increase' #' (`treatment - control`) be shown for the relative change from baseline? #' @param strata (`character` or `NULL`)\cr variable names indicating stratification factors. #' @param table_names (`character`)\cr this can be customized in case that the same `vars` are analyzed multiple times, @@ -80,7 +82,6 @@ #' @param var (`string`)\cr single variable name for the primary analysis variable. #' @param x (`numeric`)\cr vector of numbers we want to analyze. #' @param ctrl_grp (`string`)\cr Level of the control group for the relative risk derivation. - #' @details Although this function just returns `NULL` it has two uses, for #' the `tern` users it provides a documentation of arguments that are #' commonly and consistently used in the framework. For the developer it adds a diff --git a/R/pruning_functions.R b/R/pruning_functions.R index bc351c56..e018650b 100644 --- a/R/pruning_functions.R +++ b/R/pruning_functions.R @@ -4,10 +4,10 @@ #' #' @inheritParams rtables::prune_table #' -#' @param empty_msg character(1). The message to place in the table +#' @param empty_msg (`character(1)`)\cr The message to place in the table #' if no rows were left after pruning #' -#' @param spancols logical(1). Should `empty_msg` be spanned +#' @param spancols (`logical(1)`)\cr Should `empty_msg` be spanned #' across the table's columns (`TRUE`) or placed in the #' rows row label (`FALSE`). Defaults to `FALSE` currently. #' @@ -15,7 +15,7 @@ #' @return `tt` pruned based on the arguments, or, if #' pruning would remove all rows, a TableTree with the #' same column structure, and one row containing the -#' empty message spanning all columns +#' empty message spanning all columns. #' #' @export #' @examples @@ -58,16 +58,14 @@ safe_prune_table <- function( #' based on the count (assumed to be the first statistic displayed when a compound #' statistic (e.g., ## / ## (XX.X percent) is presented). #' -#' @param count count threshold. Function will keep all records strictly greater +#' @param count (`numeric`)\cr count threshold. Function will keep all records strictly greater #' than this threshold. -#' @param cols column path (character or integer (column indices)) -#' @param cat_include Category to be considered for pruning -#' @param cat_exclude logical Category to be excluded from pruning +#' @param cols (`character`)\cr column path (character or integer (column indices)) +#' @param cat_include (`character`)\cr Category to be considered for pruning +#' @param cat_exclude (`character`)\cr Category to be excluded from pruning #' @export #' -#' #' @examples -#' #' ADSL <- data.frame( #' USUBJID = c( #' "XXXXX01", "XXXXX02", "XXXXX03", "XXXXX04", "XXXXX05", @@ -116,11 +114,12 @@ safe_prune_table <- function( #' ) #' #' result -#' #' @rdname count_pruner -#' @returns function that can be utilized as pruning function in prune_table +#' @returns Function that can be utilized as pruning function in prune_table. #' count_pruner <- function(count = 0, cat_include = NULL, cat_exclude = NULL, cols = c("TRT01A")) { + colpaths <- NULL + function(tt) { # Do not ever prune the following rows. a row that should be kept in the table will get the value of FALSE @@ -144,7 +143,10 @@ count_pruner <- function(count = 0, cat_include = NULL, cat_exclude = NULL, cols # init return value to FALSE (not remove row) remove <- FALSE - colpaths <- col_paths(tt) + if (is.null(colpaths)) { + colpaths <<- col_paths(tt) + } + # identify non relative risk columns as in rrisk columns first element is not a count, but diff percentage with # small total columns and count > 0 (eg count = 1, n per group = 10), you can run into count1 = 1, countpbo = # 0, diffpct = 10, this row should not be considered though @@ -199,16 +201,18 @@ count_pruner <- function(count = 0, cat_include = NULL, cat_exclude = NULL, cols #' #' @description #' This is a pruning constructor function which identifies records to be pruned -#' based on the the fraction from the percentages. In addition to just looking at a fraction within an arm +#' based on the the fraction from the percentages. In addition to just looking at a +#' fraction within an arm, #' this function also allows further flexibility to also prune based on a comparison versus the control arm. -#' @param fraction fraction threshold. Function will keep all records strictly greater +#' @param fraction (`proportion`)\cr Fraction threshold. +#' Function will keep all records strictly greater #' than this threshold. -#' @param cols column path. -#' @param keeprowtext Row to be excluded from pruning. -#' @param reg_expr Apply keeprowtext as a regular expression (grepl with fixed = TRUE) -#' @param control Control Group -#' @param diff_from_control Difference from control threshold. -#' @param only_more_often TRUE: Only consider when column pct is more often +#' @param cols (`character`)\cr Column path. +#' @param keeprowtext (`character`)\cr Row to be excluded from pruning. +#' @param reg_expr (`logical`)\cr Apply keeprowtext as a regular expression (grepl with fixed = TRUE) +#' @param control (`character`)\cr Control Group +#' @param diff_from_control (`numeric`)\cr Difference from control threshold. +#' @param only_more_often (`logical`)\cr TRUE: Only consider when column pct is more often #' than control. FALSE: Also select a row where column pct is less often than #' control and abs(diff) above threshold #' @@ -287,7 +291,7 @@ count_pruner <- function(count = 0, cat_include = NULL, cat_exclude = NULL, cols #' #' result #' @rdname bspt_pruner -#' @returns function that can be utilized as pruning function in prune_table +#' @returns Function that can be utilized as pruning function in prune_table. #' bspt_pruner <- function( fraction = 0.05, @@ -462,12 +466,12 @@ lst_slicer <- function(lst, ind, type) { #' @description #' This function will remove all rows of a table based on the row text #' provided by the user. -#' @param removerowtext define a text string for which any row with row text will be removed. -#' @param reg_expr Apply removerowtext as a regular expression (grepl with fixed = TRUE) +#' @param removerowtext (`character`)\cr Define a text string for which any row with row text will be removed. +#' @param reg_expr (`logical`)\cr Apply removerowtext as a regular expression +#' (grepl with fixed = TRUE) #' @export #' @rdname remove_rows #' -#' #' @examples #' ADSL <- data.frame( #' USUBJID = c( @@ -505,7 +509,7 @@ lst_slicer <- function(lst, ind, type) { #' #' result #' @aliases remove_rows -#' @returns function that can be utilized as pruning function in prune_table +#' @returns Function that can be utilized as pruning function in prune_table. #' remove_rows <- function(removerowtext = NULL, reg_expr = FALSE) { function(tt) { @@ -537,12 +541,10 @@ remove_rows <- function(removerowtext = NULL, reg_expr = FALSE) { #' columns are NULL, as then the row should not be kept. To be utilized as a #' row_condition in function tern::keep_rows #' -#' @param tr table tree object +#' @param tr (`TableTree`)\cr The TableTree object to prune. #' @export #' -#' #' @examples -#' #' library(dplyr) #' #' ADSL <- data.frame( @@ -581,7 +583,7 @@ remove_rows <- function(removerowtext = NULL, reg_expr = FALSE) { #' #' result #' @rdname keep_non_null_rows -#' @returns a function that can be utilized as a row_condition in the tern::keep_rows function +#' @returns A function that can be utilized as a row_condition in the tern::keep_rows function. #' keep_non_null_rows <- function(tr) { if (methods::is(tr, "DataRow")) { diff --git a/R/rbmi.R b/R/rbmi.R index cd1dc5fd..23f95d72 100644 --- a/R/rbmi.R +++ b/R/rbmi.R @@ -1,5 +1,8 @@ #' Helper for Finding AVISIT after which CHG are all Missing #' +#' @description +#' Helper for Finding AVISIT after which CHG are all Missing. +#' #' @param df (`data.frame`)\cr with `CHG` and `AVISIT` variables. #' #' @return A string with either the factor level after which `AVISIT` is all missing, @@ -44,7 +47,9 @@ find_missing_chg_after_avisit <- function(df) { visit_levels_missing <- as.integer(df[is.na(df$CHG), ]$AVISIT) # Missing visits at the end. - visit_levels_missing_end <- visit_levels_missing[visit_levels_missing > visit_levels_max_available] + visit_levels_missing_end <- visit_levels_missing[ + visit_levels_missing > visit_levels_max_available + ] # Return first one if there is any. if (length(visit_levels_missing_end)) { @@ -58,19 +63,24 @@ find_missing_chg_after_avisit <- function(df) { #' Create a `rbmi` ready cluster #' -#' @param cluster_or_cores Number of parallel processes to use or an existing cluster to make use of -#' @param objects a named list of objects to export into the sub-processes -#' @param packages a character vector of libraries to load in the sub-processes -#' +#' @description #' This function is a wrapper around `parallel::makePSOCKcluster()` but takes #' care of configuring `rbmi` to be used in the sub-processes as well as loading #' user defined objects and libraries and setting the seed for reproducibility. #' -#' @return If `cluster_or_cores` is `1` this function will return `NULL`. If `cluster_or_cores` -#' is a number greater than `1`, a cluster with `cluster_or_cores` cores is returned. +#' @param cluster_or_cores (`integer` or `cluster object`)\cr +#' Number of parallel processes to use or an existing cluster to make use of +#' @param objects (`list`)\cr A named list of objects to export into the sub-processes +#' @param packages (`character vector`)\cr +#' A character vector of libraries to load in the sub-processes #' -#' If `cluster_or_cores` is a cluster created via `parallel::makeCluster()` then this function -#' returns it after inserting the relevant `rbmi` objects into the existing cluster. +#' @return +#' * If `cluster_or_cores` is `1`, this function will return `NULL`. +#' * If `cluster_or_cores` is a number greater than `1`, +#' a cluster with `cluster_or_cores` cores is returned. +#' * If `cluster_or_cores` is a cluster created via `parallel::makeCluster()`, +#' then this function returns it after inserting the relevant `rbmi` objects +#' into the existing cluster. #' #' @examples #' \dontrun{ @@ -89,7 +99,14 @@ find_missing_chg_after_avisit <- function(df) { #' closeAllConnections() #' } #' @export -make_rbmi_cluster <- function(cluster_or_cores = 1, objects = NULL, packages = NULL) { +make_rbmi_cluster <- function( + cluster_or_cores = 1, + objects = NULL, + packages = NULL +) { + # nocov start + assert_rbmi() + if (is.numeric(cluster_or_cores) && cluster_or_cores == 1) { return(NULL) } else if (is.numeric(cluster_or_cores)) { @@ -97,7 +114,10 @@ make_rbmi_cluster <- function(cluster_or_cores = 1, objects = NULL, packages = N } else if (methods::is(cluster_or_cores, "cluster")) { cl <- cluster_or_cores } else { - stop(sprintf("`cluster_or_cores` has unsupported class of: %s", paste(class(cluster_or_cores), collapse = ", "))) + stop(sprintf( + "`cluster_or_cores` has unsupported class of: %s", + paste(class(cluster_or_cores), collapse = ", ") + )) } # Load user defined objects into the globalname space @@ -107,7 +127,7 @@ make_rbmi_cluster <- function(cluster_or_cores = 1, objects = NULL, packages = N } # Load user defined packages - packages <- c(packages, "assertthat") + packages <- c(packages, "assertthat", "junco") # Remove attempts to load `rbmi` as this will be covered later packages <- setdiff(packages, "rbmi") devnull <- parallel::clusterCall( @@ -120,7 +140,10 @@ make_rbmi_cluster <- function(cluster_or_cores = 1, objects = NULL, packages = N parallel::clusterSetRNGStream(cl, sample.int(1)) # If user has previously configured `rbmi` sub-processes then early exit - exported_rbmi <- unlist(parallel::clusterEvalQ(cl, exists("..exported..parallel..rbmi"))) + exported_rbmi <- unlist(parallel::clusterEvalQ( + cl, + exists("..exported..parallel..rbmi") + )) if (all(exported_rbmi)) { return(cl) } @@ -144,16 +167,18 @@ make_rbmi_cluster <- function(cluster_or_cores = 1, objects = NULL, packages = N }) return(cl) -} +} # nocov end #' Parallelise Lapply #' +#' @description #' Simple wrapper around `lapply` and [`parallel::clusterApplyLB`] to abstract away -#' the logic of deciding which one to use -#' @param cl Cluster created by [`parallel::makeCluster()`] or `NULL` -#' @param fun Function to be run -#' @param x object to be looped over -#' @param ... extra arguments passed to `fun` +#' the logic of deciding which one to use. +#' +#' @param cl (`cluster object`)\cr Cluster created by [`parallel::makeCluster()`] or `NULL` +#' @param fun (`functions`)\cr Function to be run +#' @param x (`object`)\cr Object to be looped over +#' @param ... Extra arguments passed to `fun` #' @return `list` of results of calling `fun` on elements of `x`. par_lapply <- function(cl, fun, x, ...) { result <- if (is.null(cl)) { @@ -168,7 +193,7 @@ par_lapply <- function(cl, fun, x, ...) { #' #' @description #' This function takes multiple imputed datasets (as generated by -#' the [rbmi::impute()] function) and runs an analysis function on +#' the impute() function from the rbmi package) and runs an analysis function on #' each of them. #' #' @importFrom assertthat assert_that @@ -189,7 +214,7 @@ par_lapply <- function(cl, fun, x, ...) { #' `fun` must return a named list with each element itself being a #' list containing a single #' numeric element called `est` (or additionally `se` and `df` if -#' you had originally specified [rbmi::method_bayes()] or [rbmi::method_approxbayes()]) +#' you had originally specified the method_bayes() or method_approxbayes() functions from the rbmi package) #' i.e.: #' \preformatted{ #' myfun <- function(dat, ...) { @@ -212,17 +237,17 @@ par_lapply <- function(cl, fun, x, ...) { #' } #' #' Please note that the `vars$subjid` column (as defined in the original call to -#' [rbmi::draws()]) will be scrambled in the data.frames that are provided to `fun`. +#' the draws() function from the rbmi package) will be scrambled in the data.frames that are provided to `fun`. #' This is to say they will not contain the original subject values and as such #' any hard coding of subject ids is strictly to be avoided. #' #' By default `fun` is the [rbmi_ancova()] function. #' Please note that this function -#' requires that a `vars` object, as created by [rbmi::set_vars()], is provided via -#' the `vars` argument e.g. `rbmi_analyse(imputeObj, vars = rbmi::set_vars(...))`. Please +#' requires that a `vars` object, as created by the set_vars() function from the rbmi package, is provided via +#' the `vars` argument e.g. `rbmi_analyse(imputeObj, vars = set_vars(...))`. Please #' see the documentation for [rbmi_ancova()] for full details. #' Please also note that the theoretical justification for the conditional mean imputation -#' method (`method = method_condmean()` in [rbmi::draws()]) relies on the fact that ANCOVA is +#' method (`method = method_condmean()` in the draws() function from the rbmi package) relies on the fact that ANCOVA is #' a linear transformation of the outcomes. #' Thus care is required when applying alternative analysis functions in this setting. #' @@ -230,7 +255,7 @@ par_lapply <- function(cl, fun, x, ...) { #' to the outcome variable in the imputed datasets prior to the analysis. #' This is typically used for sensitivity or tipping point analyses. The #' delta dataset must contain columns `vars$subjid`, `vars$visit` (as specified -#' in the original call to [rbmi::draws()]) and `delta`. Essentially this `data.frame` +#' in the original call to the draws() function from the rbmi package) and `delta`. Essentially this `data.frame` #' is merged onto the imputed dataset by `vars$subjid` and `vars$visit` and then #' the outcome variable is modified by: #' @@ -241,23 +266,25 @@ par_lapply <- function(cl, fun, x, ...) { #' Please note that in order to provide maximum flexibility, the `delta` argument #' can be used to modify any/all outcome values including those that were not #' imputed. Care must be taken when defining offsets. It is recommend that you -#' use the helper function [rbmi::delta_template()] to define the delta datasets as +#' use the helper function delta_template() from the rbmi package to define the delta datasets as #' this provides utility variables such as `is_missing` which can be used to identify #' exactly which visits have been imputed. #' -#' @seealso [rbmi::extract_imputed_dfs()] for manually extracting imputed +#' @seealso The extract_imputed_dfs() function from the rbmi package for manually extracting imputed #' datasets. -#' @seealso [rbmi::delta_template()] for creating delta data.frames. +#' @seealso The delta_template() function from the rbmi package for creating delta data.frames. #' @seealso [rbmi_ancova()] for the default analysis function. #' -#' @param imputations An `imputations` object as created by [rbmi::impute()]. +#' @param imputations An `imputations` object as created by the impute() function from the rbmi package. #' @param fun An analysis function to be applied to each imputed dataset. See details. #' @param delta A `data.frame` containing the delta transformation to be applied to the imputed #' datasets prior to running `fun`. See details. #' @param ... Additional arguments passed onto `fun`. -#' @param cluster_or_cores The number of parallel processes to use when running this function. Can also be a +#' @param cluster_or_cores (`numeric` or `cluster object`)\cr +#' The number of parallel processes to use when running this function. Can also be a #' cluster object created by [`make_rbmi_cluster()`]. See the parallelisation section below. -#' @param .validate Should `imputations` be checked to ensure it conforms to the required format +#' @param .validate (`logical`)\cr +#' Should `imputations` be checked to ensure it conforms to the required format #' (default = `TRUE`) ? Can gain a small performance increase if this is set to `FALSE` when #' analysing a large number of samples. #' @@ -285,12 +312,14 @@ par_lapply <- function(cl, fun, x, ...) { #' Note that there is significant overhead both with setting up the sub-processes and with #' transferring data back-and-forth between the main process and the sub-processes. As such #' parallelisation of the `rbmi_analyse()` function tends to only be worth it when you have -#' `> 2000` samples generated by [rbmi::draws()]. Conversely using parallelisation if your samples +#' `> 2000` samples generated by the draws() function from the rbmi package. +#' Conversely using parallelisation if your samples #' are smaller than this may lead to longer run times than just running it sequentially. #' -#' It is important to note that the implementation of parallel processing within [rbmi::analyse()`] has -#' been optimised around the assumption that the parallel processes will be spawned on the same -#' machine and not a remote cluster. One such optimisation is that the required data is saved to +#' It is important to note that the implementation of parallel processing within the analyse() +#' function from the rbmi package has been optimised around the assumption that the parallel +#' processes will be spawned on the same machine and not a remote cluster. +#' One such optimisation is that the required data is saved to #' a temporary file on the local disk from which it is then read into each sub-process. This is #' done to avoid the overhead of transferring the data over the network. Our assumption is that #' if you are at the stage where you need to be parallelising your analysis over a remote cluster @@ -322,71 +351,87 @@ par_lapply <- function(cl, fun, x, ...) { #' @return An `analysis` object, as defined by `rbmi`, representing the desired #' analysis applied to each of the imputed datasets in `imputations`. #' @examples -#' library(rbmi) -#' library(dplyr) -#' -#' dat <- antidepressant_data -#' dat$GENDER <- as.factor(dat$GENDER) -#' dat$POOLINV <- as.factor(dat$POOLINV) -#' set.seed(123) -#' pat_ids <- sample(levels(dat$PATIENT), nlevels(dat$PATIENT) / 4) -#' dat <- dat |> -#' filter(PATIENT %in% pat_ids) |> -#' droplevels() -#' dat <- expand_locf( -#' dat, -#' PATIENT = levels(dat$PATIENT), -#' VISIT = levels(dat$VISIT), -#' vars = c("BASVAL", "THERAPY"), -#' group = c("PATIENT"), -#' order = c("PATIENT", "VISIT") -#' ) -#' dat_ice <- dat %>% -#' arrange(PATIENT, VISIT) %>% -#' filter(is.na(CHANGE)) %>% -#' group_by(PATIENT) %>% -#' slice(1) %>% -#' ungroup() %>% -#' select(PATIENT, VISIT) %>% -#' mutate(strategy = "JR") -#' dat_ice <- dat_ice[-which(dat_ice$PATIENT == 3618), ] -#' vars <- set_vars( -#' outcome = "CHANGE", -#' visit = "VISIT", -#' subjid = "PATIENT", -#' group = "THERAPY", -#' covariates = c("THERAPY") -#' ) -#' drawObj <- draws( -#' data = dat, -#' data_ice = dat_ice, -#' vars = vars, -#' method = method_condmean(type = "jackknife", covariance = "csh"), -#' quiet = TRUE -#' ) -#' references <- c("DRUG" = "PLACEBO", "PLACEBO" = "PLACEBO") -#' imputeObj <- impute(drawObj, references) -#' -#' rbmi_analyse(imputations = imputeObj, vars = vars) +#' if (requireNamespace("rbmi", quietly = TRUE)) { +#' library(rbmi) +#' library(dplyr) +#' +#' dat <- antidepressant_data +#' dat$GENDER <- as.factor(dat$GENDER) +#' dat$POOLINV <- as.factor(dat$POOLINV) +#' set.seed(123) +#' pat_ids <- sample(levels(dat$PATIENT), nlevels(dat$PATIENT) / 4) +#' dat <- dat |> +#' filter(PATIENT %in% pat_ids) |> +#' droplevels() +#' dat <- expand_locf( +#' dat, +#' PATIENT = levels(dat$PATIENT), +#' VISIT = levels(dat$VISIT), +#' vars = c("BASVAL", "THERAPY"), +#' group = c("PATIENT"), +#' order = c("PATIENT", "VISIT") +#' ) +#' dat_ice <- dat |> +#' arrange(PATIENT, VISIT) |> +#' filter(is.na(CHANGE)) |> +#' group_by(PATIENT) |> +#' slice(1) |> +#' ungroup() |> +#' select(PATIENT, VISIT) |> +#' mutate(strategy = "JR") +#' dat_ice <- dat_ice[-which(dat_ice$PATIENT == 3618), ] +#' vars <- set_vars( +#' outcome = "CHANGE", +#' visit = "VISIT", +#' subjid = "PATIENT", +#' group = "THERAPY", +#' covariates = c("THERAPY") +#' ) +#' drawObj <- draws( +#' data = dat, +#' data_ice = dat_ice, +#' vars = vars, +#' method = method_condmean(type = "jackknife", covariance = "csh"), +#' quiet = TRUE +#' ) +#' references <- c("DRUG" = "PLACEBO", "PLACEBO" = "PLACEBO") +#' imputeObj <- impute(drawObj, references) +#' +#' rbmi_analyse(imputations = imputeObj, vars = vars) +#' } #' @export -rbmi_analyse <- function(imputations, fun = rbmi_ancova, delta = NULL, ..., cluster_or_cores = 1, .validate = TRUE) { - # nocov - - if (.validate) rbmi::validate(imputations) - +rbmi_analyse <- function( + imputations, + fun = rbmi_ancova, + delta = NULL, + ..., + cluster_or_cores = 1, + .validate = TRUE +) { + # nocov start + assert_rbmi() + if (.validate) { + rbmi::validate(imputations) + } assertthat::assert_that(is.function(fun), msg = "`fun` must be a function") - - assertthat::assert_that(is.null(delta) | is.data.frame(delta), msg = "`delta` must be NULL or a data.frame") - + assertthat::assert_that( + is.null(delta) | is.data.frame(delta), + msg = "`delta` must be NULL or a data.frame" + ) vars <- imputations$data$vars - if (.validate) devnull <- lapply(imputations$imputations, function(x) rbmi::validate(x)) + if (.validate) { + devnull <- lapply(imputations$imputations, function(x) rbmi::validate(x)) + } if (!is.null(delta)) { expected_vars <- c(vars$subjid, vars$visit, "delta") assertthat::assert_that( all(expected_vars %in% names(delta)), - msg = sprintf("The following variables must exist witin `delta`: `%s`", paste0(expected_vars, collapse = "`, `")) + msg = sprintf( + "The following variables must exist witin `delta`: `%s`", + paste0(expected_vars, collapse = "`, `") + ) ) } @@ -405,7 +450,11 @@ rbmi_analyse <- function(imputations, fun = rbmi_ancova, delta = NULL, ..., clus if (methods::is(cl, "cluster")) { ..rbmi..analysis..data..path <- tempfile() saveRDS(objects, file = ..rbmi..analysis..data..path, compress = FALSE) - devnull <- parallel::clusterExport(cl, "..rbmi..analysis..data..path", environment()) + devnull <- parallel::clusterExport( + cl, + "..rbmi..analysis..data..path", + environment() + ) devnull <- parallel::clusterEvalQ(cl, { ..rbmi..analysis..objects <- readRDS(..rbmi..analysis..data..path) list2env(..rbmi..analysis..objects, envir = environment()) @@ -466,4 +515,5 @@ rbmi_analyse <- function(imputations, fun = rbmi_ancova, delta = NULL, ..., clus ) rbmi::validate(ret) return(ret) + # nocov end } diff --git a/R/relative_risk.R b/R/relative_risk.R index 6772665a..eab5f0e5 100644 --- a/R/relative_risk.R +++ b/R/relative_risk.R @@ -194,7 +194,7 @@ safe_mh_test <- function(...) { #' @inheritParams proposal_argument_convention #' @param strata (`factor`)\cr variable with one level per stratum and same length as `rsp`. #' -#' @return a list with elements `rel_risk_ci` and `pval`. +#' @return A list with elements `rel_risk_ci` and `pval`. #' @examples #' #' set.seed(2) diff --git a/R/remove_col_count.R b/R/remove_col_count.R index ab41c21d..51b83864 100644 --- a/R/remove_col_count.R +++ b/R/remove_col_count.R @@ -3,14 +3,16 @@ #' @title Removal of Unwanted Column Counts #' #' @description -#' Remove the N=xx column headers for specified span_label_var columns - default is 'rrisk_header -#' @details This works for only the lowest level of column splitting (since colcounts is used) -#' @param obj table tree object -#' @param span_label_var the spanning header text variable value for which column headers will be removed from +#' Remove the N=xx column headers for specified span_label_var columns - default is 'rrisk_header'. #' -#' @return table tree object with column counts in specified columns removed -#' @export +#' @details This works for only the lowest level of column splitting (since colcounts is used). +#' +#' @param obj (`TableTree`)\cr TableTree object. +#' @param span_label_var (`character`)\cr +#' The spanning header text variable value for which column headers will be removed from. #' +#' @return TableTree object with column counts in specified columns removed. +#' @export remove_col_count <- function(obj, span_label_var = "rrisk_header") { ## programatically figure out which ones we want unwanted_count <- function(pth) pth[1] == span_label_var diff --git a/R/resp01_functions.R b/R/resp01_functions.R index f9aa6511..98acef51 100644 --- a/R/resp01_functions.R +++ b/R/resp01_functions.R @@ -110,7 +110,7 @@ resp01_counts_cfun <- function(df, labelstr, .spl_context, .alt_df, label_fstr) #' arm = "SEX", #' strata = "RACE", #' stat = "comp_stat_ci", -#' method = list(comp_stat_ci = "or_cmh"), +#' methods = list(comp_stat_ci = "or_cmh"), #' formats = list( #' comp_stat_ci = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), #' pval = jjcsformat_pval_fct(0.05) @@ -222,7 +222,7 @@ resp01_a_comp_stat_logical <- function(df, #' arm = "SEX", #' strata = "RACE", #' stat = "comp_stat_ci", -#' method = list(comp_stat_ci = "or_cmh"), +#' methods = list(comp_stat_ci = "or_cmh"), #' formats = list( #' comp_stat_ci = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), #' pval = jjcsformat_pval_fct(0.05) diff --git a/R/sorting_functions.R b/R/sorting_functions.R index 1798838c..3e9eb6d3 100644 --- a/R/sorting_functions.R +++ b/R/sorting_functions.R @@ -4,24 +4,33 @@ #' A function used for sorting AE tables (and others) as required. #' @details #' This sort function sorts as follows: -#' Takes all the columns from a specified spanning column header (default= colspan_trt) and sorts by the last treatment +#' * Takes all the columns from a specified spanning column header (default= colspan_trt) +#' and sorts by the last treatment #' column within this. -#' If no spanning column header variable exists (e.g you have only one active treatment arm and have decided to -#' remove the spanning header from your layout) it will sort by the first treatment column in your table. -#' This function is not really designed for tables that have sub-columns, however if users wish to override any -#' default sorting behavior, they can simply specify their own colpath to use for sorting on (default=NULL) -#' @param spanningheadercolvar name of spanning header variable that defines the active treatment columns. +#' * If no spanning column header variable exists (e.g you have only one active treatment arm and have decided to +#' remove the spanning header from your layout), it will sort by the first treatment column in your table. +#' +#' This function is not really designed for tables that have sub-columns. However, if users wish to override any +#' default sorting behavior, they can simply specify their own colpath to use for sorting on (default = NULL) +#' +#' @param spanningheadercolvar (`character`)\cr +#' Name of spanning header variable that defines the active treatment columns. #' If you do not have an active treatment spanning header column then user can define this as NA. -#' @param usefirstcol This allows you to just use the first column of the table to sort on. -#' @param colpath name of column path that is needed to sort by (default=NULL). +#' @param usefirstcol (`logical`)\cr +#' This allows you to just use the first column of the table to sort on. +#' @param colpath (`character`)\cr +#' Name of column path that is needed to sort by (default=NULL). #' This overrides other arguments if specified -#' (except firstcat and lastcat which will be applied if requested on this colpath) -#' @param firstcat If you wish to put any category at the top of the list despite any n's user can specify here. -#' @param lastcat If you wish to put any category at the bottom of the list despite any n's user can specify here. +#' (except firstcat and lastcat which will be applied if requested on this colpath). +#' @param firstcat (`logical`)\cr +#' If you wish to put any category at the top of the list despite any n's, user can specify it here. +#' @param lastcat (`logical`)\cr +#' If you wish to put any category at the bottom of the list despite any n's, user can specify it here. #' @export -#' @returns a function which can be used as a score function (scorefun in `sort_at_path`). +#' @returns A function which can be used as a score function (scorefun in `sort_at_path`). # @examples #result <- sort_at_path(result, c('root', 'AEBODSYS'), scorefun = jj_complex_scorefun()) #' @examples +#' library(dplyr) #' ADAE <- data.frame( #' USUBJID = c( #' "XXXXX01", "XXXXX02", "XXXXX03", "XXXXX04", "XXXXX05", @@ -63,6 +72,8 @@ #' #' ref_path <- c("colspan_trt", " ", "TRT01A", "Placebo") #' +#' ADSL <- unique(ADAE |> select(USUBJID, "colspan_trt", "rrisk_header", "rrisk_label", "TRT01A")) +#' #' lyt <- basic_table() |> #' split_cols_by( #' "colspan_trt", @@ -112,7 +123,7 @@ #' ) #' ) #' -#' result <- build_table(lyt, ADAE) +#' result <- build_table(lyt, ADAE, alt_counts_df = ADSL) #' #' result #' @@ -132,11 +143,12 @@ #' @rdname complex_scoring_function #' @aliases jj_complex_scorefun jj_complex_scorefun <- function( - spanningheadercolvar = "colspan_trt", - usefirstcol = FALSE, - colpath = NULL, - firstcat = NULL, - lastcat = NULL) { + spanningheadercolvar = "colspan_trt", + usefirstcol = FALSE, + colpath = NULL, + firstcat = NULL, + lastcat = NULL +) { paths <- NULL function(tt) { diff --git a/R/span_var_map.R b/R/span_var_map.R index 6683218f..45299ebf 100644 --- a/R/span_var_map.R +++ b/R/span_var_map.R @@ -1,25 +1,27 @@ #' @name create_colspan_var #' @title Creation of Column Spanning Variables #' @description -#' A function used for creating a spanning variable for treatment groups +#' A function used for creating a spanning variable for treatment groups. #' @details #' This function creates a spanning variable for treatment groups that is intended to #' be used within the column space. -#' @param df The name of the data frame in which the spanning variable is to be appended to -#' @param non_active_grp The value(s) of the treatments that represent the non-active or comparator +#' @param df (`data.frame`)\cr The name of the data frame in which the spanning variable is to be appended to +#' @param non_active_grp (`character`)\cr The value(s) of the treatments that represent the non-active or comparator #' treatment groups #' default value = c('Placebo') -#' @param non_active_grp_span_lbl The assigned value of the spanning variable for the non-active or comparator +#' @param non_active_grp_span_lbl (`character`)\cr The assigned value of the spanning +#' variable for the non-active or comparator #' treatment groups #' default value = '' -#' @param active_grp_span_lbl The assigned value of the spanning variable for the active treatment group(s) +#' @param active_grp_span_lbl (`character`)\cr The assigned value of the spanning +#' variable for the active treatment group(s) #' default value = 'Active Study Agent' -#' @param colspan_var The desired name of the newly created spanning variable +#' @param colspan_var (`character`)\cr The desired name of the newly created spanning variable #' default value = 'colspan_trt' -#' @param trt_var The name of the treatment variable that is used to determine which +#' @param trt_var (`character`)\cr The name of the treatment variable that is used to determine which #' spanning treatment group value to apply. #' default value = 'TRT01A' -#' @returns a data frame that contains the new variable as specified in colspan_var +#' @returns A data frame that contains the new variable as specified in colspan_var. #' @rdname colspan_var #' @export #' @aliases create_colspan_var @@ -65,7 +67,7 @@ create_colspan_var <- function( #' @name create_colspan_map #' @title Creation of Column Spanning Mapping Dataframe #' @description -#' A function used for creating a data frame containing the map that is compatible with rtables split function +#' A function used for creating a data frame containing the map that is compatible with rtables split function. #' `trim_levels_to_map` #' @details #' This function creates a data frame containing the map that is compatible with rtables split function @@ -73,8 +75,8 @@ create_colspan_var <- function( #' The levels of the specified trt_var variable will be stored within the trt_var variable #' and the colspan_var variable will contain the corresponding spanning header value for each treatment group. #' @inheritParams create_colspan_var -#' @param active_first whether the active columns come first. -#' @returns a data frame that contains the map to be used with rtables split function `trim_levels_to_map` +#' @param active_first (`logical`)\cr whether the active columns come first. +#' @returns A data frame that contains the map to be used with rtables split function `trim_levels_to_map`. #' @rdname colspan_map #' @export #' @examples diff --git a/R/split_functions.R b/R/split_functions.R index b9fc319f..394c11e3 100644 --- a/R/split_functions.R +++ b/R/split_functions.R @@ -2,7 +2,6 @@ #' @param nm character. names of facets to keep. all other facets will be #' removed #' @returns a function suitable for use within the `post` portion make_split_fun - rm_other_facets_fact <- function(nm) { function(ret, spl, .spl_context, fulldf) { keep <- which(names(ret$values) %in% nm) @@ -17,17 +16,18 @@ rm_other_facets_fact <- function(nm) { #' @title Add Overall Facet #' #' @description -#' A function to help add an overall facet to your tables -#' @param name character(1). Name/virtual 'value' for the new facet -#' @param label character(1). label for the new facet -#' @note current add_overall_facet is bugged, can use that directly after it's fixed +#' A function to help add an overall facet to your tables. +#' +#' @param name (`character`)\cr Name/virtual 'value' for the new facet. +#' @param label (`character`)\cr Label for the new facet. +#' +#' @note Current add_overall_facet is bugged. Can be used directly after it's fixed #' https://github.com/insightsengineering/rtables/issues/768 #' @examples +#' splfun <- make_split_fun(post = list(real_add_overall_facet("Total", "Total"))) #' -#' splfun <- make_split_fun(post = list(real_add_overall_facet('Total', 'Total'))) #' @export -#' @returns function usable directly as a split function. -#' +#' @returns Function usable directly as a split function. real_add_overall_facet <- function(name, label) { function(ret, spl, .spl_context, fulldf) { add_to_split_result( @@ -45,18 +45,17 @@ real_add_overall_facet <- function(name, label) { #' @title Split Function Helper #' #' @description -#' A function which aids the construction for users to create their own split function for combined columns -#' @param nm character(1). Name/virtual 'value' for the new facet -#' @param label character(1). label for the new facet -#' @param levels character or NULL. The levels to combine into the new facet, +#' A function which aids the construction for users to create their own split function for combined columns. +#' @param nm (`character`)\cr Name/virtual 'value' for the new facet. +#' @param label (`character`)\cr Label for the new facet. +#' @param levels (`character` or NULL)\cr The levels to combine into the new facet, #' or NULL, indicating the facet should include all incoming data. -#' @param rm_other_facets logical(1). Should facets other than the newly -#' created one be removed. Defaults to `TRUE` +#' @param rm_other_facets (`logical`)\cr Should facets other than the newly +#' created one be removed. Defaults to `TRUE`. #' @export -#' @returns function usable directly as a split function. +#' @returns Function usable directly as a split function. #' @examples -#' aesevall_spf <- make_combo_splitfun(nm = 'AESEV_ALL', label = 'Any AE', levels = NULL) -#' +#' aesevall_spf <- make_combo_splitfun(nm = "AESEV_ALL", label = "Any AE", levels = NULL) make_combo_splitfun <- function(nm, label = nm, levels = NULL, rm_other_facets = TRUE) { if (is.null(levels)) { fn <- real_add_overall_facet(name = nm, label = label) @@ -95,7 +94,6 @@ rm_blank_levels <- function(df, spl, ...) { df } - find_torm <- function(spl_ret, torm, torm_regex, keep_matches) { if (!is.null(torm)) { ans_lgl <- names(spl_ret$datasplit) %in% torm @@ -143,32 +141,33 @@ resolve_ancestor_pos <- function(anc_pos, numrows) { #' @name cond_rm_facets #' @title Conditional Removal of Facets -#' @param facets character or NULL. Vector of facet names to be removed +#' +#' @param facets (`character` or NULL)\cr Vector of facet names to be removed #' if condition(s) are met -#' @param facets_regex character(1). Regular expression to identify facet +#' @param facets_regex (`character`)\cr Regular expression to identify facet #' names to be removed if condition(s) are met. -#' @param ancestor_pos numeric(1). Row in spl_context to check the condition +#' @param ancestor_pos (`numeric`)\cr Row in spl_context to check the condition #' within. E.g., 1 represents the first split, 2 represents the second split #' nested within the first, etc. NA specifies that the conditions #' should be checked at all split levels. Negative integers indicate position #' counting back from the current one, e.g., -1 indicates the direct parent #' (most recent split before this one). Negative and positive/NA positions #' cannot be mixed. -#' @param split character(1) or NULL. If specified, name of the split +#' @param split (`character` or NULL)\cr If specified, name of the split #' at position `ancestor_pos` must be identical to this value for #' the removal condition to be met. -#' @param split_regex character(1) or NULL. If specified, a regular expression +#' @param split_regex (`character` or NULL)\cr If specified, a regular expression #' the name of the split at position `ancestor_pos` must match for #' the removal condition to be met. Cannot be specified at the same time #' as `split`. -#' @param value character(1) or NULL. If specified, split (facet) value +#' @param value (`character` or NULL)\cr If specified, split (facet) value #' at position `ancestor_pos` must be identical to this value for #' removal condition to be met. -#' @param value_regex character(1) or NULL. If specified, a regular expression +#' @param value_regex (`character` or NULL)\cr If specified, a regular expression #' the value of the split at position `ancestor_pos` must match for #' the removal condition to be met. Cannot be specified at the same time #' as `value`. -#' @param keep_matches logical(1). Given the specified condition is met, +#' @param keep_matches (`logical`)\cr Given the specified condition is met, #' should the facets removed be those matching `facets`/`facets_regex` #' (`FALSE`, the default), or those *not* matching (`TRUE`). #' @@ -185,7 +184,7 @@ resolve_ancestor_pos <- function(anc_pos, numrows) { #' @note A degenerate table is likely to be returned if all facets #' are removed. #' -#' @returns a function suitable for use in `make_split_fun`'s +#' @returns A function suitable for use in `make_split_fun`'s #' `post` argument which encodes the specified condition. #' @export #' @examples @@ -234,14 +233,15 @@ resolve_ancestor_pos <- function(anc_pos, numrows) { #' #' stopifnot(identical(cell_values(tbl2), cell_values(tbl3))) cond_rm_facets <- function( - facets = NULL, - facets_regex = NULL, - ancestor_pos = 1, - split = NULL, - split_regex = NULL, - value = NULL, - value_regex = NULL, - keep_matches = FALSE) { + facets = NULL, + facets_regex = NULL, + ancestor_pos = 1, + split = NULL, + split_regex = NULL, + value = NULL, + value_regex = NULL, + keep_matches = FALSE +) { ## detect errors/miscalling which don't even require us to have the facets if (is.null(split) && is.null(split_regex) && is.null(value) && is.null(value_regex)) { stop( @@ -260,38 +260,41 @@ cond_rm_facets <- function( ancestor_pos <- resolve_ancestor_pos(ancestor_pos, NROW(.spl_context)) torm_ind <- find_torm(ret, facets, facets_regex, keep_matches = keep_matches) fct_abbrev <- ifelse(is.null(facets_regex), paste(facets, collapse = ", "), facets_regex) - if (length(torm_ind) == 0) { - # nocov start - warning( - "No facets matched removal criteria [", - fct_abbrev, - "] ", + split_match <- .check_rem_cond( + split, split_regex, .spl_context, ancestor_pos, type = "split" + ) + value_match <- .check_rem_cond( + value, value_regex, .spl_context, ancestor_pos, type = "value" + ) + if (split_match && value_match) { + no_rm_msg <- paste0( + "No facets matched removal criteria [", fct_abbrev, "] ", "in function created with cond_rm_facets.\n", "Occured at path: ", - spl_context_to_disp_path(.spl_context), - call. = FALSE + rtables::spl_context_to_disp_path(.spl_context) ) - # nocov end - } else if (length(torm_ind) == length(ret$datasplit)) { - # nocov start - warning( + + all_rm_msg <- paste0( "All facets matched removal criteria [", - fct_abbrev, - "] in function created with cond_rm_facets. ", + fct_abbrev, "] in function created with cond_rm_facets. ", "This will result in a degenerate table (if the condition ", "is met) within row splitting and in table-creation failing ", "entirely in column splitting.\n", "Occured at path: ", - spl_context_to_disp_path(.spl_context), - call. = FALSE + rtables::spl_context_to_disp_path(.spl_context) ) - # nocov end - } - if ( - .check_rem_cond(split, split_regex, .spl_context, ancestor_pos, type = "split") && - .check_rem_cond(value, value_regex, .spl_context, ancestor_pos, type = "value") - ) { - ## find_torm handles the keep matching case, so by this point torm_ind is always the ones to remove + no_rm_case <- (length(torm_ind) == 0 && !keep_matches) || + (length(torm_ind) == length(ret$datasplit) && keep_matches) + all_rm_case <- (length(torm_ind) == 0 && keep_matches) || + (length(torm_ind) == length(ret$datasplit) && !keep_matches) + + if (no_rm_case) { + warning(no_rm_msg, call. = FALSE) + } else if (all_rm_case) { + warning(all_rm_msg, call. = FALSE) + } + ## find_torm handles the keep matching case, so + ## by this point torm_ind is always the ones to remove ret <- lapply(ret, function(part) part[-torm_ind]) } @@ -305,14 +308,13 @@ cond_rm_facets <- function( #' @title Removal of Levels #' #' @description -#' custom function for removing level inside pre step in make_split_fun. +#' Custom function for removing level inside pre step in make_split_fun. #' -#' @param excl Choose which level(s) to remove -#' @return a function implementing pre-processing split behavior (for use in +#' @param excl (`character`)\cr Choose which level(s) to remove +#' @return A function implementing pre-processing split behavior (for use in #' `make_split_fun(pre = )` which removes the levels in `excl` from the data #' before facets are generated. #' @export -#' rm_levels <- function(excl) { function(df, spl, ...) { var <- spl_variable(spl) @@ -328,13 +330,13 @@ rm_levels <- function(excl) { #' Shortcut for Creating Custom Column Splits #' -#' This is a short cut for a common use of [rtables::make_split_result()] where you need to create +#' This is a shortcut for a common use of [rtables::make_split_result()] where you need to create #' custom column splits with different labels but using the same full dataset for each column. #' It automatically sets up the values, datasplit (using the same full dataset for each column), #' and subset_exprs (using TRUE for all subsets) parameters for make_split_result(). #' #' @param ... sequence of named labels for the columns. -#' @param fulldf (`data.frame`)\cr the `fulldf` which will be used for each column. +#' @param fulldf (`data.frame`)\cr The `fulldf` which will be used for each column. #' @return The result from [rtables::make_split_result()]. #' #' @keywords internal @@ -345,3 +347,42 @@ short_split_result <- function(..., fulldf) { subset_exprs <- replicate(n = length(labels), list(expression(TRUE))) make_split_result(values = values, labels = labels, datasplit = datasplit, subset_exprs = subset_exprs) } + +#' Predicate to Check if Split Should be Excluded +#' +#' @inheritParams proposal_argument_convention +#' @returns `TRUE` if the current split context matches any of the exclude levels, +#' `FALSE` otherwise. +#' +#' @export +#' @examples +#' +#' do_exclude_split( +#' exclude_levels = list(AVISIT = "Baseline"), +#' .spl_context = data.frame( +#' split = c("AVISIT", "ARM"), +#' value = c("Week 4", "Placebo") +#' ) +#' ) +#' do_exclude_split( +#' exclude_levels = list(AVISIT = "Baseline"), +#' .spl_context = data.frame( +#' split = c("AVISIT", "ARM"), +#' value = c("Baseline", "Placebo") +#' ) +#' ) +do_exclude_split <- function(exclude_levels, .spl_context) { + checkmate::assert_list(exclude_levels, names = "unique") + checkmate::assert_data_frame(.spl_context) + + split_vals <- .spl_context[, c("split", "value")] + split_vals_list <- as.list(split_vals$value) |> + stats::setNames(split_vals$split) + found_splits <- intersect(names(split_vals_list), names(exclude_levels)) + for (split_var in found_splits) { + if (any(split_vals_list[[split_var]] %in% exclude_levels[[split_var]])) { + return(TRUE) + } + } + FALSE +} diff --git a/R/summarize_ancova.R b/R/summarize_ancova.R index 0e3d6517..bd03a74f 100644 --- a/R/summarize_ancova.R +++ b/R/summarize_ancova.R @@ -45,16 +45,15 @@ h_ancova <- function( #' @title Junco Extended ANCOVA Function #' @name s_ancova_j #' @inheritParams tern::s_ancova -#' @param df : need to check on how to inherit params from tern::s_ancova #' @param weights_emmeans (`string`)\cr argument from [emmeans::emmeans()], `"counterfactual"` by default. -#' @description Extension to tern:::s_ancova, 3 extra statistics are returned +#' @description Extension to tern:::s_ancova, 3 extra statistics are returned: #' * `lsmean_se`: Marginal mean and estimated SE in the group. #' * `lsmean_ci`: Marginal mean and associated confidence interval in the group. #' * `lsmean_diffci`: Difference in mean and associated confidence level in one combined statistic. #' In addition, the LS mean weights can be specified. #' In addition, also a NULL .ref_group can be specified, the lsmean_diff related estimates will be returned as NA. #' @export -#' @return returns a named list of 8 statistics (3 extra compared to `tern:::s_ancova()`). +#' @return Returns a named list of 8 statistics (3 extra compared to `tern:::s_ancova()`). #' @family Inclusion of ANCOVA Functions #' @examples #' library(dplyr) @@ -292,13 +291,13 @@ s_ancova_j <- function( #' @name s_summarize_ancova_j #' @title ANCOVA Summary Function -#' @description Combination of tern::s_summary, and ANCOVA based estimates for mean and diff between columns, -#' based on ANCOVA function `s_ancova_j` +#' @description Combination of [tern::s_summary], and ANCOVA based estimates for mean and diff between columns, +#' based on ANCOVA function `s_ancova_j`. #' @inherit s_ancova_j #' @param ... Additional arguments passed to `s_ancova_j`. -#' @details Combination of tern::s_summary, and ANCOVA based estimates for mean and diff between columns, +#' @details Combination of [tern::s_summary], and ANCOVA based estimates for mean and diff between columns, #' based on ANCOVA function `s_ancova_j` -#' @return returns the statistics from tern::s_summary(x), appended with a new statistics based upon ANCOVA +#' @return returns the statistics from `tern::s_summary(x)`, appended with a new statistics based upon ANCOVA #' @export #' @family Inclusion of ANCOVA Functions # @seealso s_ancova_j diff --git a/R/summarize_row_counts.R b/R/summarize_row_counts.R index 007a024c..079c9cb0 100644 --- a/R/summarize_row_counts.R +++ b/R/summarize_row_counts.R @@ -29,8 +29,8 @@ c_row_counts_alt <- function(df, labelstr, label_fstr, .alt_df) { #' `alt_counts_df` (`TRUE`) or from `df` (`FALSE`). #' #' @return A modified layout where the latest row split now has a row group -#' summaries (as created by [rtables::summarize_row_groups] for the counts. -#' for the counts. +#' summaries (as created by [rtables::summarize_row_groups] for the counts). +#' #' @export #' @examples #' basic_table() |> diff --git a/R/tabulate_lsmeans.R b/R/tabulate_lsmeans.R index feb9b88f..0accc3ff 100644 --- a/R/tabulate_lsmeans.R +++ b/R/tabulate_lsmeans.R @@ -14,9 +14,11 @@ #' * P-value sidedness can be chosen #' #' @name tabulate_lsmeans -#' @return for `s_lsmeans`, a list containing the same statistics returned by [tern.mmrm::s_mmrm_lsmeans], -#' with the additional `diff_mean_est_ci` three-dimensional statistic. For `a_lsmeans`, -#' a `VertalRowsSection` as returned by [rtables::in_rows]. +#' @return +#' * For `s_lsmeans`, a list containing the same statistics returned by tern.mmrm::s_mmrm_lsmeans, +#' with the additional `diff_mean_est_ci` three-dimensional statistic. +#' * For `a_lsmeans`, a `VertalRowsSection` as returned by [rtables::in_rows]. +#' #' @examples #' result <- fit_mmrm_j( #' vars = list( diff --git a/R/tabulate_lsmeans_wide.R b/R/tabulate_lsmeans_wide.R index 65529035..c455f996 100644 --- a/R/tabulate_lsmeans_wide.R +++ b/R/tabulate_lsmeans_wide.R @@ -1,6 +1,6 @@ #' Function Factory to Create Padded In Rows Content #' -#' @param length_out (`count` or `NULL`)\cr full length which should be padded +#' @param length_out (`numeric` or `NULL`)\cr full length which should be padded #' by `NA` which will be printed as empty strings. #' @param label (`string`)\cr row label to be used for the first row only. #' @@ -76,7 +76,13 @@ lsmeans_wide_second_split_fun_fct <- function(pval_sided, conf_level, include_pv post_fun <- function(ret, spl, fulldf, .spl_context) { colset <- .spl_context[nrow(.spl_context), "value"][[1]] if (colset %in% c("reference_group", "testing_group")) { - short_split_result(treatment = "Treatment", n = "N", lsmean = "LS Mean", fulldf = fulldf) + short_split_result( + treatment = "Treatment", + n = "N", + lsmean = "LS Mean", + se = "SE", + fulldf = fulldf + ) } else if (colset == "variance") { short_split_result(mse = "M. S. Error", df = "Error DF", fulldf = fulldf) } else { @@ -89,7 +95,12 @@ lsmeans_wide_second_split_fun_fct <- function(pval_sided, conf_level, include_pv fulldf = fulldf ) } else { - short_split_result(lsmean = "LS Mean", se = "SE", ci = f_conf_level(conf_level), fulldf = fulldf) + short_split_result( + lsmean = "LS Mean", + se = "SE", + ci = f_conf_level(conf_level), + fulldf = fulldf + ) } } } @@ -114,15 +125,16 @@ lsmeans_wide_second_split_fun_fct <- function(pval_sided, conf_level, include_pv #' #' @keywords internal lsmeans_wide_cfun <- function( - df, - labelstr, - .spl_context, - variables, - ref_level, - treatment_levels, - pval_sided = c("2", "1", "-1"), - conf_level, - formats) { + df, + labelstr, + .spl_context, + variables, + ref_level, + treatment_levels, + pval_sided = c("2", "1", "-1"), + conf_level, + formats +) { this_col_split <- .spl_context[nrow(.spl_context), "cur_col_split_val"][[1]] pad_in_rows <- pad_in_rows_fct(length_out = length(treatment_levels), label = labelstr) if (this_col_split[1] %in% c("reference_group", "testing_group")) { @@ -136,8 +148,10 @@ lsmeans_wide_cfun <- function( pad_in_rows(this_level, .formats = "xx") } else if (this_col_split[2] == "n") { pad_in_rows(df$n[has_this_level], .formats = "xx") - } else { + } else if (this_col_split[2] == "lsmean") { pad_in_rows(df$estimate_est[has_this_level], .formats = formats$lsmean) + } else { + pad_in_rows(df$se_est[has_this_level], .formats = formats$se) } } else if (this_col_split[1] == "variance") { has_trt <- df[[variables$arm]] %in% treatment_levels @@ -176,7 +190,7 @@ lsmeans_wide_cfun <- function( #' #' @inheritParams proposal_argument_convention #' @inheritParams lsmeans_wide_cfun -#' @param lyt empty layout, i.e. result of [rtables::basic_table()] +#' @param lyt (`layout`)\cr empty layout, i.e. result of [rtables::basic_table()] #' @param include_variance (`flag`)\cr whether to include the variance statistics #' (M.S. error and d.f.). #' @param include_pval (`flag`)\cr whether to include the p-value column. @@ -208,23 +222,24 @@ lsmeans_wide_cfun <- function( #' ) |> #' build_table(df = anl) summarize_lsmeans_wide <- function( - lyt, - variables, - ref_level, - treatment_levels, - conf_level, - pval_sided = "2", - include_variance = TRUE, - include_pval = TRUE, - formats = list( - lsmean = jjcsformat_xx("xx.x"), - mse = jjcsformat_xx("xx.x"), - df = jjcsformat_xx("xx."), - lsmean_diff = jjcsformat_xx("xx.x"), - se = jjcsformat_xx("xx.xx"), - ci = jjcsformat_xx("(xx.xx, xx.xx)"), - pval = jjcsformat_pval_fct(0) - )) { + lyt, + variables, + ref_level, + treatment_levels, + conf_level, + pval_sided = "2", + include_variance = TRUE, + include_pval = TRUE, + formats = list( + lsmean = jjcsformat_xx("xx.x"), + mse = jjcsformat_xx("xx.x"), + df = jjcsformat_xx("xx."), + lsmean_diff = jjcsformat_xx("xx.x"), + se = jjcsformat_xx("xx.xx"), + ci = jjcsformat_xx("(xx.xx, xx.xx)"), + pval = jjcsformat_pval_fct(0) + ) +) { # Check that all required format elements are present in the formats parameter checkmate::assert_names( names(formats), diff --git a/R/tabulate_rbmi.R b/R/tabulate_rbmi.R index 62d51372..6d2d9bf3 100644 --- a/R/tabulate_rbmi.R +++ b/R/tabulate_rbmi.R @@ -20,7 +20,8 @@ NULL #' This list includes analysis results, confidence level, hypothesis testing type. #' @param visit_name (`string`)\cr single visit level. #' @param group_names (`character`)\cr group levels. -#' @return The `data.frame` with results of pooled analysis for a single visit. +#' @return +#' * `h_tidy_pool()` returns a `data.frame` with results of pooled analysis for a single visit. #' #' @export h_tidy_pool <- function(x, visit_name, group_names) { @@ -141,7 +142,8 @@ tidy.pool <- function(x, visits, ...) { #' @param .in_ref_col (`flag`)\cr whether reference column is specified. #' @param show_relative (`string`)\cr 'reduction' if (`control - treatment`, default) #' or 'increase' (`treatment - control`) of relative change from baseline? -#' @return A list of statistics extracted from a tidied LS means data frame. +#' @return +#' * `s_rbmi_lsmeans()` returns a list of statistics extracted from a tidied LS means data frame. #' @export s_rbmi_lsmeans <- function(df, .in_ref_col, show_relative = c("reduction", "increase")) { checkmate::assert_flag(.in_ref_col) diff --git a/R/test_proportion_diff.R b/R/test_proportion_diff.R index 75e9e531..26b4fb54 100644 --- a/R/test_proportion_diff.R +++ b/R/test_proportion_diff.R @@ -10,98 +10,19 @@ #' alternative hypothesis. #' #' @inheritParams proposal_argument_convention -#' @param method (`string`)\cr one of `chisq`, `cmh`, `fisher`; specifies the test used -#' to calculate the p-value. +#' @param ... Additional arguments passed to [tern::s_test_proportion_diff()], including: +#' * `method` (`string`)\cr one of `chisq`, `cmh`, `cmh_wh`, `fisher` or `schouten`; +#' specifies the test used to calculate the p-value. #' @param .stats (`character`)\cr statistics to select for the table. #' -#' @seealso [h_prop_diff_test] +#' @note This function has been forked from the `tern` package. Additional features are: #' -#' @note These functions have been forked from the `tern` package. Additional features are: -#' -#' * Additional `alternative` argument for the sidedness of the test. #' * Additional `ref_path` argument for flexible reference column path specification. #' #' @name prop_diff_test #' @order 1 NULL -#' @describeIn prop_diff_test Statistics function which tests the difference between two proportions. -#' -#' @return -#' * `s_test_proportion_diff()` returns a named `list` with a single item `pval` with an attribute `label` -#' describing the method used. The p-value tests the null hypothesis that proportions in two groups are the same. -#' -#' @keywords internal -s_test_proportion_diff <- function( - df, - .var, - .ref_group, - .in_ref_col, - variables = list(strata = NULL), - method = c("chisq", "fisher", "cmh"), - alternative = c("two.sided", "less", "greater")) { - method <- match.arg(method) - alternative <- match.arg(alternative) - y <- list(pval = list()) - - if (!.in_ref_col) { - assert_df_with_variables(df, list(rsp = .var)) - assert_df_with_variables(.ref_group, list(rsp = .var)) - rsp <- factor(c(.ref_group[[.var]], df[[.var]]), levels = c("TRUE", "FALSE")) - grp <- factor(rep(c("ref", "Not-ref"), c(nrow(.ref_group), nrow(df))), levels = c("ref", "Not-ref")) - - if (!is.null(variables$strata) || method == "cmh") { - strata <- variables$strata - checkmate::assert_false(is.null(strata)) - strata_vars <- stats::setNames(as.list(strata), strata) - assert_df_with_variables(df, strata_vars) - assert_df_with_variables(.ref_group, strata_vars) - strata <- c(interaction(.ref_group[strata]), interaction(df[strata])) - } - - tbl <- switch(method, - cmh = table(grp, rsp, strata), - table(grp, rsp) - ) - - y$pval <- switch(method, - chisq = prop_chisq(tbl, alternative), - cmh = prop_cmh(tbl, alternative), - fisher = prop_fisher(tbl, alternative) - ) - } - - y$pval <- with_label(y$pval, d_test_proportion_diff_j(method, alternative)) - y -} - -#' Description of the difference test between two proportions -#' -#' @description `r lifecycle::badge('stable')` -#' -#' This is an auxiliary function that describes the analysis in `s_test_proportion_diff`. -#' -#' @inheritParams s_test_proportion_diff -#' -#' @return A `string` describing the test from which the p-value is derived. -#' -#' @export -d_test_proportion_diff_j <- function(method, alternative) { - checkmate::assert_string(method) - meth_part <- switch(method, - chisq = "Chi-Squared Test", - cmh = "Cochran-Mantel-Haenszel Test", - fisher = "Fisher's Exact Test", - stop(paste(method, "does not have a description")) - ) - alt_part <- switch(alternative, - two.sided = "", - less = ", 1-sided, direction less", - greater = ", 1-sided, direction greater" - ) - paste0("p-value (", meth_part, alt_part, ")") -} - #' @describeIn prop_diff_test Formatted analysis function which is used as `afun` #' #' @return @@ -130,17 +51,18 @@ d_test_proportion_diff_j <- function(method, alternative) { #' build_table(l, df = dta) #' #' @export -#' @order 2 +#' @order 1 a_test_proportion_diff <- function( - df, - .var, - ref_path, - .spl_context, - ..., - .stats = NULL, - .formats = NULL, - .labels = NULL, - .indent_mods = NULL) { + df, + .var, + ref_path, + .spl_context, + ..., + .stats = NULL, + .formats = NULL, + .labels = NULL, + .indent_mods = NULL +) { # Check for additional parameters to the statistics function dots_extra_args <- list(...) @@ -173,60 +95,3 @@ a_test_proportion_diff <- function( indents_in = .indent_mods ) } - -#' Helper functions to test proportion differences -#' -#' Helper functions to implement various tests on the difference between two proportions. -#' -#' @param tbl (`matrix`)\cr matrix with two groups in rows and the binary response (`TRUE`/`FALSE`) in columns. -#' -#' @return A p-value. -#' -#' @seealso [prop_diff_test()] for implementation of these helper functions. -#' -#' @name h_prop_diff_test -NULL - -#' @describeIn h_prop_diff_test Performs Chi-Squared test. Internally calls [stats::prop.test()]. -#' -#' @keywords internal -prop_chisq <- function(tbl, alternative) { - checkmate::assert_integer(c(ncol(tbl), nrow(tbl)), lower = 2, upper = 2) - tbl <- tbl[, c("TRUE", "FALSE")] - if (any(colSums(tbl) == 0)) { - return(1) - } - stats::prop.test(tbl, correct = FALSE, alternative = alternative)$p.value -} - -#' @describeIn h_prop_diff_test Performs stratified Cochran-Mantel-Haenszel test. -#' Internally calls [stats::mantelhaen.test()]. -#' -#' @note strata with less than five observations will result in a warning and -#' possibly incorrect results; strata with less than two observations are -#' automatically discarded. -#' -#' @param ary (`array`, 3 dimensions)\cr array with two groups in rows, the binary response -#' (`TRUE`/`FALSE`) in columns, and the strata in the third dimension. -#' -#' @keywords internal -prop_cmh <- function(ary, alternative) { - checkmate::assert_array(ary) - checkmate::assert_integer(c(ncol(ary), nrow(ary)), lower = 2, upper = 2) - checkmate::assert_integer(length(dim(ary)), lower = 3, upper = 3) - strata_sizes <- apply(ary, MARGIN = 3, sum) - if (any(strata_sizes < 5)) { - warning("<5 data points in some strata. CMH test may be incorrect.") - ary <- ary[, , strata_sizes > 1] - } - stats::mantelhaen.test(ary, correct = FALSE, alternative = alternative)$p.value -} - -#' @describeIn h_prop_diff_test Performs the Fisher's exact test. Internally calls [stats::fisher.test()]. -#' -#' @keywords internal -prop_fisher <- function(tbl, alternative) { - checkmate::assert_integer(c(ncol(tbl), nrow(tbl)), lower = 2, upper = 2) - tbl <- tbl[, c("TRUE", "FALSE")] - stats::fisher.test(tbl, alternative = alternative)$p.value -} diff --git a/R/title_footers.R b/R/title_footers.R index 73f0b625..f7049eef 100644 --- a/R/title_footers.R +++ b/R/title_footers.R @@ -51,16 +51,13 @@ #' titles.csv/titles.xlsx. Ignored if `file` or `title_df` is specified. #' @param title_df (`data.frame`)\cr A data.frame containing titles and footers for #' one or more outputs. See Details. -#' @param id character. The identifier for the table of interest. +#' @param id (`character(1)`)\cr The identifier for the table of interest. #' #' @export -#' @seealso Used in all template script #' @returns List object containing: title, subtitles, main_footer, prov_footer #' for the table of interest. Note: the subtitles and prov_footer are #' currently set to NULL. Suitable for use with [`set_titles()`]. -#' # ---- - get_titles_from_file <- function(id, file = .find_titles_file(input_path), input_path = ".", @@ -120,19 +117,16 @@ get_titles_from_file <- function(id, #' @title Set Output Titles #' #' @description Retrieves titles and footnotes from the list specified in the titles -#' argument and appends them to the table tree specified in the obj argument. +#' argument and appends them to the TableTree specified in the obj argument. #' #' -#' @param obj The table tree to which the titles and footnotes will be appended. -#' @param titles The list object containing the titles and footnotes to be appended. -#' @seealso Used in all template scripts +#' @param obj (`TableTree`)\cr The TableTree to which the titles and footnotes will be appended. +#' @param titles (`list`)\cr The list object containing the titles and footnotes to be appended. #' @export #' -#' @returns The table tree object specified in the obj argument, with titles +#' @returns The TableTree object specified in the obj argument, with titles #' and footnotes appended. -#' # ---- - set_titles <- function(obj, titles) { ## add title and footers main_title(obj) <- titles$title diff --git a/R/tt_to_tblfile.R b/R/tt_to_tblfile.R index 83dac6b2..42cfde6b 100644 --- a/R/tt_to_tblfile.R +++ b/R/tt_to_tblfile.R @@ -1,27 +1,49 @@ #' @title Create TableTree as DataFrame via gentlg #' -#' @param tt TableTree object to convert to a data frame -#' @param fontspec Font specification object -#' @param string_map Unicode mapping for special characters -#' @param markup_df Data frame containing markup information -#' @return `tt` represented as a "tbl" data.frame suitable for passing +#' @param tt (`TableTree`)\cr TableTree object to convert to a data frame +#' @param fontspec (`font_spec`)\cr Font specification object +#' @param string_map (`list`)\cr Unicode mapping for special characters +#' @param markup_df (`data.frame`)\cr Data frame containing markup information +#' @param round_type (`character(1)`)\cr the type of rounding to perform. +#' See [formatters::format_value()] for more details. +#' @param validate logical(1). Whether to validate the table structure using +#' `rtables::validate_table_struct()`. Defaults to `TRUE`. If `FALSE`, a message +#' will be displayed instead of stopping with an error when validation fails. +#' @return `tt` represented as a `tbl` data.frame suitable for passing #' to [tidytlg::gentlg] via the `huxme` argument. tt_to_tbldf <- function( - tt, - fontspec = font_spec("Times", 9L, 1), - string_map = default_str_map, - markup_df = dps_markup_df) { - if (!validate_table_struct(tt)) { - stop( - "invalid table structure. summarize_row_groups without ", - "analyze below it in layout structure?" - ) + tt, + fontspec = font_spec("Times", 9L, 1), + string_map = default_str_map, + markup_df = dps_markup_df, + round_type = obj_round_type(tt), + validate = TRUE +) { + if (validate) { + if (!validate_table_struct(tt)) { + stop( + "Invalid table structure detected. summarize_row_groups without ", + "analyze below it in layout structure?" + ) + } + } else { + if (!validate_table_struct(tt)) { + message( + "Invalid table structure detected. This may cause issues in the output. ", + "The validation process failed, proceed with caution." + ) + } else { + message( + "Table structure validation succeeded. You should not need to set validate=FALSE." + ) + } } mpf <- matrix_form( tt, indent_rownames = FALSE, expand_newlines = FALSE, - fontspec = fontspec + fontspec = fontspec, + round_type = round_type ) strmat <- mf_strings(mpf) @@ -77,9 +99,6 @@ tt_to_tbldf <- function( tbldf } -brackets_to_rtf <- function(strs) { - gsub("\\[\\[([^]]+)\\]\\]", "\\\\{\\1}", strs) -} gutter_width <- .12 # inches @@ -111,9 +130,10 @@ tlg_type <- function(tt) { } mpf_to_colspan <- function( - mpf, - string_map = default_str_map, - markup_df = dps_markup_df) { + mpf, + string_map = default_str_map, + markup_df = dps_markup_df +) { if (!methods::is(mpf, "MatrixPrintForm")) { stop("figure out how to make this an mpf (MatrixPrintForm) first.") } @@ -132,7 +152,7 @@ mpf_to_colspan <- function( csph <- lapply(seq_len(nspancols), function(ii) { spns <- mf_spans(mpf)[ii, ] vals <- strmat[ii, ] - jj <- 1 ## could start at 2 cause 1 is row label/topleft space but why complicate thigns + jj <- 1 ## could start at 2 cause 1 is row label/topleft space but why complicate things ind <- 1 myrle <- rle(vals) while (jj < length(vals)) { @@ -216,6 +236,33 @@ get_ncol <- function(tt) { } } +# apply format and round_type to columns of a listing_df object and return as a dataframe +# only for usage as input to gentlg +listingdf_dataframe_formats <- function(df, round_type = obj_round_type(df)) { + if (!is(df, "listing_df")) { + return(df) + } else { + cols <- listing_dispcols(df) + df[cols] <- lapply(names(df), function(col) { + fmt <- obj_format(df[[col]]) + if (!is.null(fmt)) { + na_str <- obj_na_str(df[[col]]) + lbl <- obj_label(df[[col]]) + + df[[col]] <- sapply(df[[col]], FUN = function(x) { + format_value(x, format = fmt, na_str = na_str, round_type = round_type) + }) + + obj_label(df[[col]]) <- lbl + } + df[[col]] + }) + } + + class(df) <- "data.frame" + df +} + #' @name tt_to_tlgrtf #' @title TableTree to .rtf Conversion #' @description @@ -223,39 +270,49 @@ get_ncol <- function(tt) { #' @details #' This function aids in converting the rtables TableTree into the desired .rtf file. #' -#' @param tt TableTree object to convert to RTF -#' @param file character(1). File to create, including path, but excluding +#' @param tt (`TableTree`)\cr TableTree object to convert to RTF +#' @param file (`character(1)`)\cr File to create, including path, but excluding #' .rtf extension. -#' @param orientation Orientation of the output ("portrait" or "landscape") -#' @param colwidths Column widths for the table -#' @param label_width_ins Label width in inches -#' @param fontspec Font specification object -#' @param pg_width Page width in inches -#' @param margins Margins in inches (top, right, bottom, left) -#' @param paginate Whether to paginate the output -#' @param col_gap Column gap in spaces -#' @param verbose Whether to print verbose output -#' @param tlgtype Type of the output (Table, Listing, or Figure) -#' @param string_map Unicode mapping for special characters -#' @param markup_df Data frame containing markup information +#' @param orientation (`character`)\cr Orientation of the output ("portrait" or "landscape") +#' @param colwidths (`numeric` vector)\cr Column widths for the table +#' @param label_width_ins (`numeric`)\cr Label width in inches +#' @param pagenum (`logical`)\cr Whether to add page numbers to the output. +#' Only applicable to listings (i.e. it is ignored for tables and figures). +#' @param fontspec (`font_spec`)\cr Font specification object +#' @param pg_width (`numeric`)\cr Page width in inches +#' @param margins (`numeric` vector)\cr Margins in inches (top, right, bottom, left) +#' @param paginate (`logical`)\cr Whether to paginate the output +#' @param col_gap (`numeric`)\cr Column gap in spaces +#' @param verbose (`logical`)\cr Whether to print verbose output +#' @param tlgtype (`character`)\cr Type of the output (Table, Listing, or Figure) +#' @param string_map (`data.frame`)\cr Unicode mapping for special characters +#' @param markup_df (`data.frame`)\cr Data frame containing markup information #' @param ... Additional arguments passed to gentlg #' @inheritParams tidytlg::gentlg -#' @param nosplitin list(row=, col=). Path elements whose children should not be paginated within +#' @param nosplitin (`list`)\cr list(row=, col=). Path elements whose children should not be paginated within #' if it can be avoided. e.g., list(col="TRT01A") means don't split within treatment arms unless #' all the associated columns don't fit on a single page. -#' @param combined_rtf logical(1). In the case where the result is broken up into multiple +#' @param combined_rtf (`logical(1)`)\cr In the case where the result is broken up into multiple #' parts due to width, should a combined rtf file also be created. Defaults to `FALSE`. -#' @param one_table logical(1). If `tt` is a (non-`MatrixPrintForm`) list, +#' @param one_table (`logical(1)`)\cr If `tt` is a (non-`MatrixPrintForm`) list, #' should the parts be added to the rtf within a single table (`TRUE`, the #' default) or as separate tables. End users will not generally need to set this. -#' @param border_mat matrix. A `m x k` matrix where m is the number of columns of `tt` +#' @param border_mat (`matrix`)\cr A `m x k` matrix where m is the number of columns of `tt` #' and k is the number of lines the header takes up. See [tidytlg::add_bottom_borders] #' for what the matrix should contain. Users should only specify this when the #' default behavior does not meet their needs. +#' @param alignments (`list`)\cr List of named lists. Vectorized. +#' (Default = `list()`) Used to specify individual column or cell alignments. +#' Each named list contains `row`, `col`, and `value`, which are passed to +#' [huxtable::set_align()] to set the alignments. +#' @param round_type (`character(1)`)\cr the type of rounding to perform. +#' See [formatters::format_value()] for more details. +#' @param validate logical(1). Whether to validate the table structure using +#' `rtables::validate_table_struct()`. Defaults to `TRUE`. If `FALSE`, a message +#' will be displayed when validation fails. #' @import rlistings #' @rdname tt_to_tlgrtf #' @export -#' @seealso Used in all table and listing scripts #' @note `file` should always include path. Path will be extracted #' and passed separately to `gentlg`. #' @note When `one_table` is `FALSE`, only the width of the row label @@ -268,36 +325,58 @@ get_ncol <- function(tt) { #' @return If `file` is non-NULL, this is called for the side-effect of writing #' one or more RTF files. Otherwise, returns a list of `huxtable` objects. tt_to_tlgrtf <- function( + tt, + file = NULL, + orientation = c("portrait", "landscape"), + colwidths = def_colwidths( tt, - file = NULL, - orientation = c("portrait", "landscape"), - colwidths = def_colwidths( - tt, - fontspec, - col_gap = col_gap, - label_width_ins = label_width_ins, - type = tlgtype - ), - label_width_ins = 2, - watermark = NULL, - pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE), - fontspec = font_spec("Times", 9L, 1.2), - pg_width = pg_width_by_orient(orientation == "landscape"), - margins = c(0, 0, 0, 0), - paginate = tlg_type(tt) == "Table", - col_gap = ifelse(tlgtype == "Listing", .5, 3), - nosplitin = list( - row = character(), - col = character() - ), - verbose = FALSE, - tlgtype = tlg_type(tt), - string_map = default_str_map, - markup_df = dps_markup_df, - combined_rtf = FALSE, - one_table = TRUE, - border_mat = make_header_bordmat(obj = tt), - ...) { + fontspec, + col_gap = col_gap, + label_width_ins = label_width_ins, + type = tlgtype + ), + label_width_ins = 2, + watermark = NULL, + pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE), + fontspec = font_spec("Times", 9L, 1.2), + pg_width = pg_width_by_orient(orientation == "landscape"), + margins = c(0, 0, 0, 0), + paginate = tlg_type(tt) == "Table", + col_gap = ifelse(tlgtype == "Listing", .5, 3), + nosplitin = list( + row = character(), + col = character() + ), + verbose = FALSE, + tlgtype = tlg_type(tt), + string_map = default_str_map, + markup_df = dps_markup_df, + combined_rtf = FALSE, + one_table = TRUE, + border_mat = make_header_bordmat(obj = tt), + round_type = obj_round_type(tt), + alignments = list(), + validate = TRUE, + ... +) { + if (validate && tlgtype == "Table" && methods::is(tt, "VTableTree")) { + if (!rtables::validate_table_struct(tt)) { + message( + "Invalid table structure detected. This may cause issues in the output. ", + "The validation process failed, proceed with caution." + ) + } + } else if (!validate && tlgtype == "Table" && methods::is(tt, "VTableTree")) { + if (rtables::validate_table_struct(tt)) { + message( + "Table structure validation succeeded. You should not need to set validate=FALSE." + ) + } + } + + if (tlgtype != "Listing") { + pagenum <- FALSE + } orientation <- match.arg(orientation) newdev <- open_font_dev(fontspec) if (newdev) { @@ -357,12 +436,13 @@ tt_to_tlgrtf <- function( ) } if (methods::is(tt, "VTableTree")) { - hdrmpf <- matrix_form(tt[1, ]) + hdrmpf <- matrix_form(tt[1, , keep_topleft = TRUE], round_type = round_type) } else if (methods::is(tt, "list") && methods::is(tt[[1]], "MatrixPrintForm")) { hdrmpf <- tt[[1]] } else { - hrdmpf <- tt + hdrmpf <- tt } + pags <- paginate_to_mpfs( tt, fontspec = fontspec, @@ -374,7 +454,8 @@ tt_to_tlgrtf <- function( margins = margins, lpp = NULL, nosplitin = nosplitin, - verbose = verbose + verbose = verbose, + round_type = round_type ) ## if (has_force_pag(tt)) { nslices <- which( @@ -431,6 +512,8 @@ tt_to_tlgrtf <- function( string_map = string_map, markup_df = markup_df, border_mat = pag_bord_mats[[i]], + round_type = round_type, + alignments = alignments, ... ) } @@ -453,6 +536,8 @@ tt_to_tlgrtf <- function( colwidths = colwidths, ## this is largely ignored see note in docs # colwidths are already on the pags since they are mpfs border_mat = pag_bord_mats, + round_type = round_type, + alignments = alignments, ... ) } else if (!is.null(file)) { # only one page after pagination @@ -476,7 +561,8 @@ tt_to_tlgrtf <- function( tt_to_tbldf, fontspec = fontspec, string_map = string_map, - markup_df = markup_df + markup_df = markup_df, + round_type = round_type ) if (one_table) { df <- do.call( @@ -500,11 +586,14 @@ tt_to_tlgrtf <- function( tt, fontspec = fontspec, string_map = string_map, - markup_df = markup_df + markup_df = markup_df, + round_type = round_type ) } } else { df <- tt[, listing_dispcols(tt)] + # apply formats and round_type and return df as a dataframe to input in gentlg + df <- listingdf_dataframe_formats(df, round_type = round_type) } ## we only care about the col labels here... @@ -542,7 +631,8 @@ tt_to_tlgrtf <- function( utils::head(tt, 1), indent_rownames = FALSE, expand_newlines = FALSE, - fontspec = fontspec + fontspec = fontspec, + round_type = round_type ) colinfo <- mpf_to_colspan( mpf, @@ -627,6 +717,7 @@ tt_to_tlgrtf <- function( pagenum = pagenum, bottom_borders = border_mat, print.hux = !is.null(fname), + alignments = alignments, ... ) } @@ -683,8 +774,9 @@ fixup_bord_mat <- function(brdmat, hstrs) { } .make_header_bordmat <- function( - obj, - mpf = matrix_form(utils::head(obj, 1), expand_newlines = FALSE)) { + obj, + mpf = matrix_form(utils::head(obj, 1), expand_newlines = FALSE) +) { spns <- mf_spans(mpf) nlh <- mf_nlheader(mpf) nrh <- mf_nrheader(mpf) diff --git a/R/unicodify.R b/R/unicodify.R deleted file mode 100644 index 2c9b4c9e..00000000 --- a/R/unicodify.R +++ /dev/null @@ -1,17 +0,0 @@ -#' Unicode Mapping Table -#' -#' A tibble that maps special characters to their Unicode equivalents. -#' -#' @format A tibble with columns 'pattern' and 'unicode', where 'pattern' contains -#' the string to be replaced and 'unicode' contains the Unicode code point in hexadecimal. -#' -#' @export -jj_uc_map <- tibble::tribble(~pattern, ~unicode, ">=", "2265", "<=", "2264") - -unicodify <- function(strs, uc_map) { - out <- strs - for (i in seq_len(nrow(uc_map))) { - out <- gsub(uc_map$pattern[i], intToUtf8(strtoi(uc_map$unicode[i], base = 16)), out) - } - out -} diff --git a/R/utils.R b/R/utils.R index 88aa0b0d..e02bf7cc 100644 --- a/R/utils.R +++ b/R/utils.R @@ -18,19 +18,40 @@ leftside <- function(x) { unlist(recursive = recursive) } - #' Title Case Conversion #' -#' @param x Input string -#' @return String converted to title case (first letter of each word capitalized) +#' @param x (`character` or `factor`)\cr Input string +#' @return x converted to title case (first letter of each word capitalized) #' @export #' @keywords internal +#' @examples +#' x <- c("THIS IS an eXaMple", "statement TO CAPItaliZe") +#' string_to_title(x) +#' +#' x <- factor( +#' c("OPTIMAL DOSE", "UNDERDOSE"), +#' levels = c("OPTIMAL DOSE", "UNDERDOSE", "OVERDOSE") +#' ) +#' string_to_title(x) +#' string_to_title <- function(x) { - checkmate::assert_character(x, null.ok = TRUE) - x_lower <- tolower(x) - gsub("(^|\\s)(\\w)", "\\1\\U\\2", x_lower, perl = TRUE) -} + checkmate::assert( + checkmate::check_character(x, null.ok = TRUE), + checkmate::check_factor(x, null.ok = TRUE) + ) + pattern <- "(^|\\s)(\\w)" + replacement <- "\\1\\U\\2" + + if (is.factor(x)) { + y <- levels(x) + y_title <- gsub(pattern, replacement, tolower(y), perl = TRUE) + levels(x) <- y_title + x + } else { + gsub(pattern, replacement, tolower(x), perl = TRUE) + } +} #' Check If `.alt_df_full` Is `NULL` #' @@ -50,3 +71,18 @@ check_alt_df_full <- function(argument, values, .alt_df_full) { name, argument )) } + + +#' Assert that rbmi package is installed +#' +#' @description +#' Checks if the 'rbmi' package is installed and stops with an error message if it's not. +#' +#' @return Invisible NULL if rbmi is installed +#' @keywords internal +assert_rbmi <- function() { + if (!requireNamespace("rbmi", quietly = TRUE)) { + stop("The 'rbmi' package is needed for this function to work. Please install it.", call. = FALSE) + } + invisible(NULL) +} diff --git a/README.md b/README.md index 3e64fd81..768966d4 100644 --- a/README.md +++ b/README.md @@ -27,25 +27,48 @@ It complements the tern package by providing additional statistical analysis cap The package provides a range of functionality, such as: -- Statistical analysis (ANCOVA, MMRM, Cox regression, Kaplan-Meier) +- Statistical analysis (ANCOVA, MMRM, Cox regression, Kaplan-Meier, CMH stratified proportion difference estimation) - Calculation of odds ratios, relative risks, and proportion differences - Event incidence rate analysis +- Support optional SAS (to-nearest-value) and IEC (to-nearest-even) rounding - Frequency tabulations and summarizations - Reference-based multiple imputation (RBMI) for handling missing data -- Production-ready RTF exporter for listings and tables (see [tt_to_tbldf](https://johnsonandjohnson.github.io/junco/reference/tt_to_tlgrtf.html)) +- Production-ready RTF and DOCX exporter for listings and tables (see [tt_to_tbldf](https://johnsonandjohnson.github.io/junco/reference/tt_to_tlgrtf.html) and [ junco::export_as_docx_j](https://johnsonandjohnson.github.io/junco/reference/export_as_docx_j.html)) - Creation of tables, listings, and graphs (TLGs) ## Installation -You can install the development version of junco from [GitHub](https://github.com/johnsonandjohnson/junco) with: +Either you can install the stable CRAN version ```r -# install.packages("remotes") -remotes::install_github("johnsonandjohnson/junco") +install.packages("junco") #CRAN Release +``` + +Or you can install the development version from GitHub: + +```r +require('remotes') +remotes::install_github("johnsonandjohnson/junco", ref = "dev") #for the rolling dev release ``` ## Usage -To understand how to use this package, please refer to the [junco article](https://johnsonandjohnson.github.io/junco/articles/junco.html), which provides multiple examples of code implementation. +To understand how to use this package, please refer to the vignettes (also available on the pkgdown site). You can list them locally with: + +```r +browseVignettes(package = "junco") +``` + +Key vignettes and what they cover: + +- Getting started with junco β€” overview and basic workflow + - Article: https://johnsonandjohnson.github.io/junco/articles/junco.html + - What you’ll learn: how to set up data, create common analyses, and produce TLG-ready outputs using core helpers. + +- Table and listing customizations β€” controlling layouts and styles + - Article: https://johnsonandjohnson.github.io/junco/articles/table_and_listing_customizations.html + - What you’ll learn: how to customize headers, footers, column formatting, pagination, and how to export tables and listing to RTF and DOCX. -See package vignettes `browseVignettes(package = "junco")` for usage of this package. +- Auto column widths β€” making table columns fit content automatically + - Article: https://johnsonandjohnson.github.io/junco/articles/auto_colwidths.html + - What you’ll learn: techniques and options for automatically sizing column widths for cleaner RTF/DOCX outputs. diff --git a/_pkgdown.yml b/_pkgdown.yml index fba89c2e..05367f72 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -22,6 +22,7 @@ articles: contents: - junco - auto_colwidths + - table_and_listing_customizations reference: - title: junco Analysis Functions desc: The following functions are the Analysis functions used used to create common table layouts. @@ -30,29 +31,30 @@ reference: - s_summarize_ancova_j - column_stats - a_freq_combos_j - - a_summarize_ex_j + - a_summarize_ex_j - a_freq_j - a_freq_subcol_j + - a_freq_resp_var_j + - a_eair100_j - a_proportion_ci_factor - a_proportion_ci_logical - a_summarize_aval_chg_diff_j + - a_maxlev + - a_two_tier - rbmi_analyse - - analyze_values + - analyze_values - rbmi_ancova - rbmi_ancova_single - build_formula - c_proportion_logical - cmp_cfun - cmp_post_fun - - count_fraction - find_missing_chg_after_avisit - fit_ancova - fit_mmrm_j - coxph_hr - - d_test_proportion_diff_j - tabulate_rbmi - tabulate_lsmeans - - h_colexpr_substr - h_odds_ratio - make_rbmi_cluster - rbmi_mmrm @@ -76,29 +78,20 @@ reference: - summarize_coxreg_multivar - summarize_lsmeans_wide - summarize_mmrm - - h_a_freq_dataprep - - h_a_freq_prepinrows - - h_create_altdf - - h_denom_parentdf - - h_df_add_newlevels - - h_get_label_map - h_get_trtvar_refpath - - h_subset_combo - - h_upd_dfrow - - h_update_factor - rbmi_mmrm_single_info + - rbmi_pool + - s_cmhrms_j + - a_cmhrms_j + - a_two_tier + - prop_diff_test - title: junco Formatting Functions desc: The following functions are the junco formatting functions used to create common table layouts. contents: - - jj_uc_map - jjcsformat_xx - jjcs_num_formats - jjcsformat_count_denom_fraction - - format_xx_fct - - jjcsformat_fraction_count_denom - - jjcsformat_pval_fct - - jjcsformat_range_fct - insert_blank_line - title: junco Sorting Functions and Pruning Functions @@ -117,16 +110,16 @@ reference: - cond_rm_facets - create_colspan_map - create_colspan_var + - do_exclude_split - make_combo_splitfun - real_add_overall_facet - - title: junco Functions For titles/footnotes and generating .rtfs - desc: The following utility functions help to add titles/footnotes and generate the .rtf files. + - title: junco Functions For titles/footnotes + desc: The following utility functions help to add titles/footnotes. contents: - def_colwidths - get_titles_from_file - set_titles - - tt_to_tlgrtf - title: junco Miscellaneous Functions desc: The following functions are other miscellaneous junco functions used to create common table layouts. @@ -145,3 +138,12 @@ reference: - rm_other_facets_fact - smart_colwidths_1page - tt_to_tbldf + + - title: junco Functions For generating .rtfs, .docxs and HTMLs + desc: The following utility functions help to generate the .rtfs, .docxs and HTMLs. + contents: + - tt_to_tlgrtf + - tt_to_flextable_j + - export_as_docx_j + - export_graph_as_docx + - theme_docx_default_j diff --git a/air.toml b/air.toml new file mode 100644 index 00000000..b4b6917c --- /dev/null +++ b/air.toml @@ -0,0 +1,9 @@ +[format] +line-width = 120 +indent-width = 2 +indent-style = "space" +line-ending = "auto" +persistent-line-breaks = true +exclude = ["**"] +default-exclude = true +skip = [] diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 00000000..b5430eeb --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,33 @@ +## R CMD check results + +❯ checking CRAN incoming feasibility ... [35s] NOTE + Maintainer: 'Gabriel Becker ' + + New submission + + Package was archived on CRAN + + CRAN repository db overrides: + X-CRAN-Comment: Archived on 2025-11-19 as requires archived package + 'rbmi'. + + Suggests or Enhances not in mainstream repositories: + rbmi + Availability using Additional_repositories specification: + rbmi yes https://insightsengineering.r-universe.dev/ + +0 errors βœ– | 0 warnings βœ” | 1 note βœ– + +* We've moved 'rbmi' from 'Imports' to 'Suggests' and made the package fully functional without it. + +## Test environments + +* local Windows install, R 4.5.0 +* ubuntu 22.04 (on GitHub Actions), R 4.5.0 +* windows-latest (on GitHub Actions), R 4.5.0 +* win-builder (devel) + +## Downstream dependencies + +There are currently no downstream dependencies for this package. + diff --git a/inst/WORDLIST b/inst/WORDLIST index 2635128f..f9193fe4 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -2,160 +2,137 @@ ADSL AE AEBODSYS AEDECOD +ANCOVA +AVAL +AVISIT +Analyse +CMH +Colwidths +Customizations +DOCX +DataFrame +Eg +Haenszel +IEC +JJCS +Kaplan +Lapply +MMRM +Miettinen +Nurminen +Optimality +PARAMCD +Parallelisation +Parallelise +RBMI +RTF +Sato +TEFOS +TLG +TLGs +TRT +TRTEMFL +TableTree +Toeplitz +TrueType +Unlist +VTableTree +Vectorized +XLSX afun +allparts altdf -ana analyse -Analyse analysing ancova -Ancova -ANCOVA approxbayes -attr -AVAL -AVISIT bayes -CellValue -cens -cfun chisq ci -clogit -clusterApplyLB -clusterStop cmh -CMH -cmp coef -coefs colcounts -coldiff colgroup colid colpath colspan colwidth colwidths -Colwidths combosdf comparator -condmean -conf -cov -coxph -coxreg csv -DataFrame +customizations +dataset's datasplit denom df dfs -diffci -dp -dplyr -eair -EAIR +docx +dps eg -Eg -emmeans -emmGrid -expr +eq exprs -fct firstcat +flextable fmt -fontspec +fn formatters -fulldf gentlg github -glm goto grepl -grp -Haenszel +hardcoding https ie -imputeObj -inheritParams -inriskdiffcol +iec insightsengineering -jjcs -JJCS +jj jjcsformat -kaplan -Kaplan keeprowtext -labelstr -lapply -Lapply lastcat -lcl -lifecycle -Lifecycle -lm -lr lsm lsmean lsmeans -makeCluster -makePSOCKcluster -mantelhaen -MatrixPrintForm -meandiff -meier mmrm -MMRM mmy monospace -mse -msg multivar multivars +n's na -newcombe -newcombecc -nlme -num -Optimality optimisation optimised parallelisation -Parallelisation parallelise -Parallelise parallelising -PARAMCD -params parentdf -pos +pharmaverseadam +pharmaverseadamjnj +pkgdown +plotheight +plotnames +plotwidth +png +postfun pre -propdiff -pval +pseudocolumn +px rbmi -RBMI -rcell -readxl -reml removerowtext +repo reproducibility responder responders -restr -riskdiff -roundSAS +rlistings rowdf rowlabel rowlabels -RowsVerticalSection -roxygen rr rrisk -rsp rtables rtf -RTF +rtfs +sas savse scorefun sd @@ -163,55 +140,19 @@ se sidedness spl sprintf -stackoverflow -stopCluster str -strat -struct subcol -subjid summarizations -surv -survfit -Tabletree -TableTree tbldf -TEFCGIS -tefmad -tefos -TEFOS -TEFSCNCMP tibble -tidytlg -timepoint -tlgrtf -TLGs -TLs -toeplitz -Toeplitz -tol +topleft trt -TRT -TRTEMFL trtvar -TrueType tt -ucl -unicode +uc +unicodify unlist -Unlist unrounded unstratified -vcov -Vectorized wordbreaking xlsx -XLSX -dataset's -hardcoding -n's -allparts -pseudocolumn -repo -rlistings -tbl \ No newline at end of file diff --git a/inst/template_file.docx b/inst/template_file.docx new file mode 100644 index 00000000..55118c9c Binary files /dev/null and b/inst/template_file.docx differ diff --git a/inst/template_file_watermark_landscape.docx b/inst/template_file_watermark_landscape.docx new file mode 100644 index 00000000..879892cf Binary files /dev/null and b/inst/template_file_watermark_landscape.docx differ diff --git a/inst/template_file_watermark_landscape_pagenum.docx b/inst/template_file_watermark_landscape_pagenum.docx new file mode 100644 index 00000000..359b0658 Binary files /dev/null and b/inst/template_file_watermark_landscape_pagenum.docx differ diff --git a/inst/template_file_watermark_portrait.docx b/inst/template_file_watermark_portrait.docx new file mode 100644 index 00000000..0e2a068c Binary files /dev/null and b/inst/template_file_watermark_portrait.docx differ diff --git a/inst/template_file_watermark_portrait_pagenum.docx b/inst/template_file_watermark_portrait_pagenum.docx new file mode 100644 index 00000000..c4958e34 Binary files /dev/null and b/inst/template_file_watermark_portrait_pagenum.docx differ diff --git a/man/a_eair100_j.Rd b/man/a_eair100_j.Rd index bd04ce98..f12b4393 100644 --- a/man/a_eair100_j.Rd +++ b/man/a_eair100_j.Rd @@ -2,27 +2,8 @@ % Please edit documentation in R/a_eair_j.R \name{a_eair100_j} \alias{a_eair100_j} -\alias{s_eair100_levii_j} \title{Exposure-Adjusted Incidence Rate} \usage{ -s_eair100_levii_j( - levii, - df, - .df_row, - .var, - .alt_df_full = NULL, - id = "USUBJID", - diff = FALSE, - conf_level = 0.95, - trt_var = NULL, - ctrl_grp = NULL, - cur_trt_grp = NULL, - inriskdiffcol = FALSE, - fup_var, - occ_var, - occ_dy -) - a_eair100_j( df, labelstr = NULL, @@ -46,39 +27,19 @@ a_eair100_j( ) } \arguments{ -\item{levii}{(\code{string})\cr the specific level of the variable to calculate EAIR for.} - \item{df}{(\code{data.frame})\cr data set containing all analysis variables.} -\item{.df_row}{(\code{data.frame})\cr data frame across all of the columns for the given row split.} +\item{labelstr}{(\code{string})\cr label string for the row.} \item{.var}{(\code{string})\cr variable name for analysis.} -\item{.alt_df_full}{(\code{dataframe})\cr denominator dataset for calculations.} - -\item{id}{(\code{string})\cr subject variable name.} - -\item{diff}{(\code{logical})\cr if TRUE, risk difference calculations will be performed.} - -\item{conf_level}{(\code{proportion})\cr confidence level of the interval.} - -\item{trt_var}{(\code{string})\cr treatment variable name.} - -\item{ctrl_grp}{(\code{string})\cr control group value.} - -\item{cur_trt_grp}{(\code{string})\cr current treatment group value.} - -\item{inriskdiffcol}{(\code{logical})\cr flag indicating if the function is called within a risk difference column.} - -\item{fup_var}{(\code{string})\cr variable name for follow-up time.} - -\item{occ_var}{(\code{string})\cr variable name for occurrence.} +\item{.df_row}{(\code{data.frame})\cr data frame across all of the columns for the given row split.} -\item{occ_dy}{(\code{string})\cr variable name for occurrence day.} +\item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states.} -\item{labelstr}{(\code{string})\cr label string for the row.} +\item{.alt_df_full}{(\code{dataframe})\cr denominator dataset for calculations.} -\item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states.} +\item{id}{(\code{string})\cr subject variable name.} \item{drop_levels}{(\code{logical})\cr if TRUE, non-observed levels will not be included.} @@ -95,20 +56,16 @@ a_eair100_j( \item{.indent_mods}{(named \code{integer})\cr indent modifiers for the labels.} \item{na_str}{(\code{string})\cr string used to replace all NA or empty values in the output.} + +\item{conf_level}{(\code{proportion})\cr confidence level of the interval.} + +\item{fup_var}{(\code{string})\cr variable name for follow-up time.} + +\item{occ_var}{(\code{string})\cr variable name for occurrence.} + +\item{occ_dy}{(\code{string})\cr variable name for occurrence day.} } \value{ -\itemize{ -\item \code{s_eair100_levii_j()} returns a list containing the following statistics: -\itemize{ -\item n_event: Number of events -\item person_years: Total person-years of follow-up -\item eair: Exposure-adjusted incidence rate per 100 person-years -\item eair_diff: Risk difference in EAIR (if diff=TRUE and inriskdiffcol=TRUE) -\item eair_diff_ci: Confidence interval for the risk difference (if diff=TRUE and inriskdiffcol=TRUE) -}.\cr -The list of available statistics (core columns) can also be viewed by running \code{junco_get_stats("a_eair100_j")} -} - \itemize{ \item \code{a_eair100_j} returns the corresponding list with formatted \code{\link[rtables:CellValue]{rtables::CellValue()}}. } @@ -118,9 +75,6 @@ Statistical/Analysis Function for presenting Exposure-Adjusted Incidence Rate su } \section{Functions}{ \itemize{ -\item \code{s_eair100_levii_j()}: calculates exposure-adjusted incidence rates (EAIR) per 100 person-years for a -specific level of a variable. - \item \code{a_eair100_j()}: Formatted analysis function for exposure adjusted incidence rate summary which is used as \code{afun} in \code{analyze} or \code{cfun} in \code{summarize_row_groups}. @@ -133,14 +87,14 @@ ctrl_grp <- "B: Placebo" cutoffd <- as.Date("2023-09-24") -adexsum <- ex_adsl \%>\% +adexsum <- ex_adsl |> create_colspan_var( non_active_grp = ctrl_grp, non_active_grp_span_lbl = " ", active_grp_span_lbl = "Active Study Agent", colspan_var = "colspan_trt", trt_var = trtvar - ) \%>\% + ) |> mutate( rrisk_header = "Risk Difference (95\% CI)", rrisk_label = paste(!!rlang::sym(trtvar), "vs", ctrl_grp), @@ -148,19 +102,19 @@ adexsum <- ex_adsl \%>\% !is.na(EOSDY) ~ EOSDY, TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) ) - ) \%>\% + ) |> select(USUBJID, !!rlang::sym(trtvar), colspan_trt, rrisk_header, rrisk_label, TRTDURY) adexsum$TRTDURY <- as.numeric(adexsum$TRTDURY) -adae <- ex_adae \%>\% - group_by(USUBJID, AEDECOD) \%>\% - select(USUBJID, AEDECOD, ASTDY) \%>\% - mutate(rwnum = row_number()) \%>\% +adae <- ex_adae |> + group_by(USUBJID, AEDECOD) |> + select(USUBJID, AEDECOD, ASTDY) |> + mutate(rwnum = row_number()) |> mutate(AOCCPFL = case_when( rwnum == 1 ~ "Y", TRUE ~ NA - )) \%>\% + )) |> filter(AOCCPFL == "Y") aefup <- left_join(adae, adexsum, by = "USUBJID") @@ -175,17 +129,20 @@ colspan_trt_map <- create_colspan_map(adexsum, ref_path <- c("colspan_trt", " ", trtvar, ctrl_grp) +################################################################################ +# Define layout and build table: +################################################################################ -lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") \%>\% - split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) \%>\% - split_cols_by(trtvar) \%>\% - split_cols_by("rrisk_header", nested = FALSE) \%>\% - split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) \%>\% +lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") |> + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> + split_cols_by(trtvar) |> + split_cols_by("rrisk_header", nested = FALSE) |> + split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) |> analyze("TRTDURY", nested = FALSE, show_labels = "hidden", afun = a_patyrs_j - ) \%>\% + ) |> analyze( vars = "AEDECOD", nested = FALSE, @@ -203,4 +160,3 @@ result <- build_table(lyt, aefup, alt_counts_df = adexsum) head(result, 5) } -\keyword{internal} diff --git a/man/a_freq_combos_j.Rd b/man/a_freq_combos_j.Rd index 8fc2d7a3..f55f1f3d 100644 --- a/man/a_freq_combos_j.Rd +++ b/man/a_freq_combos_j.Rd @@ -50,7 +50,10 @@ will be considered.\cr When no values are observed (eg zero row input df), a row with row-label \verb{No data reported} will be included in the table.} -\item{combosdf}{The df which provides the mapping of facets to produce cumulative counts for .N_col.} +\item{combosdf}{The df which provides the mapping of column facets to produce cumulative counts for .N_col.\cr +In the cell facet, these cumulative records must then be removed from the numerator, +which can be done via the filter_var parameter +to avoid unwanted counting of events.} \item{do_not_filter}{A vector of facets (i.e., column headers), identifying headers for which no filtering of records should occur. @@ -88,14 +91,14 @@ This higher row-level split is specified in the argument \code{denom_by}.\cr }} \item{label}{(\code{string})\cr -When \code{val}is a single \code{string}, +When \code{val} has length 1, the row label to be shown on the output can be specified using this argument.\cr When \code{val} is a \verb{character vector}, the \code{label_map} argument can be specified to control the row-labels.} \item{label_fstr}{(\code{string})\cr a sprintf style format string. -It can contain up to one "\\%s" which takes the current split value and +It can contain up to one \code{"\%s"}, which takes the current split value and generates the row/column label.\cr It will be combined with the \code{labelstr} argument, when utilizing this function as @@ -109,10 +112,7 @@ a different row label to be presented on the table.\cr} \item{.alt_df_full}{(\code{dataframe})\cr Denominator dataset for fraction and relative risk calculations.\cr -.alt_df_full is a crucial parameter for the relative risk calculations -if this parameter is not set to utilize \code{alt_counts_df}, -then the values in the relative risk columns might not be correct.\cr -Once the rtables PR is integrated, this argument gets populated by the rtables +this argument gets populated by the rtables split machinery (see \link[rtables:additional_fun_params]{rtables::additional_fun_params}).} \item{denom_by}{(\code{character})\cr Variables from row-split @@ -141,7 +141,66 @@ list of requested statistics with formatted \code{rtables::CellValue()}.\cr \description{ Analysis function count and percentage in column design controlled by combosdf } -\note{ -: These extra records must then be removed from the numerator via the filter_var parameter -to avoid double counting of events. +\examples{ +library(dplyr) +ADSL <- ex_adsl |> select(USUBJID, ARM, EOSSTT, EOSDT, EOSDY, TRTSDTM) + +cutoffd <- as.Date("2023-09-24") + +ADSL <- ADSL |> + mutate( + TRTDURY = case_when( + !is.na(EOSDY) ~ EOSDY, + TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) + ) + ) |> + mutate(ACAT1 = case_when( + TRTDURY < 183 ~ "0-6 Months", + TRTDURY < 366 ~ "6-12 Months", + TRUE ~ "+12 Months" + )) |> + mutate(ACAT1 = factor(ACAT1, levels = c("0-6 Months", "6-12 Months", "+12 Months"))) + + +ADAE <- ex_adae |> select(USUBJID, ARM, AEBODSYS, AEDECOD, ASTDY) + +ADAE <- ADAE |> + mutate(TRTEMFL = "Y") |> + mutate(ACAT1 = case_when( + ASTDY < 183 ~ "0-6 Months", + ASTDY < 366 ~ "6-12 Months", + TRUE ~ "+12 Months" + )) |> + mutate(ACAT1 = factor(ACAT1, levels = c("0-6 Months", "6-12 Months", "+12 Months"))) + +combodf <- tribble( + ~valname, ~label, ~levelcombo, ~exargs, + "Tot", "Total", c("0-6 Months", "6-12 Months", "+12 Months"), list(), + "A_0-6 Months", "0-6 Months", c("0-6 Months", "6-12 Months", "+12 Months"), list(), + "B_6-12 Months", "6-12 Months", c("6-12 Months", "+12 Months"), list(), + "C_+12 Months", "+12 Months", c("+12 Months"), list() +) + + +lyt <- basic_table(show_colcounts = TRUE) |> + split_cols_by("ARM") |> + split_cols_by("ACAT1", + split_fun = add_combo_levels(combosdf = combodf, trim = FALSE, keep_levels = combodf$valname) + ) |> + analyze("TRTEMFL", + show_labels = "hidden", + afun = a_freq_combos_j, + extra_args = list( + val = "Y", + label = "Subjects with >= 1 AE", + combosdf = combodf, + filter_var = "ACAT1", + do_not_filter = "Tot" + ) + ) + + +result <- build_table(lyt, df = ADAE, alt_counts_df = ADSL) + +result } diff --git a/man/a_freq_j.Rd b/man/a_freq_j.Rd index 77d4a0f7..1d863c82 100644 --- a/man/a_freq_j.Rd +++ b/man/a_freq_j.Rd @@ -3,6 +3,7 @@ \name{a_freq_j} \alias{a_freq_j} \alias{s_freq_j} +\alias{a_freq_j_with_exclude} \title{Analysis/statistical function for count and percentage in core columns and (optional) relative risk columns} \usage{ @@ -59,6 +60,22 @@ a_freq_j( colgroup = NULL, countsource = c("df", "altdf") ) + +a_freq_j_with_exclude( + df, + labelstr = NULL, + exclude_levels, + .var = NA, + .spl_context, + .df_row, + .N_col, + .alt_df_full = NULL, + .stats = "count_unique_denom_fraction", + .formats = NULL, + .indent_mods = NULL, + .labels_n = NULL, + ... +) } \arguments{ \item{df}{(\code{data.frame})\cr data set containing all analysis variables.} @@ -147,14 +164,14 @@ See \code{?tern::s_proportion_diff} for details.} \item{weights_method}{Will be passed onto the relative risk function (internal function s_rel_risk_val_j).\cr} \item{label}{(\code{string})\cr -When \code{val}is a single \code{string}, +When \code{val} has length 1, the row label to be shown on the output can be specified using this argument.\cr When \code{val} is a \verb{character vector}, the \code{label_map} argument can be specified to control the row-labels.} \item{label_fstr}{(\code{string})\cr a sprintf style format string. -It can contain up to one "\\%s" which takes the current split value and +It can contain up to one \code{"\%s"}, which takes the current split value and generates the row/column label.\cr It will be combined with the \code{labelstr} argument, when utilizing this function as @@ -168,10 +185,7 @@ a different row label to be presented on the table.\cr} \item{.alt_df_full}{(\code{dataframe})\cr Denominator dataset for fraction and relative risk calculations.\cr -.alt_df_full is a crucial parameter for the relative risk calculations -if this parameter is not set to utilize \code{alt_counts_df}, -then the values in the relative risk columns might not be correct.\cr -Once the rtables PR is integrated, this argument gets populated by the rtables +this argument gets populated by the rtables split machinery (see \link[rtables:additional_fun_params]{rtables::additional_fun_params}).} \item{denom_by}{(\code{character})\cr Variables from row-split @@ -209,6 +223,11 @@ If not NULL, columns not defined in \code{restr_columns} will be blanked out.} \item{colgroup}{The name of the column group variable that is used as source for denominator calculation.\cr Required to be specified when \code{denom = "N_colgroup"}.} + +\item{exclude_levels}{(\code{list})\cr A named list where names correspond to split variables +and values are vectors of levels to exclude.} + +\item{...}{additional arguments for the lower level functions.} } \value{ \itemize{ @@ -261,6 +280,13 @@ as it cannot be retrieved directly from the column layout definition. This higher row-level split is specified in the argument \code{denom_by}.\cr } } +\section{Functions}{ +\itemize{ +\item \code{a_freq_j_with_exclude()}: Wrapper for the \code{afun} which can exclude +row split levels from producing the analysis. These have to be specified in the +\code{exclude_levels} argument, see \code{?do_exclude_split} for details. + +}} \examples{ library(dplyr) diff --git a/man/a_freq_resp_var_j.Rd b/man/a_freq_resp_var_j.Rd index 6ea65e64..7ba8f538 100644 --- a/man/a_freq_resp_var_j.Rd +++ b/man/a_freq_resp_var_j.Rd @@ -55,10 +55,31 @@ a_freq_resp_var_j( \item{...}{Additional arguments passed to other functions.} } \value{ -A list of rcell objects containing the response statistics. +Formatted analysis function which is used as \code{afun} in \code{analyze_vars()} +and as \code{cfun} in \code{summarize_row_groups()}. } \description{ This function calculates counts and percentages for response variables (Y/N values), with optional risk difference calculations. } -\keyword{internal} +\examples{ +library(dplyr) +ADSL <- ex_adsl |> select(USUBJID, ARM, SEX) + +ADAE <- ex_adae |> select(USUBJID, ARM, SEX, AEBODSYS, AEDECOD) + +ADAE <- ADAE |> + mutate(TRTEMFL = "Y") + +lyt <- basic_table(show_colcounts = TRUE) |> + split_cols_by("ARM") |> + analyze("SEX", + show_labels = "visible", + afun = a_freq_resp_var_j, + extra_args = list(resp_var = "TRTEMFL", riskdiff = FALSE) + ) + +result <- build_table(lyt, df = ADAE, alt_counts_df = ADSL) + +result +} diff --git a/man/a_freq_subcol_j.Rd b/man/a_freq_subcol_j.Rd index 5e802f10..7bcb1ec1 100644 --- a/man/a_freq_subcol_j.Rd +++ b/man/a_freq_subcol_j.Rd @@ -50,13 +50,13 @@ will be considered.\cr When no values are observed (eg zero row input df), a row with row-label \verb{No data reported} will be included in the table.} -\item{subcol_split}{Text to search colid to determine whether further subsetting +\item{subcol_split}{(\code{string})\cr text to search colid to determine whether further subsetting should be performed.} -\item{subcol_var}{Name of variable containing to be searched for the text +\item{subcol_var}{(\code{string})\cr name of variable containing to be searched for the text identified in subcol_val argument.} -\item{subcol_val}{Value to use to perform further data sub-setting.} +\item{subcol_val}{(\code{string})\cr value to use to perform further data sub-setting.} \item{.df_row}{(\code{data.frame})\cr data frame across all of the columns for the given row split.} @@ -83,14 +83,14 @@ This higher row-level split is specified in the argument \code{denom_by}.\cr }} \item{label}{(\code{string})\cr -When \code{val}is a single \code{string}, +When \code{val} has length 1, the row label to be shown on the output can be specified using this argument.\cr When \code{val} is a \verb{character vector}, the \code{label_map} argument can be specified to control the row-labels.} \item{label_fstr}{(\code{string})\cr a sprintf style format string. -It can contain up to one "\\%s" which takes the current split value and +It can contain up to one \code{"\%s"}, which takes the current split value and generates the row/column label.\cr It will be combined with the \code{labelstr} argument, when utilizing this function as @@ -104,10 +104,7 @@ a different row label to be presented on the table.\cr} \item{.alt_df_full}{(\code{dataframe})\cr Denominator dataset for fraction and relative risk calculations.\cr -.alt_df_full is a crucial parameter for the relative risk calculations -if this parameter is not set to utilize \code{alt_counts_df}, -then the values in the relative risk columns might not be correct.\cr -Once the rtables PR is integrated, this argument gets populated by the rtables +this argument gets populated by the rtables split machinery (see \link[rtables:additional_fun_params]{rtables::additional_fun_params}).} \item{denom_by}{(\code{character})\cr Variables from row-split @@ -137,3 +134,45 @@ list of requested statistics with formatted \code{rtables::CellValue()}.\cr Analysis function count and percentage with extra column-subsetting in selected columns (controlled by subcol_* arguments) } +\examples{ +library(dplyr) + +ADSL <- ex_adsl |> + select(USUBJID, ARM) + +ADSL$COLSPAN_REL <- "AEs" + +ADAE <- ex_adae |> + select(USUBJID, ARM, AEDECOD, AREL) + +ADAE <- ADAE |> + mutate( + AEREL = case_when( + AREL == "Y" ~ "RELATED", + AREL == "N" ~ "NOT RELATED" + ), + AEREL = factor(AEREL), + COLSPAN_REL = "AEs" + ) + +combodf <- tribble( + ~valname, ~label, ~levelcombo, ~exargs, + "RELATED", "Related AEs", c("AEs"), list() +) + +lyt <- basic_table(show_colcounts = TRUE) |> + split_cols_by("COLSPAN_REL", split_fun = add_combo_levels(combodf, trim = TRUE)) |> + split_cols_by("ARM") |> + analyze("AEDECOD", + afun = a_freq_subcol_j, + extra_args = list( + subcol_split = "RELATED", + subcol_var = "AEREL", + subcol_val = "RELATED" + ) + ) + +result <- build_table(lyt, ADAE, alt_counts_df = ADSL) + +result +} diff --git a/man/a_maxlev.Rd b/man/a_maxlev.Rd new file mode 100644 index 00000000..2f562eb1 --- /dev/null +++ b/man/a_maxlev.Rd @@ -0,0 +1,116 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/a_maxlev.R +\name{a_maxlev} +\alias{a_maxlev} +\title{Calculate Count and Percentage of the Maximum Level of an Ordered Factor per +Subject.} +\usage{ +a_maxlev( + df, + labelstr = NULL, + .var, + .spl_context, + id = "USUBJID", + .alt_df_full = NULL, + any_level = FALSE, + any_level_exclude = "Missing", + ... +) +} +\arguments{ +\item{df}{(\code{data.frame})\cr data set containing all analysis variables.} + +\item{labelstr}{(\code{character})\cr label of the level of the parent split currently being summarized +(must be present as second argument in Content Row Functions). See \code{\link[rtables:summarize_row_groups]{rtables::summarize_row_groups()}} +for more information.} + +\item{.var}{(\code{string})\cr single variable name that is passed by \code{rtables} when requested +by a statistics function.} + +\item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states +that is passed by \code{rtables}.} + +\item{id}{(\code{string})\cr subject variable name.} + +\item{.alt_df_full}{(\code{dataframe})\cr A dataset used to compute the +denominator for proportions. This is required when the same subject appears +multiple times in the dataset due to treatment sequences. +\code{colnames(.alt_df_full)} must be a superset of \code{id}. +This argument gets populated by the rtables split machinery +(see \link[rtables:additional_fun_params]{rtables::additional_fun_params}).} + +\item{any_level}{(\code{flag})\cr +Should be set to \code{TRUE} when the function is used as a \code{cfun}.} + +\item{any_level_exclude}{(\code{character})\cr +Applicable only when \code{any_level = TRUE}. Specifies levels of \code{df[[.var]]} +to exclude from the statistic (default = "Missing").} + +\item{...}{additional arguments for the lower level functions.} +} +\value{ +A \code{RowsVerticalSection} object. +} +\description{ +A formatted analysis function used as an \code{afun} in +\link[rtables]{analyze} and as a \code{cfun} in \link[rtables]{summarize_row_groups}. + +It computes count and proportion statistics for the maximum level of an +ordered factor, \code{df[[.var]]}, for each unique subject in \code{df[[id]]}. +Specifically, for each subject, the function identifies the highest level +of \code{df[[.var]]}, producing one value per subject. +Then, if \code{any_level = TRUE}, the function reports the total number of +maximum values, excluding those specified in \code{any_level_exclude}. +Otherwise, it tabulates the frequency of each maximum level across all +subjects. + +This function is particularly useful for identifying the maximum severity of +adverse events in a treatment sequence, where the most severe event +experienced by a subject is used for reporting. +} +\details{ +For each unique subject, only the maximum level of the ordered factor +\code{df[[.var]]} is included in the final count and percentage statistics. +} +\note{ +The denominator for proportions is computed using the \code{denom_df} +argument. This serves as a temporary workaround until the next version of +\code{rtables} is released, which will support \code{.alt_count_df} for use in +\code{afun}/\code{cfun}. +} +\examples{ +treatments <- factor(c("a", "b", "c")) +ae_severities <- c("Missing", "Mild", "Moderate", "Severe") +ae_severities <- ordered(ae_severities, levels = ae_severities) +my_adae <- data.frame( + ID = c(1, 1, 1, 2, 2, 3, 3, 3, 3, 4), + TRT = factor(c("a", "b", "b", "b", "c", "c", "a", "c", "b", "b")), + AESEV = ae_severities[c(4L, 1L, 2L, 1L, 2L, 1L, 2L, 3L, 1L, 2L)] +) +my_adsl <- data.frame( + ID = rep(1:5, each = 3), + TRT = factor(rep(c("a", "b", "c"), times = 5)) +) + +aesevall_spf <- make_combo_splitfun( + nm = "AESEV_ALL", + label = "Any AE", + levels = NULL, +) + +lyt <- basic_table() |> + split_cols_by("TRT") |> + add_overall_col("Total") |> + split_rows_by("AESEV", split_fun = aesevall_spf) |> + summarize_row_groups( + "AESEV", + cfun = a_maxlev, + extra_args = list(id = "ID", any_level = TRUE) + ) |> + analyze( + "AESEV", + afun = a_maxlev, + extra_args = list(id = "ID") + ) +build_table(lyt, my_adae, alt_counts_df = my_adsl) +} diff --git a/man/a_patyrs_j.Rd b/man/a_patyrs_j.Rd index 519afbaa..373efeea 100644 --- a/man/a_patyrs_j.Rd +++ b/man/a_patyrs_j.Rd @@ -52,9 +52,9 @@ a_patyrs_j( } \value{ \itemize{ -\item \code{s_patyrs_j()} return x a list containing the patient years statistics. -The list of available statistics for can be viewed by running \code{junco_get_stats("a_patyrs_j")}, -currently this is just a single statistic \code{patyrs}, patient years of exposure. +\item \code{s_patyrs_j()} returns a list containing the patient years statistics. +The list of available statistics for can be viewed by running \code{junco_get_stats("a_patyrs_j")}. +Currently, this is just a single statistic \code{patyrs}, patient years of exposure. } \itemize{ @@ -80,14 +80,14 @@ ctrl_grp <- "B: Placebo" cutoffd <- as.Date("2023-09-24") -adexsum <- ex_adsl \%>\% +adexsum <- ex_adsl |> create_colspan_var( non_active_grp = ctrl_grp, non_active_grp_span_lbl = " ", active_grp_span_lbl = "Active Study Agent", colspan_var = "colspan_trt", trt_var = trtvar - ) \%>\% + ) |> mutate( rrisk_header = "Risk Difference (95\% CI)", rrisk_label = paste(!!rlang::sym(trtvar), "vs", ctrl_grp), @@ -95,17 +95,17 @@ adexsum <- ex_adsl \%>\% !is.na(EOSDY) ~ EOSDY, TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) ) - ) \%>\% + ) |> select(USUBJID, !!rlang::sym(trtvar), colspan_trt, rrisk_header, rrisk_label, TRTDURY) -adae <- ex_adae \%>\% - group_by(USUBJID, AEDECOD) \%>\% - select(USUBJID, AEDECOD, ASTDY) \%>\% - mutate(rwnum = row_number()) \%>\% +adae <- ex_adae |> + group_by(USUBJID, AEDECOD) |> + select(USUBJID, AEDECOD, ASTDY) |> + mutate(rwnum = row_number()) |> mutate(AOCCPFL = case_when( rwnum == 1 ~ "Y", TRUE ~ NA - )) \%>\% + )) |> filter(AOCCPFL == "Y") aefup <- left_join(adae, adexsum, by = "USUBJID") @@ -120,11 +120,15 @@ colspan_trt_map <- create_colspan_map(adexsum, ref_path <- c("colspan_trt", " ", trtvar, ctrl_grp) -lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") \%>\% - split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) \%>\% - split_cols_by(trtvar) \%>\% - split_cols_by("rrisk_header", nested = FALSE) \%>\% - split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) \%>\% +################################################################################ +# Define layout and build table: +################################################################################ + +lyt <- basic_table(show_colcounts = TRUE, colcount_format = "N=xx", top_level_section_div = " ") |> + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> + split_cols_by(trtvar) |> + split_cols_by("rrisk_header", nested = FALSE) |> + split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) |> analyze("TRTDURY", nested = FALSE, show_labels = "hidden", diff --git a/man/a_proportion_ci_factor.Rd b/man/a_proportion_ci_factor.Rd index 95f16dbc..7fd1e4ca 100644 --- a/man/a_proportion_ci_factor.Rd +++ b/man/a_proportion_ci_factor.Rd @@ -18,7 +18,7 @@ arguments.} The \code{\link[rtables:rcell]{rtables::rcell()}} result. } \description{ -Formatted Analysis Function For Proportion Confidence Interval for Factor +Formatted Analysis Function For Proportion Confidence Interval for Factor. } \examples{ a_proportion_ci_factor( diff --git a/man/a_proportion_ci_logical.Rd b/man/a_proportion_ci_logical.Rd index 47b44330..992ecda4 100644 --- a/man/a_proportion_ci_logical.Rd +++ b/man/a_proportion_ci_logical.Rd @@ -23,7 +23,7 @@ required format. Note that the value is in percent already.} The \code{\link[rtables:rcell]{rtables::rcell()}} result. } \description{ -Formatted Analysis Function For Proportion Confidence Interval for Logical +Formatted Analysis Function For Proportion Confidence Interval for Logical. } \examples{ a_proportion_ci_logical( diff --git a/man/a_summarize_aval_chg_diff_j.Rd b/man/a_summarize_aval_chg_diff_j.Rd index 33b4ec24..9ae43ca7 100644 --- a/man/a_summarize_aval_chg_diff_j.Rd +++ b/man/a_summarize_aval_chg_diff_j.Rd @@ -39,12 +39,12 @@ a_summarize_aval_chg_diff_j( that is passed by \code{rtables}.} \item{ancova}{(\code{logical})\cr If FALSE, only descriptive methods will be used. \cr -If TRUE Ancova methods will be used for each of the columns : AVAL, CHG, DIFF. \cr} +If TRUE, ANCOVA methods will be used for each of the columns : AVAL, CHG, DIFF. \cr} -\item{comp_btw_group}{(\code{logical})\cr If TRUE, +\item{comp_btw_group}{(\code{logical})\cr If TRUE, comparison between groups will be performed. \cr When ancova = FALSE, the estimate of between group difference (on CHG) -will be based upon a two-sample t-test. \cr -\cr When ancova = TRUE, the same ancova model will be used for the estimate of between group difference (on CHG).} +will be based upon a two-sample t-test. +\cr When ancova = TRUE, the same ANCOVA model will be used for the estimate of between group difference (on CHG).} \item{ref_path}{(\code{character})\cr global reference group specification, see \code{\link[=get_ref_info]{get_ref_info()}}.} @@ -96,8 +96,8 @@ a vector that can contain single variable names (such as 'X1'), and/or interacti \item{.stats}{(named \code{list})\cr column statistics to select for the table. The following column names are to be used: \code{col1}, \code{col23}, \code{coldiff}.\cr For \code{col1}, the following stats can be specified.\cr -For \code{col23}, only \code{mean_ci_3d} is available. When ancova=\code{TRUE} these are LS Means, otherwise, arithmetic means.\cr -For \code{coldiff}, only \code{meandiff_ci_3d} is available. When ancova=\code{TRUE} these +For \code{col23}, only \code{mean_ci_3d} is available. When ancova = \code{TRUE} these are LS Means, otherwise, arithmetic means.\cr +For \code{coldiff}, only \code{meandiff_ci_3d} is available. When ancova = \code{TRUE} these are LS difference in means, otherwise, difference in means based upon 2-sample t-test.\cr} \item{.formats}{(named \code{list})\cr formats for the column statistics. \code{xx.d} style formats can be used.} @@ -113,10 +113,10 @@ A function that can be used in an analyze function call } \description{ Analysis functions to produce a 1-row summary presented in -a 3-column layout in the columns: column 1: N, column 2: Value, column 3: change\cr +a 3-column layout in the columns (column 1 = N, column 2 = Value, column 3 = Change).\cr In the difference columns, only 1 column will be presented : difference + CI\cr When ancova = \code{TRUE}, the presented statistics will be based on ANCOVA method (\code{s_summarize_ancova_j}).\cr -mean and ci (both for Value (column 2) and Chg (column 3)) using statistic \code{lsmean_ci}\cr +mean and ci (both for Value (column 2) and CHG (column 3)) using statistic \code{lsmean_ci}\cr mean and ci for the difference column are based on same ANCOVA model using statistic \code{lsmean_diffci}\cr When ancova = \code{FALSE}, descriptive statistics will be used instead.\cr In the difference column, the 2-sample t-test will be used. @@ -125,7 +125,6 @@ In the difference column, the 2-sample t-test will be used. See Description } \examples{ - library(dplyr) ADEG <- data.frame( diff --git a/man/a_summarize_ex_j.Rd b/man/a_summarize_ex_j.Rd index eec68a9c..e7e5f827 100644 --- a/man/a_summarize_ex_j.Rd +++ b/man/a_summarize_ex_j.Rd @@ -51,14 +51,14 @@ by a statistics function.} \item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states that is passed by \code{rtables}.} -\item{comp_btw_group}{(\code{logical})\cr If TRUE, -\cr When ancova = FALSE, the estimate of between group difference (on CHG) will be based upon two-sample t-test. \cr -\cr When ancova = TRUE, the same ancova model will be used for the estimate of between group difference (on CHG).} +\item{comp_btw_group}{(\code{logical})\cr If TRUE, comparison between groups will be performed. +\cr When ancova = FALSE, the estimate of between group difference (on CHG) will be based upon two-sample t-test. +\cr When ancova = TRUE, the same ANCOVA model will be used for the estimate of between group difference (on CHG).} \item{ref_path}{(\code{character})\cr global reference group specification, see \code{\link[=get_ref_info]{get_ref_info()}}.} \item{ancova}{(\code{logical})\cr If FALSE, only descriptive methods will be used. \cr -If TRUE Ancova methods will be used for each of the columns : AVAL, CHG, DIFF. \cr} +If TRUE, ANCOVA methods will be used for each of the columns : AVAL, CHG, DIFF. \cr} \item{interaction_y}{(\code{character})\cr Will be passed onto the \code{tern} function \code{s_ancova}, when ancova = TRUE.} @@ -66,7 +66,7 @@ If TRUE Ancova methods will be used for each of the columns : AVAL, CHG, DIFF. \ \item{conf_level}{(\code{proportion})\cr Confidence level of the interval} -\item{daysconv}{conversion required to get the values into days +\item{daysconv}{(\code{numeric})\cr conversion required to get the values into days (i.e 1 if original PARAMCD unit is days, 30.4375 if original PARAMCD unit is in months)} \item{variables}{(named list of strings)\cr @@ -100,80 +100,77 @@ unmodified default behavior. Can be negative.} A function to create the appropriate statistics needed for exposure table } \details{ -Creates statistics needed for standard exposure table +Creates statistics needed for standard exposure table. This includes differences and 95\% CI and total treatment years. This is designed to be used as an analysis (afun in \code{analyze}) function. - -Creates statistics needed for table. This includes differences and 95\% CI and total treatment years. -This is designed to be used as an analysis (afun in \code{analyze}) function. } \section{Functions}{ \itemize{ -\item \code{s_summarize_ex_j()}: Statistics function needed for the exposure tables +\item \code{s_summarize_ex_j()}: Statistics function needed for the exposure tables. \item \code{a_summarize_ex_j()}: Formatted analysis function which is used as \code{afun}. }} \examples{ library(dplyr) +ADEX <- ex_adsl |> select(USUBJID, ARM, TRTSDTM, EOSSTT, EOSDY) -ADEX <- data.frame( - USUBJID = c( - "XXXXX01", "XXXXX02", "XXXXX03", "XXXXX04", "XXXXX05", - "XXXXX06", "XXXXX07", "XXXXX08", "XXXXX09", "XXXXX10" - ), - TRT01A = c( - "ARMA", "ARMA", "ARMA", "ARMA", "ARMA", - "Placebo", "Placebo", "Placebo", "ARMA", "ARMA" - ), - AVAL = c(56, 78, 67, 87, 88, 93, 39, 87, 65, 55) -) +trtvar <- "ARM" +ctrl_grp <- "B: Placebo" +cutoffd <- as.Date("2023-09-24") ADEX <- ADEX |> - mutate(TRT01A = as.factor(TRT01A)) - -ADEX$colspan_trt <- factor(ifelse(ADEX$TRT01A == "Placebo", " ", "Active Study Agent"), - levels = c("Active Study Agent", " ") -) - -ADEX$diff_header <- "Difference in Means (95\% CI)" -ADEX$diff_label <- paste(ADEX$TRT01A, paste("vs", "Placebo")) + create_colspan_var( + non_active_grp = ctrl_grp, + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = trtvar + ) |> + mutate( + diff_header = "Difference in Means (95\% CI)", + diff_label = paste(!!rlang::sym(trtvar), "vs", ctrl_grp), + TRTDURY = case_when( + !is.na(EOSDY) ~ EOSDY, + TRUE ~ as.integer(cutoffd - as.Date(TRTSDTM) + 1) + ) + ) colspan_trt_map <- create_colspan_map(ADEX, - non_active_grp = "Placebo", + non_active_grp = ctrl_grp, non_active_grp_span_lbl = " ", active_grp_span_lbl = "Active Study Agent", colspan_var = "colspan_trt", - trt_var = "TRT01A" + trt_var = trtvar ) -ref_path <- c("colspan_trt", "", "TRT01A", "Placebo") + +ref_path <- c("colspan_trt", "", trtvar, ctrl_grp) lyt <- basic_table() |> split_cols_by( "colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map) ) |> - split_cols_by("TRT01A") |> + split_cols_by(trtvar) |> split_cols_by("diff_header", nested = FALSE) |> split_cols_by( - "TRT01A", - split_fun = remove_split_levels("Placebo"), + trtvar, + split_fun = remove_split_levels(ctrl_grp), labels_var = "diff_label" ) |> - analyze("AVAL", + analyze("EOSDY", afun = a_summarize_ex_j, var_labels = "Duration of treatment (Days)", show_labels = "visible", indent_mod = 0L, extra_args = list( daysconv = 1, ref_path = ref_path, - variables = list(arm = "TRT01A", covariates = NULL), + variables = list(arm = trtvar, covariates = NULL), ancova = TRUE, comp_btw_group = TRUE ) ) -result <- build_table(lyt, ADEX) - +result <- build_table(lyt, ADEX, alt_counts_df = ADEX) result } diff --git a/man/a_two_tier.Rd b/man/a_two_tier.Rd new file mode 100644 index 00000000..49121d65 --- /dev/null +++ b/man/a_two_tier.Rd @@ -0,0 +1,197 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/a_two_tier.R +\name{a_two_tier} +\alias{a_two_tier} +\title{Two Tier Analysis Function} +\usage{ +a_two_tier( + df, + labelstr = NULL, + .var, + .N_col, + .df_row, + inner_var, + drill_down_levs, + .spl_context, + use_all_levels = FALSE, + grp_fun, + detail_fun, + .alt_df_full = NULL, + ... +) +} +\arguments{ +\item{df}{(\code{data.frame})\cr data set containing all analysis variables.} + +\item{labelstr}{(\code{character})\cr label of the level of the parent split currently being summarized +(must be present as second argument in Content Row Functions). See \code{\link[rtables:summarize_row_groups]{rtables::summarize_row_groups()}} +for more information.} + +\item{.var}{(\code{string})\cr single variable name that is passed by \code{rtables} when requested +by a statistics function.} + +\item{.N_col}{(\code{integer})\cr column-wise N (column count) for the full column being analyzed that is typically +passed by \code{rtables}.} + +\item{.df_row}{(\code{data.frame})\cr data frame across all of the columns for the given row split.} + +\item{inner_var}{(\code{string})\cr single variable name to use when generating +the detail rows.} + +\item{drill_down_levs}{(\code{character})\cr the level(s) of \code{.var} under which +detail rows should be generated.} + +\item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states +that is passed by \code{rtables}.} + +\item{use_all_levels}{(\code{flag})\cr controls which factor levels will be +present for \code{inner_var} (both in \code{df}/\code{x} and in \code{.df_row}) when calling +\code{detail_fun}. +If \code{TRUE}, all levels (those present on the factor \code{.df_row[[inner_var]]}, +*regardless if the level is observed in the row group or not) will be +present when creating detail rows. +Otherwise (the default), only the levels observed +\emph{anywhere in the row group, i.e., within \code{.df_row}} will be present.} + +\item{grp_fun}{(\code{function})\cr analysis function to be used when generating +the "group summary" outer rows.} + +\item{detail_fun}{(\code{function})\cr analysis function to be used when generating +"detail" inner rows.} + +\item{.alt_df_full}{(\code{dataframe})\cr denominator dataset for fraction and +relative risk calculations.\cr +this argument gets populated by the rtables split machinery +(see \link[rtables:additional_fun_params]{rtables::additional_fun_params}).} + +\item{...}{additional arguments passed directly to \code{grp_fun} and \code{detail_fun}.} +} +\value{ +A \code{RowsVerticalSection} object including both the group row and all +detail rows, if applicable, for the facet. +} +\description{ +The analysis function used as an \code{afun} in \link[rtables]{analyze}. +This function simulates a final additional level of nesting with a +traditional analyze call inside it. + +This makes it possible to create what \emph{appear to be} group summary or +content rows and to \emph{optionally or conditionally} generate one or more +"detail" rows underneath it. + +For example, in a disposition table, one might want counts for completed +and ongoing patients with no further detail underneath, but a breakdown of +specific reasons beneath the count of patients who discontinued treatment. +} +\details{ +Both the analysis variable and \code{inner_var} must be factors. +Detail rows are differentiated by having an indent mod of one, causing them +to hang indented under their corresponding group row. +} +\note{ +In its current form, this function may not retain any formatting or +labeling instructions added by \code{grp_fun} or \code{detail_fun}, and it will +override any \code{.indent_mods} values specified by them. This behavior may +change in future versions. +} +\examples{ + +# Example 1 + +lyt_obs_levels <- basic_table() |> + split_cols_by("ARM") |> + split_rows_by("EOSSTT", child_labels = "hidden") |> + analyze("EOSSTT", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "DCSREAS", + drill_down_levs = "DISCONTINUED" + ) + ) + +tbl <- build_table(lyt_obs_levels, ex_adsl) +tbl + +lyt_all_levels <- basic_table() |> + split_cols_by("ARM") |> + split_rows_by("EOSSTT", child_labels = "hidden") |> + analyze("EOSSTT", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "DCSREAS", + drill_down_levs = "DISCONTINUED", + use_all_levels = TRUE + ) + ) + +adsl_subset <- subset(ex_adsl, DCSREAS != "ADVERSE EVENT") +levels(adsl_subset$DCSREAS) + +tbl_all_levels <- build_table(lyt_all_levels, adsl_subset) +tbl_all_levels + +tbl_obs_levels <- build_table(lyt_obs_levels, adsl_subset) +tbl_obs_levels + +# Example 2 + +library(dplyr) + +trtvar <- "ARM" +ctrl_grp <- "B: Placebo" + +adsl <- ex_adsl |> select(c("USUBJID", "STRATA1", "EOSSTT", "DCSREAS", all_of(trtvar))) +adsl$colspan_trt <- factor( + ifelse(adsl[[trtvar]] == ctrl_grp, " ", "Active Study Agent"), + levels = c("Active Study Agent", " ") +) +adsl$rrisk_header <- "Risk Difference (\%) (95\% CI)" +adsl$rrisk_label <- paste(adsl[[trtvar]], paste("vs", ctrl_grp)) + +colspan_trt_map <- create_colspan_map( + df = adsl, + non_active_grp = ctrl_grp, + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = trtvar +) + +a_freq_j_args <- list( + .stats = "count_unique_fraction", + denom = "n_altdf", + ref_path = c("colspan_trt", " ", trtvar, ctrl_grp) +) + +two_tier_args <- list( + grp_fun = a_freq_j, + detail_fun = a_freq_j, + inner_var = "DCSREAS", + drill_down_levs = "DISCONTINUED" +) + +lyt_rrisk <- basic_table() |> + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> + split_cols_by(trtvar) |> + split_cols_by("rrisk_header", nested = FALSE) |> + split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) |> + split_rows_by("STRATA1") |> + split_rows_by("EOSSTT", child_labels = "hidden") |> + analyze("EOSSTT", afun = a_two_tier, extra_args = c(two_tier_args, a_freq_j_args)) + +adsl_subset <- subset( + adsl, + EOSSTT != "COMPLETED" & (is.na(DCSREAS) | DCSREAS != "PROTOCOL VIOLATION") +) + +tbl_rrisk <- build_table(lyt_rrisk, adsl_subset, alt_counts_df = adsl_subset) +tbl_rrisk + +} +\author{ +GB, WW. +} diff --git a/man/analyze_values.Rd b/man/analyze_values.Rd index 67d45314..237e4158 100644 --- a/man/analyze_values.Rd +++ b/man/analyze_values.Rd @@ -22,6 +22,3 @@ Modified layout. \description{ Shortcut Layout Function for Standard Continuous Variable Analysis } -\note{ -This is used in \code{tefmad01} and \code{tefmad03a} e.g. -} diff --git a/man/assert_rbmi.Rd b/man/assert_rbmi.Rd new file mode 100644 index 00000000..93a5609d --- /dev/null +++ b/man/assert_rbmi.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{assert_rbmi} +\alias{assert_rbmi} +\title{Assert that rbmi package is installed} +\usage{ +assert_rbmi() +} +\value{ +Invisible NULL if rbmi is installed +} +\description{ +Checks if the 'rbmi' package is installed and stops with an error message if it's not. +} +\keyword{internal} diff --git a/man/bspt_pruner.Rd b/man/bspt_pruner.Rd index 7a6b63f9..239ad048 100644 --- a/man/bspt_pruner.Rd +++ b/man/bspt_pruner.Rd @@ -15,29 +15,31 @@ bspt_pruner( ) } \arguments{ -\item{fraction}{fraction threshold. Function will keep all records strictly greater +\item{fraction}{(\code{proportion})\cr Fraction threshold. +Function will keep all records strictly greater than this threshold.} -\item{keeprowtext}{Row to be excluded from pruning.} +\item{keeprowtext}{(\code{character})\cr Row to be excluded from pruning.} -\item{reg_expr}{Apply keeprowtext as a regular expression (grepl with fixed = TRUE)} +\item{reg_expr}{(\code{logical})\cr Apply keeprowtext as a regular expression (grepl with fixed = TRUE)} -\item{control}{Control Group} +\item{control}{(\code{character})\cr Control Group} -\item{diff_from_control}{Difference from control threshold.} +\item{diff_from_control}{(\code{numeric})\cr Difference from control threshold.} -\item{only_more_often}{TRUE: Only consider when column pct is more often +\item{only_more_often}{(\code{logical})\cr TRUE: Only consider when column pct is more often than control. FALSE: Also select a row where column pct is less often than control and abs(diff) above threshold} -\item{cols}{column path.} +\item{cols}{(\code{character})\cr Column path.} } \value{ -function that can be utilized as pruning function in prune_table +Function that can be utilized as pruning function in prune_table. } \description{ This is a pruning constructor function which identifies records to be pruned -based on the the fraction from the percentages. In addition to just looking at a fraction within an arm +based on the the fraction from the percentages. In addition to just looking at a +fraction within an arm, this function also allows further flexibility to also prune based on a comparison versus the control arm. } \examples{ diff --git a/man/check_wrap_nobreak.Rd b/man/check_wrap_nobreak.Rd index 534c826c..4a76e0ba 100644 --- a/man/check_wrap_nobreak.Rd +++ b/man/check_wrap_nobreak.Rd @@ -7,16 +7,16 @@ check_wrap_nobreak(tt, colwidths, fontspec) } \arguments{ -\item{tt}{TableTree} +\item{tt}{(\code{TableTree})\cr TableTree object} -\item{colwidths}{numeric. Column widths (in numbers of spaces under \code{fontspec})} +\item{colwidths}{(\code{numeric})\cr Column widths (in numbers of spaces under \code{fontspec})} -\item{fontspec}{font_spec.} +\item{fontspec}{(\code{font_spec})\cr Font specification object} } \value{ \code{TRUE} if the wrap is able to be done without breaking words, -\code{FALSE} if wordbreaking is required to apply \code{colwidths} +\code{FALSE} if wordbreaking is required to apply \code{colwidths}. } \description{ -Check a set of column widths for word-breaking wrap behavior +Check a set of column widths for word-breaking wrap behavior. } diff --git a/man/cmhrms.Rd b/man/cmhrms.Rd new file mode 100644 index 00000000..66de6804 --- /dev/null +++ b/man/cmhrms.Rd @@ -0,0 +1,111 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/cmhrms.R +\name{cmhrms} +\alias{cmhrms} +\alias{a_cmhrms_j} +\alias{s_cmhrms_j} +\alias{a_cmhrms_j_with_exclude} +\title{Cochran-Mantel-Haenszel Row Mean Scores test} +\usage{ +a_cmhrms_j( + df, + .var, + ref_path, + .spl_context, + .ref_group, + .in_ref_col, + .df_row, + ..., + variables, + collapse_combo = TRUE, + .stats = NULL, + .formats = NULL, + .indent_mods = NULL, + .labels = NULL +) + +s_cmhrms_j( + df, + .var, + .ref_group, + .in_ref_col, + ..., + .df_row, + variables, + collapse_combo = FALSE +) + +a_cmhrms_j_with_exclude( + df, + exclude_levels, + .var, + .spl_context, + .ref_group, + .in_ref_col, + .df_row, + ..., + .stats = NULL, + .formats = NULL, + .indent_mods = NULL, + .labels = NULL +) +} +\arguments{ +\item{df}{(\code{data.frame})\cr data set containing all analysis variables.} + +\item{.var}{(\code{string})\cr single variable name that is passed by \code{rtables} when requested +by a statistics function.} + +\item{ref_path}{(\code{character})\cr global reference group specification, see \code{\link[=get_ref_info]{get_ref_info()}}.} + +\item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states +that is passed by \code{rtables}.} + +\item{.ref_group}{(\code{data.frame} or \code{vector})\cr the data corresponding to the reference group.} + +\item{.in_ref_col}{(\code{logical})\cr \code{TRUE} when working with the reference level, \code{FALSE} otherwise.} + +\item{.df_row}{(\code{data.frame})\cr data frame across all of the columns for the given row split.} + +\item{...}{additional arguments for the lower level functions.} + +\item{variables}{(\code{list})\cr list with arm and strata variable names.} + +\item{collapse_combo}{(\code{logical})\cr If TRUE, multiple arm levels from df +will be combined into 1 level.} + +\item{.stats}{(\code{character})\cr statistics to select for the table.} + +\item{.formats}{(named \code{character} or \code{list})\cr formats for the statistics. See Details in \code{analyze_vars} for more +information on the \code{'auto'} setting.} + +\item{.indent_mods}{(named \code{integer})\cr indent modifiers for the labels. Defaults to 0, which corresponds to the +unmodified default behavior. Can be negative.} + +\item{.labels}{(named \code{character})\cr labels for the statistics (without indent).} + +\item{exclude_levels}{(\code{list})\cr A named list where names correspond to split variables +and values are vectors of levels to exclude.} +} +\value{ +\itemize{ +\item \code{s_cmhrms_j} a single element list containing the p-value from row mean score test. +\item \code{a_cmhrms_j} a \code{VerticalRowsSection} object (single row). +} +} +\description{ +See \url{https://psiaims.github.io/CAMIS/Comp/r-sas_cmh.html} for a general comparison +overview between R and SAS. +} +\section{Functions}{ +\itemize{ +\item \code{a_cmhrms_j()}: Formatted analysis function which is used as \code{afun}. + +\item \code{s_cmhrms_j()}: Statistics function for the calculation of the p-value +based upon the row mean scores test. + +\item \code{a_cmhrms_j_with_exclude()}: Wrapper for the \code{afun} which can exclude +row split levels from producing the analysis. These have to be specified in the +\code{exclude_levels} argument, see \code{?do_exclude_split} for details. + +}} diff --git a/man/cmp_cfun.Rd b/man/cmp_cfun.Rd index 8456fd2c..9c11662b 100644 --- a/man/cmp_cfun.Rd +++ b/man/cmp_cfun.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/cmp_functions.R \name{cmp_cfun} \alias{cmp_cfun} -\title{Summary Analysis Function for Compliance Columns (TEFSCNCMP01 e.g.)} +\title{Summary Analysis Function for Compliance Columns} \usage{ cmp_cfun(df, labelstr, .spl_context, variables, formats) } @@ -30,13 +30,6 @@ A simple statistics function which prepares the numbers with percentages in the required format, for use in a split content row. The denominator here is from the expected visits column. } -\details{ -Although this function just returns \code{NULL} it has two uses, for -the \code{tern} users it provides a documentation of arguments that are -commonly and consistently used in the framework. For the developer it adds a -single reference point to import the \code{roxygen} argument description with: -\verb{@inheritParams proposal_argument_convention} -} \seealso{ \code{\link[=cmp_post_fun]{cmp_post_fun()}} for the corresponding split function. } diff --git a/man/cmp_post_fun.Rd b/man/cmp_post_fun.Rd index eeb06b88..29d83947 100644 --- a/man/cmp_post_fun.Rd +++ b/man/cmp_post_fun.Rd @@ -3,7 +3,7 @@ \name{cmp_post_fun} \alias{cmp_post_fun} \alias{cmp_split_fun} -\title{Split Function for Compliance Columns (TEFSCNCMP01 e.g.)} +\title{Split Function for Compliance Columns} \usage{ cmp_post_fun(ret, spl, fulldf, .spl_context) @@ -34,9 +34,6 @@ when creating proportion-based tables with compliance columns. \description{ Here we just split into 3 columns for expected, received and missing visits. } -\note{ -This split function is used in the proportion table TEFSCNCMP01 and similar ones. -} \seealso{ \code{\link[rtables:make_split_fun]{rtables::make_split_fun()}} describing the requirements for this kind of post-processing function. diff --git a/man/colspan_map.Rd b/man/colspan_map.Rd index 53d34264..060a1e82 100644 --- a/man/colspan_map.Rd +++ b/man/colspan_map.Rd @@ -15,33 +15,35 @@ create_colspan_map( ) } \arguments{ -\item{df}{The name of the data frame in which the spanning variable is to be appended to} +\item{df}{(\code{data.frame})\cr The name of the data frame in which the spanning variable is to be appended to} -\item{non_active_grp}{The value(s) of the treatments that represent the non-active or comparator +\item{non_active_grp}{(\code{character})\cr The value(s) of the treatments that represent the non-active or comparator treatment groups default value = c('Placebo')} -\item{non_active_grp_span_lbl}{The assigned value of the spanning variable for the non-active or comparator +\item{non_active_grp_span_lbl}{(\code{character})\cr The assigned value of the spanning +variable for the non-active or comparator treatment groups default value = ''} -\item{active_grp_span_lbl}{The assigned value of the spanning variable for the active treatment group(s) +\item{active_grp_span_lbl}{(\code{character})\cr The assigned value of the spanning +variable for the active treatment group(s) default value = 'Active Study Agent'} -\item{colspan_var}{The desired name of the newly created spanning variable +\item{colspan_var}{(\code{character})\cr The desired name of the newly created spanning variable default value = 'colspan_trt'} -\item{trt_var}{The name of the treatment variable that is used to determine which +\item{trt_var}{(\code{character})\cr The name of the treatment variable that is used to determine which spanning treatment group value to apply. default value = 'TRT01A'} -\item{active_first}{whether the active columns come first.} +\item{active_first}{(\code{logical})\cr whether the active columns come first.} } \value{ -a data frame that contains the map to be used with rtables split function \code{trim_levels_to_map} +A data frame that contains the map to be used with rtables split function \code{trim_levels_to_map}. } \description{ -A function used for creating a data frame containing the map that is compatible with rtables split function +A function used for creating a data frame containing the map that is compatible with rtables split function. \code{trim_levels_to_map} } \details{ diff --git a/man/colspan_var.Rd b/man/colspan_var.Rd index 59cf9cb3..58f6dbfa 100644 --- a/man/colspan_var.Rd +++ b/man/colspan_var.Rd @@ -14,31 +14,33 @@ create_colspan_var( ) } \arguments{ -\item{df}{The name of the data frame in which the spanning variable is to be appended to} +\item{df}{(\code{data.frame})\cr The name of the data frame in which the spanning variable is to be appended to} -\item{non_active_grp}{The value(s) of the treatments that represent the non-active or comparator +\item{non_active_grp}{(\code{character})\cr The value(s) of the treatments that represent the non-active or comparator treatment groups default value = c('Placebo')} -\item{non_active_grp_span_lbl}{The assigned value of the spanning variable for the non-active or comparator +\item{non_active_grp_span_lbl}{(\code{character})\cr The assigned value of the spanning +variable for the non-active or comparator treatment groups default value = ''} -\item{active_grp_span_lbl}{The assigned value of the spanning variable for the active treatment group(s) +\item{active_grp_span_lbl}{(\code{character})\cr The assigned value of the spanning +variable for the active treatment group(s) default value = 'Active Study Agent'} -\item{colspan_var}{The desired name of the newly created spanning variable +\item{colspan_var}{(\code{character})\cr The desired name of the newly created spanning variable default value = 'colspan_trt'} -\item{trt_var}{The name of the treatment variable that is used to determine which +\item{trt_var}{(\code{character})\cr The name of the treatment variable that is used to determine which spanning treatment group value to apply. default value = 'TRT01A'} } \value{ -a data frame that contains the new variable as specified in colspan_var +A data frame that contains the new variable as specified in colspan_var. } \description{ -A function used for creating a spanning variable for treatment groups +A function used for creating a spanning variable for treatment groups. } \details{ This function creates a spanning variable for treatment groups that is intended to diff --git a/man/column_stats.Rd b/man/column_stats.Rd index d7de96e7..ce1b5a95 100644 --- a/man/column_stats.Rd +++ b/man/column_stats.Rd @@ -12,23 +12,24 @@ column_stats( ) } \arguments{ -\item{exclude_visits}{Vector of visit(s) for which you do not want the statistics displayed +\item{exclude_visits}{(\verb{character vector})\cr Vector of visit(s) for which you do not want the statistics displayed in the baseline mean or change from baseline sections of the table.} -\item{var_names}{Vector of variable names to use instead of the default AVAL, CHG, BASE. +\item{var_names}{(\verb{character vector})\cr Vector of variable names to use instead of the default AVAL, CHG, BASE. The first two elements are treated as main variables with full statistics, and the third element is treated as the base variable. By default, the function expects these specific variable names in your data, but you can customize them to match your dataset's column names.} -\item{stats}{A list with two components, \code{main} and \code{base}, that define the statistics to be calculated -for the main variables (default: AVAL, CHG) and the base variable (default: BASE). -Default for main variables: c(N = "N", mean = "Mean", SD = "SD", SE = "SE", Med = "Med", Min = "Min", Max = "Max") -Default for base variable: c(mean = "Mean") +\item{stats}{(\code{list})\cr A list with two components, \code{main} and \code{base}, that define the statistics to be calculated +for the main variables (default: AVAL, CHG) and the base variable (default: BASE).\cr +Default for main variables: c(N = "N", mean = "Mean", SD = "SD", SE = "SE", +Med = "Med", Min = "Min", Max = "Max").\cr +Default for base variable: c(mean = "Mean").\cr You can customize these statistics by providing your own named vectors in the list. The names are used internally for calculations, and the values are used as display labels in the table.} } \value{ -an analysis function (for use with \link[rtables:analyze]{rtables::analyze}) implementing +An analysis function (for use with \link[rtables:analyze]{rtables::analyze}) implementing the specified statistics. } \description{ diff --git a/man/complex_scoring_function.Rd b/man/complex_scoring_function.Rd index e861196f..52cad397 100644 --- a/man/complex_scoring_function.Rd +++ b/man/complex_scoring_function.Rd @@ -13,35 +13,45 @@ jj_complex_scorefun( ) } \arguments{ -\item{spanningheadercolvar}{name of spanning header variable that defines the active treatment columns. +\item{spanningheadercolvar}{(\code{character})\cr +Name of spanning header variable that defines the active treatment columns. If you do not have an active treatment spanning header column then user can define this as NA.} -\item{usefirstcol}{This allows you to just use the first column of the table to sort on.} +\item{usefirstcol}{(\code{logical})\cr +This allows you to just use the first column of the table to sort on.} -\item{colpath}{name of column path that is needed to sort by (default=NULL). +\item{colpath}{(\code{character})\cr +Name of column path that is needed to sort by (default=NULL). This overrides other arguments if specified -(except firstcat and lastcat which will be applied if requested on this colpath)} +(except firstcat and lastcat which will be applied if requested on this colpath).} -\item{firstcat}{If you wish to put any category at the top of the list despite any n's user can specify here.} +\item{firstcat}{(\code{logical})\cr +If you wish to put any category at the top of the list despite any n's, user can specify it here.} -\item{lastcat}{If you wish to put any category at the bottom of the list despite any n's user can specify here.} +\item{lastcat}{(\code{logical})\cr +If you wish to put any category at the bottom of the list despite any n's, user can specify it here.} } \value{ -a function which can be used as a score function (scorefun in \code{sort_at_path}). +A function which can be used as a score function (scorefun in \code{sort_at_path}). } \description{ A function used for sorting AE tables (and others) as required. } \details{ This sort function sorts as follows: -Takes all the columns from a specified spanning column header (default= colspan_trt) and sorts by the last treatment +\itemize{ +\item Takes all the columns from a specified spanning column header (default= colspan_trt) +and sorts by the last treatment column within this. -If no spanning column header variable exists (e.g you have only one active treatment arm and have decided to -remove the spanning header from your layout) it will sort by the first treatment column in your table. -This function is not really designed for tables that have sub-columns, however if users wish to override any -default sorting behavior, they can simply specify their own colpath to use for sorting on (default=NULL) +\item If no spanning column header variable exists (e.g you have only one active treatment arm and have decided to +remove the spanning header from your layout), it will sort by the first treatment column in your table. +} + +This function is not really designed for tables that have sub-columns. However, if users wish to override any +default sorting behavior, they can simply specify their own colpath to use for sorting on (default = NULL) } \examples{ +library(dplyr) ADAE <- data.frame( USUBJID = c( "XXXXX01", "XXXXX02", "XXXXX03", "XXXXX04", "XXXXX05", @@ -83,6 +93,8 @@ colspan_trt_map <- create_colspan_map(ADAE, ref_path <- c("colspan_trt", " ", "TRT01A", "Placebo") +ADSL <- unique(ADAE |> select(USUBJID, "colspan_trt", "rrisk_header", "rrisk_label", "TRT01A")) + lyt <- basic_table() |> split_cols_by( "colspan_trt", @@ -132,7 +144,7 @@ lyt <- basic_table() |> ) ) -result <- build_table(lyt, ADAE) +result <- build_table(lyt, ADAE, alt_counts_df = ADSL) result diff --git a/man/cond_rm_facets.Rd b/man/cond_rm_facets.Rd index fa847837..9ec63d52 100644 --- a/man/cond_rm_facets.Rd +++ b/man/cond_rm_facets.Rd @@ -16,13 +16,13 @@ cond_rm_facets( ) } \arguments{ -\item{facets}{character or NULL. Vector of facet names to be removed +\item{facets}{(\code{character} or NULL)\cr Vector of facet names to be removed if condition(s) are met} -\item{facets_regex}{character(1). Regular expression to identify facet +\item{facets_regex}{(\code{character})\cr Regular expression to identify facet names to be removed if condition(s) are met.} -\item{ancestor_pos}{numeric(1). Row in spl_context to check the condition +\item{ancestor_pos}{(\code{numeric})\cr Row in spl_context to check the condition within. E.g., 1 represents the first split, 2 represents the second split nested within the first, etc. NA specifies that the conditions should be checked at all split levels. Negative integers indicate position @@ -30,30 +30,30 @@ counting back from the current one, e.g., -1 indicates the direct parent (most recent split before this one). Negative and positive/NA positions cannot be mixed.} -\item{split}{character(1) or NULL. If specified, name of the split +\item{split}{(\code{character} or NULL)\cr If specified, name of the split at position \code{ancestor_pos} must be identical to this value for the removal condition to be met.} -\item{split_regex}{character(1) or NULL. If specified, a regular expression +\item{split_regex}{(\code{character} or NULL)\cr If specified, a regular expression the name of the split at position \code{ancestor_pos} must match for the removal condition to be met. Cannot be specified at the same time as \code{split}.} -\item{value}{character(1) or NULL. If specified, split (facet) value +\item{value}{(\code{character} or NULL)\cr If specified, split (facet) value at position \code{ancestor_pos} must be identical to this value for removal condition to be met.} -\item{value_regex}{character(1) or NULL. If specified, a regular expression +\item{value_regex}{(\code{character} or NULL)\cr If specified, a regular expression the value of the split at position \code{ancestor_pos} must match for the removal condition to be met. Cannot be specified at the same time as \code{value}.} -\item{keep_matches}{logical(1). Given the specified condition is met, +\item{keep_matches}{(\code{logical})\cr Given the specified condition is met, should the facets removed be those matching \code{facets}/\code{facets_regex} (\code{FALSE}, the default), or those \emph{not} matching (\code{TRUE}).} } \value{ -a function suitable for use in \code{make_split_fun}'s +A function suitable for use in \code{make_split_fun}'s \code{post} argument which encodes the specified condition. } \description{ diff --git a/man/count_denom_fraction.Rd b/man/count_denom_fraction.Rd deleted file mode 100644 index b8a50633..00000000 --- a/man/count_denom_fraction.Rd +++ /dev/null @@ -1,34 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/jjcsformats.R -\name{jjcsformat_count_denom_fraction} -\alias{jjcsformat_count_denom_fraction} -\title{Formatting count, denominator and fraction values} -\usage{ -jjcsformat_count_denom_fraction(x, d = 1, roundmethod = c("sas", "iec"), ...) -} -\arguments{ -\item{x}{\code{numeric}\cr with elements \code{num} and \code{fraction} or \code{num}, \code{denom} and \code{fraction}.} - -\item{d}{numeric(1). Number of digits to round fraction to (default=1)} - -\item{roundmethod}{(\code{string})\cr choice of rounding methods. Options are: -\itemize{ -\item \code{sas}: the underlying rounding method is \code{tidytlg::roundSAS}, where \cr -roundSAS comes from this Stack Overflow post https://stackoverflow.com/questions/12688717/round-up-from-5 -\item \code{iec}: the underlying rounding method is \code{round} -}} - -\item{...}{Additional arguments passed to other methods.} -} -\value{ -\code{x}, formatted into a string with the appropriate -format and \code{d} digits of precision. -} -\description{ -Formatting count, denominator and fraction values -} -\examples{ -jjcsformat_count_denom_fraction(c(7, 10, 0.7)) -jjcsformat_count_denom_fraction(c(70000, 70001, 70000 / 70001)) -jjcsformat_count_denom_fraction(c(235, 235, 235 / 235)) -} diff --git a/man/count_fraction.Rd b/man/count_fraction.Rd index 6fece097..a41deb8b 100644 --- a/man/count_fraction.Rd +++ b/man/count_fraction.Rd @@ -1,46 +1,75 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/jjcsformats.R -\name{count_fraction} -\alias{count_fraction} +\name{count and fraction related formatting functions} +\alias{count and fraction related formatting functions} +\alias{jjcsformat_cnt_den_fract_fct} \alias{jjcsformat_count_fraction} -\title{Formatting count and fraction values} +\alias{jjcsformat_count_denom_fraction} +\alias{jjcsformat_fraction_count_denom} +\title{Formatting functions for count and fraction, and for count denominator and fraction values} \usage{ -jjcsformat_count_fraction(x, d = 1, roundmethod = c("sas", "iec"), ...) +jjcsformat_cnt_den_fract_fct( + d = 1, + type = c("count_fraction", "count_denom_fraction", "fraction_count_denom"), + verbose = FALSE +) + +jjcsformat_count_fraction(x, round_type = valid_round_type, output, ...) + +jjcsformat_count_denom_fraction(x, round_type = valid_round_type, output, ...) + +jjcsformat_fraction_count_denom(x, round_type = valid_round_type, output, ...) } \arguments{ -\item{x}{\code{numeric}\cr with elements \code{num} and \code{fraction} or \code{num}, \code{denom} and \code{fraction}.} +\item{d}{(\code{numeric(1)})\cr Number of digits to round fraction to (default = 1)} + +\item{type}{(\verb{character(1})\cr One of \code{count_fraction}, \code{count_denom_fraction}, \code{fraction_count_denom}, +to specify the type of format the function will represent.} -\item{d}{numeric(1). Number of digits to round fraction to (default=1)} +\item{verbose}{(\code{logical})\cr Whether to print verbose output} -\item{roundmethod}{(\code{string})\cr choice of rounding methods. Options are: -\itemize{ -\item \code{sas}: the underlying rounding method is \code{tidytlg::roundSAS}, where \cr -roundSAS comes from this Stack Overflow post https://stackoverflow.com/questions/12688717/round-up-from-5 -\item \code{iec}: the underlying rounding method is \code{round} -}} +\item{x}{(\verb{numeric vector})\cr Vector with elements \code{num} and \code{fraction} or \code{num}, \code{denom} and \code{fraction}.} + +\item{round_type}{(\code{character(1)})\cr the type of rounding to perform. +See \code{\link[formatters:format_value]{formatters::format_value()}} for more details.} + +\item{output}{(\code{string})\cr output type. +See \code{\link[formatters:format_value]{formatters::format_value()}} for more details.} \item{...}{Additional arguments passed to other methods.} } \value{ -A string in the format \verb{count / denom (ratio percent)}. If \code{count} +A formatting function to format input into string in the format \verb{count / denom (ratio percent)}. If \code{count} is 0, the format is \code{0}. If fraction is >0.99, the format is \verb{count / denom (>99.9 percent)} } \description{ Formats a count together with fraction (and/or denominator) with special consideration when count is 0, or fraction is 1. -\cr See also: tern::format_count_fraction_fixed_dp() +\cr See also: \code{\link[tern:format_count_fraction_fixed_dp]{tern::format_count_fraction_fixed_dp()}} } \examples{ + jjcsformat_count_fraction(c(7, 0.7)) -jjcsformat_count_fraction(c(70000, 0.9999999)) -jjcsformat_count_fraction(c(70000, 1)) +jjcsformat_count_fraction(c(70000, 70000 / 70001)) +jjcsformat_count_fraction(c(235, 235 / 235)) +fmt <- jjcsformat_cnt_den_fract_fct(type = "count_fraction", d = 2) +fmt(c(23, 23 / 235)) + +jjcsformat_count_denom_fraction(c(7, 10, 0.7)) +jjcsformat_count_denom_fraction(c(70000, 70001, 70000 / 70001)) +jjcsformat_count_denom_fraction(c(235, 235, 235 / 235)) +fmt <- jjcsformat_cnt_den_fract_fct(type = "count_denom_fraction", d = 2) +fmt(c(23, 235, 23 / 235)) +jjcsformat_fraction_count_denom(c(7, 10, 0.7)) +jjcsformat_fraction_count_denom(c(70000, 70001, 70000 / 70001)) +jjcsformat_fraction_count_denom(c(235, 235, 235 / 235)) +fmt <- jjcsformat_cnt_den_fract_fct(type = "fraction_count_denom", d = 2) +fmt(c(23, 235, 23 / 235)) } \seealso{ -Other JJCS formats: -\code{\link{format_xx_fct}()}, -\code{\link{jjcsformat_pval_fct}()}, -\code{\link{jjcsformat_range_fct}()} +Other JJCS formatting functions: +\code{\link{jjcsformat_xx}()} } -\concept{JJCS formats} +\concept{JJCS formatting functions} diff --git a/man/count_pruner.Rd b/man/count_pruner.Rd index a1050b2d..9c884f02 100644 --- a/man/count_pruner.Rd +++ b/man/count_pruner.Rd @@ -12,17 +12,17 @@ count_pruner( ) } \arguments{ -\item{count}{count threshold. Function will keep all records strictly greater +\item{count}{(\code{numeric})\cr count threshold. Function will keep all records strictly greater than this threshold.} -\item{cat_include}{Category to be considered for pruning} +\item{cat_include}{(\code{character})\cr Category to be considered for pruning} -\item{cat_exclude}{logical Category to be excluded from pruning} +\item{cat_exclude}{(\code{character})\cr Category to be excluded from pruning} -\item{cols}{column path (character or integer (column indices))} +\item{cols}{(\code{character})\cr column path (character or integer (column indices))} } \value{ -function that can be utilized as pruning function in prune_table +Function that can be utilized as pruning function in prune_table. } \description{ This is a pruning constructor function which identifies records to be pruned @@ -30,7 +30,6 @@ based on the count (assumed to be the first statistic displayed when a compound statistic (e.g., ## / ## (XX.X percent) is presented). } \examples{ - ADSL <- data.frame( USUBJID = c( "XXXXX01", "XXXXX02", "XXXXX03", "XXXXX04", "XXXXX05", @@ -79,5 +78,4 @@ result <- prune_table( ) result - } diff --git a/man/coxph_hr.Rd b/man/coxph_hr.Rd index 9fa7704c..6f4ebc3d 100644 --- a/man/coxph_hr.Rd +++ b/man/coxph_hr.Rd @@ -67,9 +67,11 @@ unmodified default behavior. Can be negative.} should be displayed.} } \value{ -for \code{s_coxph_hr} a list containing the same statistics returned by \link[tern:survival_coxph_pairwise]{tern::s_coxph_pairwise} -and the additional \code{lr_stat_df} statistic. for \code{a_coxph_hr}, a \code{VerticalRowsSection} -object. +\itemize{ +\item \code{s_coxph_hr} returns a list containing the same statistics returned by +\link[tern:survival_coxph_pairwise]{tern::s_coxph_pairwise} and the additional \code{lr_stat_df} statistic. +\item \code{a_coxph_hr} returns a \code{VerticalRowsSection} object. +} } \description{ This is a workaround for \code{\link[tern:survival_coxph_pairwise]{tern::s_coxph_pairwise()}}, which adds a statistic @@ -80,10 +82,8 @@ containing the hazard ratio estimate together with the confidence interval. \item \code{a_coxph_hr()}: Formatted analysis function which is used as \code{afun}. \item \code{s_coxph_hr()}: Statistics function forked from \code{\link[tern:survival_coxph_pairwise]{tern::s_coxph_pairwise()}}. -the difference is that: -\enumerate{ -\item It returns the additional statistic \code{lr_stat_df} (log rank statistic with degrees of freedom). -} +The difference is that it returns the additional statistic \code{lr_stat_df} +(log rank statistic with degrees of freedom). }} \examples{ diff --git a/man/d_test_proportion_diff_j.Rd b/man/d_test_proportion_diff_j.Rd deleted file mode 100644 index 13f21a25..00000000 --- a/man/d_test_proportion_diff_j.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/test_proportion_diff.R -\name{d_test_proportion_diff_j} -\alias{d_test_proportion_diff_j} -\title{Description of the difference test between two proportions} -\usage{ -d_test_proportion_diff_j(method, alternative) -} -\arguments{ -\item{method}{(\code{string})\cr one of \code{chisq}, \code{cmh}, \code{fisher}; specifies the test used -to calculate the p-value.} - -\item{alternative}{(\code{string})\cr whether \code{two.sided}, or one-sided \code{less} or \code{greater} p-value -should be displayed.} -} -\value{ -A \code{string} describing the test from which the p-value is derived. -} -\description{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} - -This is an auxiliary function that describes the analysis in \code{s_test_proportion_diff}. -} diff --git a/man/def_colwidths.Rd b/man/def_colwidths.Rd index d9380ba4..551e98d6 100644 --- a/man/def_colwidths.Rd +++ b/man/def_colwidths.Rd @@ -41,19 +41,23 @@ which corresponds to landscape orientation on a standard page after margins.} \item{verbose}{(\code{logical(1)})\cr Should additional information messages be displayed during the calculation of the column widths? Defaults to \code{FALSE}.} -\item{tt}{input Tabletree} +\item{tt}{input TableTree} \item{label_width_ins}{Label Width in Inches.} -\item{type}{Type of the table tree, used to determine column width calculation method.} +\item{type}{Type of the TableTree, used to determine column width calculation method.} } \value{ -A vector of column widths suitable to use in \code{tt_to_tlgrtf} and +\itemize{ +\item \code{listing_column_widths}: a vector of column widths suitable to use in \code{tt_to_tlgrtf} and other exporters. +} -a vector of column widths (including the label row pseudo-column in the table +\itemize{ +\item \code{def_colwidths}: a vector of column widths (including the label row pseudo-column in the table case) suitable for use rendering \code{tt} in the specified font. } +} \description{ \code{def_colwidths} uses heuristics to determine suitable column widths given a table or listing, and a font. diff --git a/man/do_exclude_split.Rd b/man/do_exclude_split.Rd new file mode 100644 index 00000000..a2572951 --- /dev/null +++ b/man/do_exclude_split.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/split_functions.R +\name{do_exclude_split} +\alias{do_exclude_split} +\title{Predicate to Check if Split Should be Excluded} +\usage{ +do_exclude_split(exclude_levels, .spl_context) +} +\arguments{ +\item{exclude_levels}{(\code{list})\cr A named list where names correspond to split variables +and values are vectors of levels to exclude.} + +\item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states +that is passed by \code{rtables}.} +} +\value{ +\code{TRUE} if the current split context matches any of the exclude levels, +\code{FALSE} otherwise. +} +\description{ +Predicate to Check if Split Should be Excluded +} +\examples{ + +do_exclude_split( + exclude_levels = list(AVISIT = "Baseline"), + .spl_context = data.frame( + split = c("AVISIT", "ARM"), + value = c("Week 4", "Placebo") + ) +) +do_exclude_split( + exclude_levels = list(AVISIT = "Baseline"), + .spl_context = data.frame( + split = c("AVISIT", "ARM"), + value = c("Baseline", "Placebo") + ) +) +} diff --git a/man/event_free.Rd b/man/event_free.Rd index f192bb3f..2dea07cd 100644 --- a/man/event_free.Rd +++ b/man/event_free.Rd @@ -56,13 +56,14 @@ unmodified default behavior. Can be negative.} \item{control}{(\code{list})\cr relevant list of control options.} } \value{ -for \code{s_event_free}, a list as returned by the \code{\link[tern:survival_timepoint]{tern::s_surv_timepoint()}} +\itemize{ +\item \code{s_event_free} returns a list as returned by the \code{\link[tern:survival_timepoint]{tern::s_surv_timepoint()}} with an additional three-dimensional statistic \code{event_free_ci} which combines the \code{event_free_rate} and \code{rate_ci} statistics. - -For \code{a_event_free}, analogous to \link[tern:survival_timepoint]{tern::a_surv_timepoint} but with the additional +\item \code{a_event_free} is analogous to \link[tern:survival_timepoint]{tern::a_surv_timepoint} but with the additional three-dimensional statistic described above available via \code{.stats}. } +} \description{ This is a workaround for \code{\link[tern:survival_timepoint]{tern::s_surv_timepoint()}}, which adds a statistic containing the time point specific survival estimate together with the diff --git a/man/export_as_docx_j.Rd b/man/export_as_docx_j.Rd new file mode 100644 index 00000000..7c42e2d6 --- /dev/null +++ b/man/export_as_docx_j.Rd @@ -0,0 +1,119 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/docx_exporter_functions.R +\name{export_as_docx_j} +\alias{export_as_docx_j} +\title{Export a VTableTree or a listing_df object into docx} +\usage{ +export_as_docx_j( + tt, + tblid, + output_dir, + theme = theme_docx_default_j(font = "Times New Roman", font_size = 9L, bold = NULL), + add_page_break = FALSE, + titles_as_header = TRUE, + integrate_footers = TRUE, + section_properties = officer::prop_section(page_size = officer::page_size(width = 11, + height = 8.5, orient = orientation), page_margins = officer::page_mar(bottom = 1, top + = 1, right = 1, left = 1, gutter = 0, footer = 1, header = 1)), + doc_metadata = NULL, + template_file = system.file("template_file.docx", package = "junco"), + orientation = "portrait", + paginate = FALSE, + nosplitin = character(), + string_map = junco::default_str_map, + markup_df_docx = dps_markup_df_docx, + combined_docx = FALSE, + tlgtype = (utils::getFromNamespace("tlg_type", "junco"))(tt), + col_gap = ifelse(tlgtype == "Listing", 0.5, 3), + pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE), + round_type = formatters::obj_round_type(tt), + alignments = list(), + border = flextable::fp_border_default(width = 0.75, color = "black"), + border_mat = make_header_bordmat(obj = tt), + watermark = FALSE, + ... +) +} +\arguments{ +\item{tt}{a VTableTree or a listing_df object to export.} + +\item{tblid}{Character. Output ID to be displayed in the Title and last line of footer.} + +\item{output_dir}{a directory path to save the docx.} + +\item{theme}{(optional) a function factory. See theme_docx_default_j() +or rtables.officer::theme_docx_default() for more details.} + +\item{add_page_break}{(optional) Default = FALSE.} + +\item{titles_as_header}{(optional) Default = TRUE.} + +\item{integrate_footers}{(optional) Default = TRUE.} + +\item{section_properties}{(optional). A "prop_section" object containing +information about page size, orientation, margins, etc. +See officer::prop_section() for more details. +No need to be specified by end user.} + +\item{doc_metadata}{(optional). Default = NULL.} + +\item{template_file}{(optional). Default = "doc/template_file.docx". +Paragraph styles are inherited from this file.} + +\item{orientation}{(optional) Default = "portrait". +One of: "portrait", "landscape".} + +\item{paginate}{(optional) Default = FALSE.} + +\item{nosplitin}{(optional) Default = character(). Named list.} + +\item{string_map}{(optional) Default = default_str_map.} + +\item{markup_df_docx}{(optional) Default = dps_markup_df_docx.} + +\item{combined_docx}{(optional). Default = FALSE. Whether to also export an "allparts" +docx version.} + +\item{tlgtype}{(optional). No need to be specified by end user.} + +\item{col_gap}{(optional). Default = 3 (Tables) or 0.5 (Listings).} + +\item{pagenum}{(optional). Whether to display page numbers. Only applicable +to listings (i.e. for tables and figures this argument is ignored).} + +\item{round_type}{(\code{"iec"} or \code{"sas"})\cr the type of rounding to perform. iec, +the default, performs rounding compliant with IEC 60559, while +sas performs nearest-value rounding consistent with rounding within SAS. +See \verb{[formatters::format_value()]} for more details.} + +\item{alignments}{(\code{list})\cr List of named lists. Vectorized. +(Default = \code{list()}) Used to specify individual column or cell alignments. +Each named list contains \code{row}, \code{col}, and \code{value}.} + +\item{border}{(optional) an \code{fp_border} object.} + +\item{border_mat}{(\code{matrix})\cr A \verb{m x k} matrix where m is the number of columns of \code{tt} +and k is the number of lines the header takes up. See \link[tidytlg:add_bottom_borders]{tidytlg::add_bottom_borders} +for what the matrix should contain. Users should only specify this when the +default behavior does not meet their needs.} + +\item{watermark}{(\code{logical})\cr whether to display the watermark "Confidential". +By default, this is set to FALSE. In the future, this argument will be the +actual watermark (i.e. a string) to display.} + +\item{...}{other parameters.} +} +\description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} + +This function is based on \code{\link[rtables.officer:export_as_docx]{rtables.officer::export_as_docx()}}. +See notes to understand why this is experimental. +} +\note{ +This function has been tested for common use cases but may not work or have +unexpected or undesired behavior in corner cases. As such it is not considered +fully production ready and is being made available for further testing +and early adoption. Please report any issues you encounter to the developers. +This function may be removed from junco in the future if the functionality +is merged into \code{rtables.officer}. +} diff --git a/man/export_graph_as_docx.Rd b/man/export_graph_as_docx.Rd new file mode 100644 index 00000000..aaa6aad7 --- /dev/null +++ b/man/export_graph_as_docx.Rd @@ -0,0 +1,68 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/docx_exporter_functions.R +\name{export_graph_as_docx} +\alias{export_graph_as_docx} +\title{export_graph_as_docx} +\usage{ +export_graph_as_docx( + g = NULL, + plotnames = NULL, + tblid, + output_dir, + title = NULL, + footers = NULL, + orientation = "portrait", + plotwidth = 8, + plotheight = 5.51, + units = c("in", "cm", "mm", "px")[1], + border = flextable::fp_border_default(width = 0.75, color = "black") +) +} +\arguments{ +\item{g}{(optional) Default = NULL. A \code{ggplot2} object, or a list +of them, to export. At least one of \code{g} or \code{plotnames} must be provided. +If both are provided, 'g' precedes and 'plotnames' will be ignored.} + +\item{plotnames}{(optional) Default = NULL. A file path, or a list of them, +to previously saved .png files. These will be opened and +exported in the output file. At least one of \code{g} or \code{plotnames} must be provided. +If both are provided, 'g' precedes and 'plotnames' will be ignored.} + +\item{tblid}{Character. Output ID that will appear in the Title and footer.} + +\item{output_dir}{Character. File path where to save the output.} + +\item{title}{(optional) Default = NULL. Character, or list of them, +with the titles to be displayed.} + +\item{footers}{(optional) Default = NULL. Character, or list of them, +with the footers to be displayed.} + +\item{orientation}{(optional) Default = "portrait". +One of: "portrait", "landscape".} + +\item{plotwidth}{(optional) Default = 8. Plot size in units expressed by +the units argument. If not supplied, uses the size of the current graphics device.} + +\item{plotheight}{(optional) Default = 5.51. Plot size in units expressed by +the units argument. If not supplied, uses the size of the current graphics device.} + +\item{units}{(optional) Default = "in". One of the following units in which the +plotwidth and plotheight arguments are expressed: "in", "cm", "mm" or "px".} + +\item{border}{(optional). An \code{fp_border} object to use as borders for the Title +and Footers.} +} +\description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} + +Export graph in DOCX format. See notes to understand why this is experimental. +} +\note{ +This function has been tested for common use cases but may not work or have +unexpected or undesired behavior in corner cases. As such it is not considered +fully production ready and is being made available for further testing +and early adoption. Please report any issues you encounter to the developers. +This function may be removed from junco in the future if the functionality +is merged into \code{rtables.officer}. +} diff --git a/man/find_missing_chg_after_avisit.Rd b/man/find_missing_chg_after_avisit.Rd index ccc4c789..f83149ea 100644 --- a/man/find_missing_chg_after_avisit.Rd +++ b/man/find_missing_chg_after_avisit.Rd @@ -14,7 +14,7 @@ A string with either the factor level after which \code{AVISIT} is all missing, or \code{NA}. } \description{ -Helper for Finding AVISIT after which CHG are all Missing +Helper for Finding AVISIT after which CHG are all Missing. } \examples{ df <- data.frame( diff --git a/man/fit_ancova.Rd b/man/fit_ancova.Rd index 7a98b615..a4bfe9b2 100644 --- a/man/fit_ancova.Rd +++ b/man/fit_ancova.Rd @@ -50,7 +50,7 @@ The attribute \code{weights} savse the settings used (\code{weights_emmeans}). } } \description{ -Does the \code{ANCOVA} analysis, separately for each visit. +Performs the \code{ANCOVA} analysis, separately for each visit. } \examples{ library(mmrm) diff --git a/man/format_xx_fct.Rd b/man/format_xx_fct.Rd deleted file mode 100644 index 55ea1bc3..00000000 --- a/man/format_xx_fct.Rd +++ /dev/null @@ -1,49 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/jjcsformats.R -\name{format_xx_fct} -\alias{format_xx_fct} -\title{Function factory for xx style formatting} -\usage{ -format_xx_fct( - roundmethod = c("sas", "iec"), - na_str_dflt = "NE", - replace_na_dflt = TRUE -) -} -\arguments{ -\item{roundmethod}{(\code{string})\cr choice of rounding methods. Options are: -\itemize{ -\item \code{sas}: the underlying rounding method is \code{tidytlg::roundSAS}, where \cr -roundSAS comes from this Stack Overflow post https://stackoverflow.com/questions/12688717/round-up-from-5 -\item \code{iec}: the underlying rounding method is \code{round} -}} - -\item{na_str_dflt}{Character to represent NA value} - -\item{replace_na_dflt}{logical(1). Should an \code{na_string} of "NA" within -the formatters framework be overridden by \code{na_str_default}? Defaults to -\code{TRUE}, as a way to have a different default na string behavior from the -base \code{formatters} framework.} -} -\value{ -\code{format_xx_fct()} format function that can be used in rtables formatting calls -} -\description{ -A function factory to generate formatting functions for value -formatting that support the xx style format and control the rounding method -} -\examples{ -jjcsformat_xx_SAS <- format_xx_fct(roundmethod = "sas") -jjcsformat_xx <- jjcsformat_xx_SAS -rcell(c(1.453), jjcsformat_xx("xx.xx")) -rcell(c(), jjcsformat_xx("xx.xx")) -rcell(c(1.453, 2.45638), jjcsformat_xx("xx.xx (xx.xxx)")) - -} -\seealso{ -Other JJCS formats: -\code{\link{count_fraction}}, -\code{\link{jjcsformat_pval_fct}()}, -\code{\link{jjcsformat_range_fct}()} -} -\concept{JJCS formats} diff --git a/man/fraction_count_denom.Rd b/man/fraction_count_denom.Rd deleted file mode 100644 index f3b9521e..00000000 --- a/man/fraction_count_denom.Rd +++ /dev/null @@ -1,41 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/jjcsformats.R -\name{jjcsformat_fraction_count_denom} -\alias{jjcsformat_fraction_count_denom} -\title{Formatting fraction, count and denominator values} -\usage{ -jjcsformat_fraction_count_denom(x, d = 1, roundmethod = c("sas", "iec"), ...) -} -\arguments{ -\item{x}{\code{numeric}\cr with elements \code{num} and \code{fraction} or \code{num}, \code{denom} and \code{fraction}.} - -\item{d}{numeric(1). Number of digits to round fraction to (default=1)} - -\item{roundmethod}{(\code{string})\cr choice of rounding methods. Options are: -\itemize{ -\item \code{sas}: the underlying rounding method is \code{tidytlg::roundSAS}, where \cr -roundSAS comes from this Stack Overflow post https://stackoverflow.com/questions/12688717/round-up-from-5 -\item \code{iec}: the underlying rounding method is \code{round} -}} - -\item{...}{Additional arguments passed to other methods.} -} -\value{ -\code{x} formatted as a string with \code{d} digits of precision, -with special cased values as described in Details above. -} -\description{ -Formatting fraction, count and denominator values -} -\details{ -Formats a 3-dimensional value such that percent values -near 0 or 100\% are formatted as .e.g, \code{"<0.1\%"} and -\code{">99.9\%"}, where the cutoff is controlled by \code{d}, and -formatted as \code{"xx.x\% (xx/xx)"} otherwise, with the -precision of the percent also controlled by \code{d}. -} -\examples{ -jjcsformat_fraction_count_denom(c(7, 10, 0.7)) -jjcsformat_fraction_count_denom(c(70000, 70001, 70000 / 70001)) -jjcsformat_fraction_count_denom(c(235, 235, 235 / 235)) -} diff --git a/man/get_ctrl_subset.Rd b/man/get_ctrl_subset.Rd index 57982c79..44b07879 100644 --- a/man/get_ctrl_subset.Rd +++ b/man/get_ctrl_subset.Rd @@ -7,11 +7,11 @@ get_ctrl_subset(df, trt_var, ctrl_grp) } \arguments{ -\item{df}{Data frame to subset.} +\item{df}{(\code{data.frame})\cr Data frame to subset.} -\item{trt_var}{Treatment variable name.} +\item{trt_var}{(\code{character})\cr Treatment variable name.} -\item{ctrl_grp}{Control group value.} +\item{ctrl_grp}{(\code{character})\cr Control group value.} } \value{ Subset of the data frame. diff --git a/man/get_ref_info.Rd b/man/get_ref_info.Rd index 997bd820..14863d52 100644 --- a/man/get_ref_info.Rd +++ b/man/get_ref_info.Rd @@ -10,9 +10,9 @@ get_ref_info(ref_path, .spl_context, .var = NULL) \item{ref_path}{(\code{character})\cr reference group specification as an \code{rtables} \code{colpath}, see details.} -\item{.spl_context}{see \link[rtables:spl_context]{rtables::spl_context}.} +\item{.spl_context}{(\code{data.frame})\cr see \link[rtables:spl_context]{rtables::spl_context}.} -\item{.var}{the variable being analyzed, see \link[rtables:additional_fun_params]{rtables::additional_fun_params}.} +\item{.var}{(\code{character})\cr the variable being analyzed, see \link[rtables:additional_fun_params]{rtables::additional_fun_params}.} } \value{ A list with \code{ref_group} and \code{in_ref_col}, which can be used as @@ -26,7 +26,7 @@ the corresponding column split hierarchy levels. } \details{ The reference group is specified in \code{colpath} hierarchical fashion in \code{ref_path}: -The first column split variable is the first element, and the level to use is the +the first column split variable is the first element, and the level to use is the second element. It continues until the last column split variable with last level to use. Note that depending on \code{.var}, either a \code{data.frame} (if \code{.var} is \code{NULL}) or diff --git a/man/get_titles_from_file.Rd b/man/get_titles_from_file.Rd index 8ec52d0d..79a76941 100644 --- a/man/get_titles_from_file.Rd +++ b/man/get_titles_from_file.Rd @@ -12,7 +12,7 @@ get_titles_from_file( ) } \arguments{ -\item{id}{character. The identifier for the table of interest.} +\item{id}{(\code{character(1)})\cr The identifier for the table of interest.} \item{file}{(\code{character(1)})\cr A path to CSV or xlsx file containing title and footer information for one or more outputs. See Details. Ignored if @@ -45,6 +45,3 @@ first. the value of the title/footer to be applied. }\if{html}{\out{}} } -\seealso{ -Used in all template script -} diff --git a/man/h_a_freq_dataprep.Rd b/man/h_a_freq_dataprep.Rd deleted file mode 100644 index 4f12c1f9..00000000 --- a/man/h_a_freq_dataprep.Rd +++ /dev/null @@ -1,79 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_a_freq_dataprep} -\alias{h_a_freq_dataprep} -\title{A Frequency Data Preparation Function} -\usage{ -h_a_freq_dataprep( - df, - labelstr = NULL, - .var = NA, - val = NULL, - drop_levels = FALSE, - excl_levels = NULL, - new_levels = NULL, - new_levels_after = FALSE, - addstr2levs = NULL, - .df_row, - .spl_context, - .N_col, - id = "USUBJID", - denom = c("N_col", "n_df", "n_altdf", "N_colgroup", "n_rowdf", "n_parentdf"), - variables, - label = NULL, - label_fstr = NULL, - label_map = NULL, - .alt_df_full = NULL, - denom_by = NULL, - .stats -) -} -\arguments{ -\item{df}{Data frame to prepare.} - -\item{labelstr}{Label string.} - -\item{.var}{Variable name.} - -\item{val}{Values for analysis.} - -\item{drop_levels}{Boolean, indicating if levels should be dropped.} - -\item{excl_levels}{Levels to exclude.} - -\item{new_levels}{New levels to add.} - -\item{new_levels_after}{Boolean for adding new levels after existing ones.} - -\item{addstr2levs}{String to add to new levels.} - -\item{.df_row}{Current data frame row.} - -\item{.spl_context}{Current split context.} - -\item{.N_col}{Number of columns.} - -\item{id}{Identifier variable.} - -\item{denom}{Denominator types.} - -\item{variables}{Variables to include in the analysis.} - -\item{label}{Label string.} - -\item{label_fstr}{Formatted label string.} - -\item{label_map}{Mapping for labels.} - -\item{.alt_df_full}{Alternative full data frame.} - -\item{denom_by}{Denominator grouping variable.} - -\item{.stats}{Statistics to compute.} -} -\value{ -List containing prepared data frames and values. -} -\description{ -Prepares frequency data for analysis. -} diff --git a/man/h_a_freq_prepinrows.Rd b/man/h_a_freq_prepinrows.Rd deleted file mode 100644 index 50b62054..00000000 --- a/man/h_a_freq_prepinrows.Rd +++ /dev/null @@ -1,43 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_a_freq_prepinrows} -\alias{h_a_freq_prepinrows} -\title{Frequency Preparation in Rows} -\usage{ -h_a_freq_prepinrows( - x_stats, - .stats_adj, - .formats, - labelstr, - label_fstr, - label, - .indent_mods, - .labels_n, - na_str -) -} -\arguments{ -\item{x_stats}{Statistics data.} - -\item{.stats_adj}{Adjusted statistics.} - -\item{.formats}{Format settings.} - -\item{labelstr}{Label string.} - -\item{label_fstr}{Formatted label string.} - -\item{label}{Label string.} - -\item{.indent_mods}{Indentation settings.} - -\item{.labels_n}{Labels for statistics.} - -\item{na_str}{String for NA values.} -} -\value{ -List containing prepared statistics, formats, labels, and indentation. -} -\description{ -Prepares frequency data in rows based on provided parameters. -} diff --git a/man/h_colexpr_substr.Rd b/man/h_colexpr_substr.Rd deleted file mode 100644 index 3bb2bd22..00000000 --- a/man/h_colexpr_substr.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_colexpr_substr} -\alias{h_colexpr_substr} -\title{Extract Substring from Column Expression} -\usage{ -h_colexpr_substr(var, col_expr) -} -\arguments{ -\item{var}{Variable to extract from the expression.} - -\item{col_expr}{Column expression string.} -} -\value{ -Substring corresponding to the variable. -} -\description{ -Retrieves the substring from a column expression related to a variable component. -} -\details{ -get substring from col_expr related to var component -intended usage is on strings coming from .spl_context$cur_col_expr -these strings are of type '!(is.na(var) & var \%in\% 'xxx') & !(is.na(var2) & var2 \%in\% 'xxx')' -} diff --git a/man/h_create_altdf.Rd b/man/h_create_altdf.Rd deleted file mode 100644 index 9dc06501..00000000 --- a/man/h_create_altdf.Rd +++ /dev/null @@ -1,37 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_create_altdf} -\alias{h_create_altdf} -\title{Create Alternative Data Frame} -\usage{ -h_create_altdf( - .spl_context, - .df_row, - denomdf, - denom_by = NULL, - id, - variables, - denom -) -} -\arguments{ -\item{.spl_context}{Current split context.} - -\item{.df_row}{Current data frame row.} - -\item{denomdf}{Denominator data frame.} - -\item{denom_by}{Denominator grouping variable.} - -\item{id}{Identifier variable.} - -\item{variables}{Variables to include in the analysis.} - -\item{denom}{Denominator type.} -} -\value{ -Grand parent dataset. -} -\description{ -Creates an alternative data frame based on the current split context. -} diff --git a/man/h_denom_parentdf.Rd b/man/h_denom_parentdf.Rd deleted file mode 100644 index d2083533..00000000 --- a/man/h_denom_parentdf.Rd +++ /dev/null @@ -1,21 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_denom_parentdf} -\alias{h_denom_parentdf} -\title{Get Denominator Parent Data Frame} -\usage{ -h_denom_parentdf(.spl_context, denom, denom_by) -} -\arguments{ -\item{.spl_context}{Current split context.} - -\item{denom}{Denominator type.} - -\item{denom_by}{Denominator grouping variable.} -} -\value{ -Parent data frame. -} -\description{ -Retrieves the parent data frame based on denominator. -} diff --git a/man/h_df_add_newlevels.Rd b/man/h_df_add_newlevels.Rd deleted file mode 100644 index 905b7c8a..00000000 --- a/man/h_df_add_newlevels.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_df_add_newlevels} -\alias{h_df_add_newlevels} -\title{Add New Levels to Data Frame} -\usage{ -h_df_add_newlevels(df, .var, new_levels, addstr2levs = NULL, new_levels_after) -} -\arguments{ -\item{df}{Data frame to update.} - -\item{.var}{Variable to which new levels will be added.} - -\item{new_levels}{List of new levels to add.} - -\item{addstr2levs}{String to add to new levels.} - -\item{new_levels_after}{Boolean, indicating if new levels should be added after existing levels.} -} -\value{ -Updated data frame. -} -\description{ -Adds new factor levels to a specified variable in the data frame. -} diff --git a/man/h_get_covariate_parts.Rd b/man/h_get_covariate_parts.Rd index 7471baaf..850c82b0 100644 --- a/man/h_get_covariate_parts.Rd +++ b/man/h_get_covariate_parts.Rd @@ -13,6 +13,6 @@ h_get_covariate_parts(covariates) Character vector of the covariates involved in \code{covariates} specification. } \description{ -Extraction of Covariate Parts from Character Vector +Extraction of Covariate Parts from Character Vector. } \keyword{internal} diff --git a/man/h_get_design_mat.Rd b/man/h_get_design_mat.Rd index c240227b..68bf4444 100644 --- a/man/h_get_design_mat.Rd +++ b/man/h_get_design_mat.Rd @@ -15,7 +15,7 @@ h_get_design_mat(df, .var) The logical matrix with dummy encoding of all factor levels. } \description{ -Helper Function to Create Logical Design Matrix from Factor Variable +Helper Function to Create Logical Design Matrix from Factor Variable. } \examples{ h_get_design_mat(df = data.frame(a = factor(c("a", "b", "a"))), .var = "a") diff --git a/man/h_get_label_map.Rd b/man/h_get_label_map.Rd deleted file mode 100644 index 3c16f416..00000000 --- a/man/h_get_label_map.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_get_label_map} -\alias{h_get_label_map} -\title{Get Label Map} -\usage{ -h_get_label_map(.labels, label_map, .var, split_info) -} -\arguments{ -\item{.labels}{Current labels.} - -\item{label_map}{Mapping for labels.} - -\item{.var}{Variable name.} - -\item{split_info}{Current split information.} -} -\value{ -Mapped labels. -} -\description{ -Maps labels based on the provided label map and split context. -} diff --git a/man/h_get_trtvar_refpath.Rd b/man/h_get_trtvar_refpath.Rd index 07a0be51..0d09cc18 100644 --- a/man/h_get_trtvar_refpath.Rd +++ b/man/h_get_trtvar_refpath.Rd @@ -7,11 +7,11 @@ h_get_trtvar_refpath(ref_path, .spl_context, df) } \arguments{ -\item{ref_path}{Reference path for treatment variable.} +\item{ref_path}{(\code{character})\cr Reference path for treatment variable.} -\item{.spl_context}{Current split context.} +\item{.spl_context}{(\code{data.frame})\cr Current split context.} -\item{df}{Data frame.} +\item{df}{(\code{data.frame})\cr Data frame.} } \value{ List containing treatment variable details. diff --git a/man/h_prop_diff_test.Rd b/man/h_prop_diff_test.Rd deleted file mode 100644 index 14b02da0..00000000 --- a/man/h_prop_diff_test.Rd +++ /dev/null @@ -1,46 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/test_proportion_diff.R -\name{h_prop_diff_test} -\alias{h_prop_diff_test} -\alias{prop_chisq} -\alias{prop_cmh} -\alias{prop_fisher} -\title{Helper functions to test proportion differences} -\usage{ -prop_chisq(tbl, alternative) - -prop_cmh(ary, alternative) - -prop_fisher(tbl, alternative) -} -\arguments{ -\item{tbl}{(\code{matrix})\cr matrix with two groups in rows and the binary response (\code{TRUE}/\code{FALSE}) in columns.} - -\item{ary}{(\code{array}, 3 dimensions)\cr array with two groups in rows, the binary response -(\code{TRUE}/\code{FALSE}) in columns, and the strata in the third dimension.} -} -\value{ -A p-value. -} -\description{ -Helper functions to implement various tests on the difference between two proportions. -} -\section{Functions}{ -\itemize{ -\item \code{prop_chisq()}: Performs Chi-Squared test. Internally calls \code{\link[stats:prop.test]{stats::prop.test()}}. - -\item \code{prop_cmh()}: Performs stratified Cochran-Mantel-Haenszel test. -Internally calls \code{\link[stats:mantelhaen.test]{stats::mantelhaen.test()}}. - -\item \code{prop_fisher()}: Performs the Fisher's exact test. Internally calls \code{\link[stats:fisher.test]{stats::fisher.test()}}. - -}} -\note{ -strata with less than five observations will result in a warning and -possibly incorrect results; strata with less than two observations are -automatically discarded. -} -\seealso{ -\code{\link[=prop_diff_test]{prop_diff_test()}} for implementation of these helper functions. -} -\keyword{internal} diff --git a/man/h_subset_combo.Rd b/man/h_subset_combo.Rd deleted file mode 100644 index 998dfda2..00000000 --- a/man/h_subset_combo.Rd +++ /dev/null @@ -1,27 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_subset_combo} -\alias{h_subset_combo} -\title{Subset Combination} -\usage{ -h_subset_combo(df, combosdf, do_not_filter, filter_var, flag_var, colid) -} -\arguments{ -\item{df}{Data frame to subset.} - -\item{combosdf}{Data frame containing combinations.} - -\item{do_not_filter}{Variables to not filter.} - -\item{filter_var}{Variable used for filtering.} - -\item{flag_var}{Flag variable for filtering.} - -\item{colid}{Column ID for identification.} -} -\value{ -Subsetted data frame. -} -\description{ -Subsets a data frame based on specified combination criteria. -} diff --git a/man/h_upd_dfrow.Rd b/man/h_upd_dfrow.Rd deleted file mode 100644 index 9f3634c6..00000000 --- a/man/h_upd_dfrow.Rd +++ /dev/null @@ -1,55 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_upd_dfrow} -\alias{h_upd_dfrow} -\title{Update Data Frame Row} -\usage{ -h_upd_dfrow( - df_row, - .var, - val, - excl_levels, - drop_levels, - new_levels, - new_levels_after, - addstr2levs, - label, - label_map, - labelstr, - label_fstr, - .spl_context -) -} -\arguments{ -\item{df_row}{Data frame row to update.} - -\item{.var}{Variable name to update.} - -\item{val}{Values to keep.} - -\item{excl_levels}{Levels to exclude from the factor.} - -\item{drop_levels}{Boolean, indicating if levels should be dropped.} - -\item{new_levels}{New levels to add.} - -\item{new_levels_after}{Boolean, indicating if new levels should be added after existing levels.} - -\item{addstr2levs}{String to add to new levels.} - -\item{label}{Label string.} - -\item{label_map}{Mapping for labels.} - -\item{labelstr}{Label string to replace.} - -\item{label_fstr}{Format string for labels.} - -\item{.spl_context}{Current split context.} -} -\value{ -List containing updated data frames and values. -} -\description{ -Updates a row in the data frame based on various parameters. -} diff --git a/man/h_update_factor.Rd b/man/h_update_factor.Rd deleted file mode 100644 index 1733c461..00000000 --- a/man/h_update_factor.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{h_update_factor} -\alias{h_update_factor} -\title{Update Factor} -\usage{ -h_update_factor(df, .var, val = NULL, excl_levels = NULL) -} -\arguments{ -\item{df}{Data frame containing the variable to update.} - -\item{.var}{Variable name to update.} - -\item{val}{Values to keep.} - -\item{excl_levels}{Levels to exclude from the factor.} -} -\value{ -Updated data frame. -} -\description{ -Updates a factor variable in a data frame based on specified values. -} diff --git a/man/inches_to_spaces.Rd b/man/inches_to_spaces.Rd index bd75b3cc..d8e4f7a3 100644 --- a/man/inches_to_spaces.Rd +++ b/man/inches_to_spaces.Rd @@ -2,28 +2,28 @@ % Please edit documentation in R/colwidths.R \name{inches_to_spaces} \alias{inches_to_spaces} -\title{Conversion of inches to spaces} +\title{Conversion of inches to spaces.} \usage{ inches_to_spaces(ins, fontspec, raw = FALSE, tol = sqrt(.Machine$double.eps)) } \arguments{ -\item{ins}{numeric. Vector of widths in inches} +\item{ins}{(\code{numeric})\cr Vector of widths in inches.} -\item{fontspec}{font_spec. The font specification to use} +\item{fontspec}{(\code{font_spec})\cr The font specification to use.} -\item{raw}{logical(1). Should the answer be returned unrounded +\item{raw}{(\code{logical(1)})\cr Should the answer be returned unrounded (\code{TRUE}), or rounded to the nearest reasonable value (\code{FALSE}, -the default)} +the default).} -\item{tol}{numeric(1). The numeric tolerance, values +\item{tol}{(\code{numeric(1)})\cr The numeric tolerance. Values between an integer \code{n}, and \code{n+tol} will be returned as \code{n}, rather than \code{n+1}, if \code{raw == FALSE}. Ignored when \code{raw} is \code{TRUE}.} } \value{ -the number of either fractional (\code{raw = TRUE}) or whole (\code{raw = FALSE}) -spaces that will fit within \code{ins} inches in the specified font +The number of either fractional (\code{raw = TRUE}) or whole (\code{raw = FALSE}) +spaces that will fit within \code{ins} inches in the specified font. } \description{ -Conversion of inches to spaces +Conversion of inches to spaces. } diff --git a/man/jj_uc_map.Rd b/man/jj_uc_map.Rd deleted file mode 100644 index 0925a0ca..00000000 --- a/man/jj_uc_map.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/unicodify.R -\docType{data} -\name{jj_uc_map} -\alias{jj_uc_map} -\title{Unicode Mapping Table} -\format{ -A tibble with columns 'pattern' and 'unicode', where 'pattern' contains -the string to be replaced and 'unicode' contains the Unicode code point in hexadecimal. -} -\usage{ -jj_uc_map -} -\description{ -A tibble that maps special characters to their Unicode equivalents. -} -\keyword{datasets} diff --git a/man/jjcs_num_formats.Rd b/man/jjcs_num_formats.Rd index 0962e581..b4e2fe80 100644 --- a/man/jjcs_num_formats.Rd +++ b/man/jjcs_num_formats.Rd @@ -7,9 +7,10 @@ jjcs_num_formats(d, cap = 4) } \arguments{ -\item{d}{precision of individual values} +\item{d}{(\code{numeric})\cr precision of individual values} -\item{cap}{cap to numerical precision (d > cap -- will use precision as if cap was specified as precision)} +\item{cap}{(\code{numeric})\cr cap to numerical precision (d > cap -- +will use precision as if cap was specified as precision)} } \value{ list: @@ -19,10 +20,10 @@ list: } } \description{ -Formatting setter for selected numerical statistics +Formatting setter for selected numerical statistics. } \examples{ -P1_precision <- jjcs_num_formats(d=0)$fmt +P1_precision <- jjcs_num_formats(d = 0)$fmt jjcs_num_formats(2)$fmt jjcs_num_formats(2)$spec } diff --git a/man/jjcsformat_pval_fct.Rd b/man/jjcsformat_pval_fct.Rd deleted file mode 100644 index 6b727ca0..00000000 --- a/man/jjcsformat_pval_fct.Rd +++ /dev/null @@ -1,42 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/jjcsformats.R -\name{jjcsformat_pval_fct} -\alias{jjcsformat_pval_fct} -\title{Function factory for p-value formatting} -\usage{ -jjcsformat_pval_fct(alpha = 0.05) -} -\arguments{ -\item{alpha}{\code{number}\cr the significance level to account for during rounding.} -} -\value{ -The p-value in the standard format. If \code{count} is 0, the format is \code{0}. -If it is smaller than 0.001, then \verb{<0.001}, if it is larger than 0.999, then -\verb{>0.999} is returned. Otherwise, 3 digits are used. In the special case that -rounding from below would make the string equal to the specified \code{alpha}, -then a higher number of digits is used to be able to still see the difference. -For example, 0.0048 is not rounded to 0.005 but stays at 0.0048 if \code{alpha = 0.005} -is set. -} -\description{ -A function factory to generate formatting functions for p-value -formatting that support rounding close to the significance level specified -} -\examples{ -my_pval_format <- jjcsformat_pval_fct(0.005) -my_pval_format(0.2802359) -my_pval_format(0.0048) -my_pval_format(0.00499) -my_pval_format(0.004999999) -my_pval_format(0.0051) -my_pval_format(0.0009) -my_pval_format(0.9991) - -} -\seealso{ -Other JJCS formats: -\code{\link{count_fraction}}, -\code{\link{format_xx_fct}()}, -\code{\link{jjcsformat_range_fct}()} -} -\concept{JJCS formats} diff --git a/man/jjcsformat_range_fct.Rd b/man/jjcsformat_range_fct.Rd deleted file mode 100644 index b17ed7c5..00000000 --- a/man/jjcsformat_range_fct.Rd +++ /dev/null @@ -1,42 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/jjcsformats.R -\name{jjcsformat_range_fct} -\alias{jjcsformat_range_fct} -\title{Function factory for range with censoring information formatting} -\usage{ -jjcsformat_range_fct(str) -} -\arguments{ -\item{str}{\code{string}\cr the format specifying the number of digits to be used, -for the range values, e.g. \code{"xx.xx"}.} -} -\value{ -A function that formats a numeric vector with 4 elements: -\itemize{ -\item minimum -\item maximum -\item censored minimum? (1 if censored, 0 if event) -\item censored maximum? (1 if censored, 0 if event) -The range along with the censoring information is returned as a string -with the specified numeric format as \verb{(min, max)}, and the \code{+} is appended -to \code{min} or \code{max} if these have been censored. -} -} -\description{ -A function factory to generate formatting functions for range formatting -that includes information about the censoring of survival times. -} -\examples{ -my_range_format <- jjcsformat_range_fct("xx.xx") -my_range_format(c(0.35235, 99.2342, 1, 0)) -my_range_format(c(0.35235, 99.2342, 0, 1)) -my_range_format(c(0.35235, 99.2342, 0, 0)) -my_range_format(c(0.35235, 99.2342, 1, 1)) -} -\seealso{ -Other JJCS formats: -\code{\link{count_fraction}}, -\code{\link{format_xx_fct}()}, -\code{\link{jjcsformat_pval_fct}()} -} -\concept{JJCS formats} diff --git a/man/jjcsformat_xx.Rd b/man/jjcsformat_xx.Rd index 663d1d30..dc980cd6 100644 --- a/man/jjcsformat_xx.Rd +++ b/man/jjcsformat_xx.Rd @@ -2,19 +2,109 @@ % Please edit documentation in R/jjcsformats.R \name{jjcsformat_xx} \alias{jjcsformat_xx} -\title{Formatting of values} +\alias{jjcsformat_pval_fct} +\alias{jjcsformat_range_fct} +\title{Utility for specifying custom formats} \usage{ -jjcsformat_xx(str, na_str = na_str_dflt) +jjcsformat_xx( + str, + na_str = na_str_dflt, + na_str_dflt = "NE", + replace_na_dflt = TRUE +) + +jjcsformat_pval_fct(alpha = 0.05) + +jjcsformat_range_fct(str, censor_char = "+") } \arguments{ -\item{str}{The formatting that is required specified as a text string, eg "xx.xx"} +\item{str}{(\code{string})\cr the format specifying the number of digits to be used, +for the range values, e.g. \code{"xx.xx"}.} + +\item{na_str}{String for NA values.} + +\item{na_str_dflt}{Character to represent NA value} -\item{na_str}{character. Na string that will be passed from \code{formatters} into -our formatting functions.} +\item{replace_na_dflt}{logical(1). Should an \code{na_string} of "NA" within +the formatters framework be overridden by \code{na_str_default}? Defaults to +\code{TRUE}, as a way to have a different default na string behavior from the +base \code{formatters} framework.} + +\item{alpha}{(\code{numeric})\cr the significance level to account for during rounding.} + +\item{censor_char}{(\code{string})\cr the character (of length 1) to be appended to \code{min} or \code{max}} } \value{ -a formatting function with \code{"sas"}-style rounding. +Either a supported format string, or a formatting function that can be +used as format in \code{formatters::format_value} + +The p-value in the standard format. If \code{count} is 0, the format is \code{0}. +If it is smaller than 0.001, then \verb{<0.001}, if it is larger than 0.999, then +\verb{>0.999} is returned. Otherwise, 3 digits are used. In the special case that +rounding from below would make the string equal to the specified \code{alpha}, +then a higher number of digits is used to be able to still see the difference. +For example, 0.0048 is not rounded to 0.005 but stays at 0.0048 if \code{alpha = 0.005} +is set. + +A function that formats a numeric vector with 4 elements: +\itemize{ +\item minimum +\item maximum +\item censored minimum? (1 if censored, 0 if event) +\item censored maximum? (1 if censored, 0 if event) +The range along with the censoring information is returned as a string +with the specified numeric format as \verb{(min, max)}, and the \code{censor_char} is appended +to \code{min} or \code{max} if these have been censored. +} } \description{ -jjcs formatting function +Utility for specifying custom formats that can be used as a format in \code{formatters::format_value} + +A function factory to generate formatting functions for p-value +formatting that support rounding close to the significance level specified. + +A function factory to generate formatting functions for range formatting +that includes information about the censoring of survival times. +} +\examples{ +value <- c(1.65, 8.645) +fmt <- jjcsformat_xx("xx.x") +is.function(fmt) +fmt +format_value(value[1], fmt, round_type = "sas") +format_value(value[1], fmt, round_type = "iec") +if (is.function(fmt)) fmt(value[1]) + +fmt2 <- jjcsformat_xx("xx.x (xx.xxx)") +is.function(fmt2) +value <- c(1.65, 8.645) +format_value(value, fmt2, round_type = "sas") +format_value(value, fmt2, round_type = "iec") +# only possible when resulting format is a function +if (is.function(fmt2)) fmt2(value, round_type = "sas") + +value <- c(1.65, NA) +format_value(value, fmt2, round_type = "iec", na_str = c("ne1", "ne2")) +if (is.function(fmt2)) fmt2(value, round_type = "iec", na_str = c("ne1", "ne2")) +my_pval_format <- jjcsformat_pval_fct(0.005) +my_pval_format(0.2802359) +my_pval_format(0.0048) +my_pval_format(0.00499) +my_pval_format(0.004999999) +my_pval_format(0.0051) +my_pval_format(0.0009) +my_pval_format(0.9991) + +my_range_format <- jjcsformat_range_fct("xx.xx") +my_range_format(c(0.35235, 99.2342, 1, 0)) +my_range_format(c(0.35235, 99.2342, 0, 1)) +my_range_format(c(0.35235, 99.2342, 0, 0)) +my_range_format(c(0.35235, 99.2342, 1, 1)) +my_range_format <- jjcsformat_range_fct("xx.xx", censor_char = "*") +my_range_format(c(0.35235, 99.2342, 1, 1)) +} +\seealso{ +Other JJCS formatting functions: +\code{\link{count and fraction related formatting functions}} } +\concept{JJCS formatting functions} diff --git a/man/keep_non_null_rows.Rd b/man/keep_non_null_rows.Rd index 975f955d..19df5478 100644 --- a/man/keep_non_null_rows.Rd +++ b/man/keep_non_null_rows.Rd @@ -7,10 +7,10 @@ keep_non_null_rows(tr) } \arguments{ -\item{tr}{table tree object} +\item{tr}{(\code{TableTree})\cr The TableTree object to prune.} } \value{ -a function that can be utilized as a row_condition in the tern::keep_rows function +A function that can be utilized as a row_condition in the tern::keep_rows function. } \description{ Condition function on individual analysis rows. Flag as FALSE when all @@ -18,7 +18,6 @@ columns are NULL, as then the row should not be kept. To be utilized as a row_condition in function tern::keep_rows } \examples{ - library(dplyr) ADSL <- data.frame( diff --git a/man/lsmeans_helpers.Rd b/man/lsmeans_helpers.Rd index 00e1afea..0176c17a 100644 --- a/man/lsmeans_helpers.Rd +++ b/man/lsmeans_helpers.Rd @@ -90,6 +90,7 @@ given the \code{specs} for single visit contrasts and the averages required. \note{ The difference here compared to the original tern.mmrm::h_get_spec_visit_estimates() function is that additional arguments for \code{\link[emmeans:contrast]{emmeans::contrast()}} can be passed via the +dots (\code{...}) argument. Once this has been added to the \code{tern.mmrm} package then its functions can be used instead. } \keyword{internal} diff --git a/man/make_combo_splitfun.Rd b/man/make_combo_splitfun.Rd index 17feb377..b37a3ffa 100644 --- a/man/make_combo_splitfun.Rd +++ b/man/make_combo_splitfun.Rd @@ -7,23 +7,22 @@ make_combo_splitfun(nm, label = nm, levels = NULL, rm_other_facets = TRUE) } \arguments{ -\item{nm}{character(1). Name/virtual 'value' for the new facet} +\item{nm}{(\code{character})\cr Name/virtual 'value' for the new facet.} -\item{label}{character(1). label for the new facet} +\item{label}{(\code{character})\cr Label for the new facet.} -\item{levels}{character or NULL. The levels to combine into the new facet, +\item{levels}{(\code{character} or NULL)\cr The levels to combine into the new facet, or NULL, indicating the facet should include all incoming data.} -\item{rm_other_facets}{logical(1). Should facets other than the newly -created one be removed. Defaults to \code{TRUE}} +\item{rm_other_facets}{(\code{logical})\cr Should facets other than the newly +created one be removed. Defaults to \code{TRUE}.} } \value{ -function usable directly as a split function. +Function usable directly as a split function. } \description{ -A function which aids the construction for users to create their own split function for combined columns +A function which aids the construction for users to create their own split function for combined columns. } \examples{ -aesevall_spf <- make_combo_splitfun(nm = 'AESEV_ALL', label = 'Any AE', levels = NULL) - +aesevall_spf <- make_combo_splitfun(nm = "AESEV_ALL", label = "Any AE", levels = NULL) } diff --git a/man/make_rbmi_cluster.Rd b/man/make_rbmi_cluster.Rd index 6ce41dce..a1394f59 100644 --- a/man/make_rbmi_cluster.Rd +++ b/man/make_rbmi_cluster.Rd @@ -7,25 +7,28 @@ make_rbmi_cluster(cluster_or_cores = 1, objects = NULL, packages = NULL) } \arguments{ -\item{cluster_or_cores}{Number of parallel processes to use or an existing cluster to make use of} +\item{cluster_or_cores}{(\code{integer} or \verb{cluster object})\cr +Number of parallel processes to use or an existing cluster to make use of} -\item{objects}{a named list of objects to export into the sub-processes} +\item{objects}{(\code{list})\cr A named list of objects to export into the sub-processes} -\item{packages}{a character vector of libraries to load in the sub-processes - -This function is a wrapper around \code{parallel::makePSOCKcluster()} but takes -care of configuring \code{rbmi} to be used in the sub-processes as well as loading -user defined objects and libraries and setting the seed for reproducibility.} +\item{packages}{(\verb{character vector})\cr +A character vector of libraries to load in the sub-processes} } \value{ -If \code{cluster_or_cores} is \code{1} this function will return \code{NULL}. If \code{cluster_or_cores} -is a number greater than \code{1}, a cluster with \code{cluster_or_cores} cores is returned. - -If \code{cluster_or_cores} is a cluster created via \code{parallel::makeCluster()} then this function -returns it after inserting the relevant \code{rbmi} objects into the existing cluster. +\itemize{ +\item If \code{cluster_or_cores} is \code{1}, this function will return \code{NULL}. +\item If \code{cluster_or_cores} is a number greater than \code{1}, +a cluster with \code{cluster_or_cores} cores is returned. +\item If \code{cluster_or_cores} is a cluster created via \code{parallel::makeCluster()}, +then this function returns it after inserting the relevant \code{rbmi} objects +into the existing cluster. +} } \description{ -Create a \code{rbmi} ready cluster +This function is a wrapper around \code{parallel::makePSOCKcluster()} but takes +care of configuring \code{rbmi} to be used in the sub-processes as well as loading +user defined objects and libraries and setting the seed for reproducibility. } \examples{ \dontrun{ diff --git a/man/non_blank_sentinel.Rd b/man/non_blank_sentinel.Rd deleted file mode 100644 index 39b50c77..00000000 --- a/man/non_blank_sentinel.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\docType{data} -\name{non_blank_sentinel} -\alias{non_blank_sentinel} -\title{Non-blank Sentinel} -\format{ -An object of class \code{non_blank_sentinel} of length 1. -} -\usage{ -non_blank_sentinel -} -\description{ -Non-blank Sentinel -} -\keyword{internal} diff --git a/man/null_fn.Rd b/man/null_fn.Rd deleted file mode 100644 index 5bba45d1..00000000 --- a/man/null_fn.Rd +++ /dev/null @@ -1,12 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/h_freq_funs.R -\name{null_fn} -\alias{null_fn} -\title{Null Function} -\usage{ -null_fn(...) -} -\description{ -A function that returns NULL. -} -\keyword{internal} diff --git a/man/odds_ratio.Rd b/man/odds_ratio.Rd index fd014c98..11f49d77 100644 --- a/man/odds_ratio.Rd +++ b/man/odds_ratio.Rd @@ -81,6 +81,7 @@ of the approximations, or the CMH method. See \code{\link[survival:clogit]{survi } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} +A set of functions for Odds-Ratio (OR) calculation. } \section{Functions}{ \itemize{ diff --git a/man/pad_in_rows_fct.Rd b/man/pad_in_rows_fct.Rd index e7020e6e..5ac644c9 100644 --- a/man/pad_in_rows_fct.Rd +++ b/man/pad_in_rows_fct.Rd @@ -7,7 +7,7 @@ pad_in_rows_fct(length_out = NULL, label = "") } \arguments{ -\item{length_out}{(\code{count} or \code{NULL})\cr full length which should be padded +\item{length_out}{(\code{numeric} or \code{NULL})\cr full length which should be padded by \code{NA} which will be printed as empty strings.} \item{label}{(\code{string})\cr row label to be used for the first row only.} diff --git a/man/par_lapply.Rd b/man/par_lapply.Rd index 9eb3491a..dc070755 100644 --- a/man/par_lapply.Rd +++ b/man/par_lapply.Rd @@ -7,18 +7,18 @@ par_lapply(cl, fun, x, ...) } \arguments{ -\item{cl}{Cluster created by \code{\link[parallel:makeCluster]{parallel::makeCluster()}} or \code{NULL}} +\item{cl}{(\verb{cluster object})\cr Cluster created by \code{\link[parallel:makeCluster]{parallel::makeCluster()}} or \code{NULL}} -\item{fun}{Function to be run} +\item{fun}{(\code{functions})\cr Function to be run} -\item{x}{object to be looped over} +\item{x}{(\code{object})\cr Object to be looped over} -\item{...}{extra arguments passed to \code{fun}} +\item{...}{Extra arguments passed to \code{fun}} } \value{ \code{list} of results of calling \code{fun} on elements of \code{x}. } \description{ Simple wrapper around \code{lapply} and \code{\link[parallel:clusterApply]{parallel::clusterApplyLB}} to abstract away -the logic of deciding which one to use +the logic of deciding which one to use. } diff --git a/man/prop_diff.Rd b/man/prop_diff.Rd index 743e5b03..0ee900af 100644 --- a/man/prop_diff.Rd +++ b/man/prop_diff.Rd @@ -25,8 +25,8 @@ s_proportion_diff_j( .in_ref_col, variables = list(strata = NULL), conf_level = 0.95, - method = c("waldcc", "wald", "cmh", "ha", "newcombe", "newcombecc", "strat_newcombe", - "strat_newcombecc"), + method = c("waldcc", "wald", "cmh", "cmh_sato", "cmh_mn", "ha", "newcombe", + "newcombecc", "strat_newcombe", "strat_newcombecc"), weights_method = "cmh" ) } @@ -95,8 +95,8 @@ with additional features: \item \code{ref_path} needs to be provided as extra argument to specify the control group column. } -When performing an unstratified analysis, methods \code{'cmh'}, \code{'strat_newcombe'}, -and \code{'strat_newcombecc'} are not permitted. +When performing an unstratified analysis, methods \code{'cmh'}, \code{'cmh_sato'}, \code{'cmh_mn'}, +\code{'strat_newcombe'}, and \code{'strat_newcombecc'} are not permitted. } \examples{ nex <- 100 diff --git a/man/prop_diff_test.Rd b/man/prop_diff_test.Rd index cae5d636..de82a39e 100644 --- a/man/prop_diff_test.Rd +++ b/man/prop_diff_test.Rd @@ -3,7 +3,6 @@ \name{prop_diff_test} \alias{prop_diff_test} \alias{a_test_proportion_diff} -\alias{s_test_proportion_diff} \title{Difference test for two proportions} \usage{ a_test_proportion_diff( @@ -17,16 +16,6 @@ a_test_proportion_diff( .labels = NULL, .indent_mods = NULL ) - -s_test_proportion_diff( - df, - .var, - .ref_group, - .in_ref_col, - variables = list(strata = NULL), - method = c("chisq", "fisher", "cmh"), - alternative = c("two.sided", "less", "greater") -) } \arguments{ \item{df}{(\code{data.frame})\cr data set containing all analysis variables.} @@ -39,7 +28,11 @@ by a statistics function.} \item{.spl_context}{(\code{data.frame})\cr gives information about ancestor split states that is passed by \code{rtables}.} -\item{...}{additional arguments for the lower level functions.} +\item{...}{Additional arguments passed to \code{\link[tern:prop_diff_test]{tern::s_test_proportion_diff()}}, including: +\itemize{ +\item \code{method} (\code{string})\cr one of \code{chisq}, \code{cmh}, \code{cmh_wh}, \code{fisher} or \code{schouten}; +specifies the test used to calculate the p-value. +}} \item{.stats}{(\code{character})\cr statistics to select for the table.} @@ -50,28 +43,11 @@ information on the \code{'auto'} setting.} \item{.indent_mods}{(named \code{integer})\cr indent modifiers for the labels. Defaults to 0, which corresponds to the unmodified default behavior. Can be negative.} - -\item{.ref_group}{(\code{data.frame} or \code{vector})\cr the data corresponding to the reference group.} - -\item{.in_ref_col}{(\code{logical})\cr \code{TRUE} when working with the reference level, \code{FALSE} otherwise.} - -\item{variables}{(named \code{list} of \code{string})\cr list of additional analysis variables.} - -\item{method}{(\code{string})\cr one of \code{chisq}, \code{cmh}, \code{fisher}; specifies the test used -to calculate the p-value.} - -\item{alternative}{(\code{string})\cr whether \code{two.sided}, or one-sided \code{less} or \code{greater} p-value -should be displayed.} } \value{ \itemize{ \item \code{a_test_proportion_diff()} returns the corresponding list with formatted \code{\link[rtables:CellValue]{rtables::CellValue()}}. } - -\itemize{ -\item \code{s_test_proportion_diff()} returns a named \code{list} with a single item \code{pval} with an attribute \code{label} -describing the method used. The p-value tests the null hypothesis that proportions in two groups are the same. -} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} @@ -87,13 +63,10 @@ alternative hypothesis. \itemize{ \item \code{a_test_proportion_diff()}: Formatted analysis function which is used as \code{afun} -\item \code{s_test_proportion_diff()}: Statistics function which tests the difference between two proportions. - }} \note{ -These functions have been forked from the \code{tern} package. Additional features are: +This function has been forked from the \code{tern} package. Additional features are: \itemize{ -\item Additional \code{alternative} argument for the sidedness of the test. \item Additional \code{ref_path} argument for flexible reference column path specification. } } @@ -120,7 +93,3 @@ l <- basic_table() |> build_table(l, df = dta) } -\seealso{ -\link{h_prop_diff_test} -} -\keyword{internal} diff --git a/man/prop_post_fun.Rd b/man/prop_post_fun.Rd index 99f3ccda..dbee7d2e 100644 --- a/man/prop_post_fun.Rd +++ b/man/prop_post_fun.Rd @@ -3,7 +3,7 @@ \name{prop_post_fun} \alias{prop_post_fun} \alias{prop_split_fun} -\title{Split Function for Proportion Analysis Columns (TEFCGIS08 e.g.)} +\title{Split Function for Proportion Analysis Columns} \usage{ prop_post_fun(ret, spl, fulldf, .spl_context) @@ -32,9 +32,6 @@ a split function for use in \link[rtables:split_rows_by]{rtables::split_rows_by} \description{ Here we just split into 3 columns \code{n}, \verb{\%} and \verb{Cum \%}. } -\note{ -This split function is used in the proportion table TEFCGIS08 and similar ones. -} \seealso{ \code{\link[rtables:make_split_fun]{rtables::make_split_fun()}} describing the requirements for this kind of post-processing function. diff --git a/man/prop_ratio_cmh.Rd b/man/prop_ratio_cmh.Rd index 8ea062cc..ac08d8fa 100644 --- a/man/prop_ratio_cmh.Rd +++ b/man/prop_ratio_cmh.Rd @@ -16,7 +16,7 @@ prop_ratio_cmh(rsp, grp, strata, conf_level = 0.95) \item{conf_level}{(\code{proportion})\cr confidence level of the interval.} } \value{ -a list with elements \code{rel_risk_ci} and \code{pval}. +A list with elements \code{rel_risk_ci} and \code{pval}. } \description{ Calculates the relative risk which is defined as the ratio between the diff --git a/man/prop_table_afun.Rd b/man/prop_table_afun.Rd index df67bb70..7d377743 100644 --- a/man/prop_table_afun.Rd +++ b/man/prop_table_afun.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/proportions.R \name{prop_table_afun} \alias{prop_table_afun} -\title{Formatted Analysis Function for Proportion Analysis (TEFCGIS08 e.g.)} +\title{Formatted Analysis Function for Proportion Analysis} \usage{ prop_table_afun(x, .spl_context, formats, add_total_level = FALSE) } diff --git a/man/proposal_argument_convention.Rd b/man/proposal_argument_convention.Rd index c6c5137f..792e7a98 100644 --- a/man/proposal_argument_convention.Rd +++ b/man/proposal_argument_convention.Rd @@ -60,6 +60,9 @@ should be displayed.} \item{draw}{(\code{flag})\cr whether the plot should be drawn.} +\item{exclude_levels}{(\code{list})\cr A named list where names correspond to split variables +and values are vectors of levels to exclude.} + \item{grp}{(\code{factor})\cr defining the groups.} \item{groups_lists}{(named \code{list} of \code{list})\cr optionally contains for each \code{subgroups} variable a @@ -82,7 +85,7 @@ for more information.} \item{lyt}{(\code{layout})\cr input layout where analyses will be added to.} \item{method}{(\code{string})\cr specifies the test used to calculate the p-value for the difference between -two proportions. For options, see \code{\link[=s_test_proportion_diff]{s_test_proportion_diff()}}. Default is \code{NULL} so no test is performed.} +two proportions. For options, see \code{\link[tern:prop_diff_test]{tern::s_test_proportion_diff()}}. Default is \code{NULL} so no test is performed.} \item{na.rm}{(\code{flag})\cr whether \code{NA} values should be removed from \code{x} prior to analysis.} @@ -111,7 +114,7 @@ defined by this split instruction, or \code{NA_character_} (the default) for no \item{show_labels}{(\code{string})\cr label visibility: one of 'default', 'visible' and 'hidden'.} -\item{show_relative}{should the 'reduction' (\code{control - treatment}, default) or the 'increase' +\item{show_relative}{(\code{string})\cr should the 'reduction' (\code{control - treatment}, default) or the 'increase' (\code{treatment - control}) be shown for the relative change from baseline?} \item{strata}{(\code{character} or \code{NULL})\cr variable names indicating stratification factors.} diff --git a/man/rbmi_analyse.Rd b/man/rbmi_analyse.Rd index 05b78e4f..df8ce8f9 100644 --- a/man/rbmi_analyse.Rd +++ b/man/rbmi_analyse.Rd @@ -14,7 +14,7 @@ rbmi_analyse( ) } \arguments{ -\item{imputations}{An \code{imputations} object as created by \code{\link[rbmi:impute]{rbmi::impute()}}.} +\item{imputations}{An \code{imputations} object as created by the impute() function from the rbmi package.} \item{fun}{An analysis function to be applied to each imputed dataset. See details.} @@ -23,10 +23,12 @@ datasets prior to running \code{fun}. See details.} \item{...}{Additional arguments passed onto \code{fun}.} -\item{cluster_or_cores}{The number of parallel processes to use when running this function. Can also be a +\item{cluster_or_cores}{(\code{numeric} or \verb{cluster object})\cr +The number of parallel processes to use when running this function. Can also be a cluster object created by \code{\link[=make_rbmi_cluster]{make_rbmi_cluster()}}. See the parallelisation section below.} -\item{.validate}{Should \code{imputations} be checked to ensure it conforms to the required format +\item{.validate}{(\code{logical})\cr +Should \code{imputations} be checked to ensure it conforms to the required format (default = \code{TRUE}) ? Can gain a small performance increase if this is set to \code{FALSE} when analysing a large number of samples.} } @@ -36,7 +38,7 @@ analysis applied to each of the imputed datasets in \code{imputations}. } \description{ This function takes multiple imputed datasets (as generated by -the \code{\link[rbmi:impute]{rbmi::impute()}} function) and runs an analysis function on +the impute() function from the rbmi package) and runs an analysis function on each of them. } \details{ @@ -56,7 +58,7 @@ via \code{...}. \code{fun} must return a named list with each element itself being a list containing a single numeric element called \code{est} (or additionally \code{se} and \code{df} if -you had originally specified \code{\link[rbmi:method]{rbmi::method_bayes()}} or \code{\link[rbmi:method]{rbmi::method_approxbayes()}}) +you had originally specified the method_bayes() or method_approxbayes() functions from the rbmi package) i.e.: \preformatted{ myfun <- function(dat, ...) { @@ -79,17 +81,17 @@ myfun <- function(dat, ...) { } Please note that the \code{vars$subjid} column (as defined in the original call to -\code{\link[rbmi:draws]{rbmi::draws()}}) will be scrambled in the data.frames that are provided to \code{fun}. +the draws() function from the rbmi package) will be scrambled in the data.frames that are provided to \code{fun}. This is to say they will not contain the original subject values and as such any hard coding of subject ids is strictly to be avoided. By default \code{fun} is the \code{\link[=rbmi_ancova]{rbmi_ancova()}} function. Please note that this function -requires that a \code{vars} object, as created by \code{\link[rbmi:set_vars]{rbmi::set_vars()}}, is provided via -the \code{vars} argument e.g. \code{rbmi_analyse(imputeObj, vars = rbmi::set_vars(...))}. Please +requires that a \code{vars} object, as created by the set_vars() function from the rbmi package, is provided via +the \code{vars} argument e.g. \code{rbmi_analyse(imputeObj, vars = set_vars(...))}. Please see the documentation for \code{\link[=rbmi_ancova]{rbmi_ancova()}} for full details. Please also note that the theoretical justification for the conditional mean imputation -method (\code{method = method_condmean()} in \code{\link[rbmi:draws]{rbmi::draws()}}) relies on the fact that ANCOVA is +method (\code{method = method_condmean()} in the draws() function from the rbmi package) relies on the fact that ANCOVA is a linear transformation of the outcomes. Thus care is required when applying alternative analysis functions in this setting. @@ -97,7 +99,7 @@ The \code{delta} argument can be used to specify offsets to be applied to the outcome variable in the imputed datasets prior to the analysis. This is typically used for sensitivity or tipping point analyses. The delta dataset must contain columns \code{vars$subjid}, \code{vars$visit} (as specified -in the original call to \code{\link[rbmi:draws]{rbmi::draws()}}) and \code{delta}. Essentially this \code{data.frame} +in the original call to the draws() function from the rbmi package) and \code{delta}. Essentially this \code{data.frame} is merged onto the imputed dataset by \code{vars$subjid} and \code{vars$visit} and then the outcome variable is modified by: @@ -107,7 +109,7 @@ the outcome variable is modified by: Please note that in order to provide maximum flexibility, the \code{delta} argument can be used to modify any/all outcome values including those that were not imputed. Care must be taken when defining offsets. It is recommend that you -use the helper function \code{\link[rbmi:delta_template]{rbmi::delta_template()}} to define the delta datasets as +use the helper function delta_template() from the rbmi package to define the delta datasets as this provides utility variables such as \code{is_missing} which can be used to identify exactly which visits have been imputed. } @@ -136,10 +138,19 @@ parallel::stopCluster(cl) Note that there is significant overhead both with setting up the sub-processes and with transferring data back-and-forth between the main process and the sub-processes. As such parallelisation of the \code{rbmi_analyse()} function tends to only be worth it when you have -\verb{> 2000} samples generated by \code{\link[rbmi:draws]{rbmi::draws()}}. Conversely using parallelisation if your samples +\verb{> 2000} samples generated by the draws() function from the rbmi package. +Conversely using parallelisation if your samples are smaller than this may lead to longer run times than just running it sequentially. -It is important to note that the implementation of parallel processing within [rbmi::analyse()\verb{] has been optimised around the assumption that the parallel processes will be spawned on the same machine and not a remote cluster. One such optimisation is that the required data is saved to a temporary file on the local disk from which it is then read into each sub-process. This is done to avoid the overhead of transferring the data over the network. Our assumption is that if you are at the stage where you need to be parallelising your analysis over a remote cluster then you would likely be better off parallelising across multiple }rbmi\verb{runs rather than within a single}rbmi` run. +It is important to note that the implementation of parallel processing within the analyse() +function from the rbmi package has been optimised around the assumption that the parallel +processes will be spawned on the same machine and not a remote cluster. +One such optimisation is that the required data is saved to +a temporary file on the local disk from which it is then read into each sub-process. This is +done to avoid the overhead of transferring the data over the network. Our assumption is that +if you are at the stage where you need to be parallelising your analysis over a remote cluster +then you would likely be better off parallelising across multiple \code{rbmi} runs rather than within +a single \code{rbmi} run. Finally, if you are doing a tipping point analysis you can get a reasonable performance improvement by re-using the cluster between each call to \code{rbmi_analyse()} e.g. @@ -165,58 +176,60 @@ parallel::clusterStop(cl) } \examples{ -library(rbmi) -library(dplyr) - -dat <- antidepressant_data -dat$GENDER <- as.factor(dat$GENDER) -dat$POOLINV <- as.factor(dat$POOLINV) -set.seed(123) -pat_ids <- sample(levels(dat$PATIENT), nlevels(dat$PATIENT) / 4) -dat <- dat |> - filter(PATIENT \%in\% pat_ids) |> - droplevels() -dat <- expand_locf( - dat, - PATIENT = levels(dat$PATIENT), - VISIT = levels(dat$VISIT), - vars = c("BASVAL", "THERAPY"), - group = c("PATIENT"), - order = c("PATIENT", "VISIT") -) -dat_ice <- dat \%>\% - arrange(PATIENT, VISIT) \%>\% - filter(is.na(CHANGE)) \%>\% - group_by(PATIENT) \%>\% - slice(1) \%>\% - ungroup() \%>\% - select(PATIENT, VISIT) \%>\% - mutate(strategy = "JR") -dat_ice <- dat_ice[-which(dat_ice$PATIENT == 3618), ] -vars <- set_vars( - outcome = "CHANGE", - visit = "VISIT", - subjid = "PATIENT", - group = "THERAPY", - covariates = c("THERAPY") -) -drawObj <- draws( - data = dat, - data_ice = dat_ice, - vars = vars, - method = method_condmean(type = "jackknife", covariance = "csh"), - quiet = TRUE -) -references <- c("DRUG" = "PLACEBO", "PLACEBO" = "PLACEBO") -imputeObj <- impute(drawObj, references) - -rbmi_analyse(imputations = imputeObj, vars = vars) +if (requireNamespace("rbmi", quietly = TRUE)) { + library(rbmi) + library(dplyr) + + dat <- antidepressant_data + dat$GENDER <- as.factor(dat$GENDER) + dat$POOLINV <- as.factor(dat$POOLINV) + set.seed(123) + pat_ids <- sample(levels(dat$PATIENT), nlevels(dat$PATIENT) / 4) + dat <- dat |> + filter(PATIENT \%in\% pat_ids) |> + droplevels() + dat <- expand_locf( + dat, + PATIENT = levels(dat$PATIENT), + VISIT = levels(dat$VISIT), + vars = c("BASVAL", "THERAPY"), + group = c("PATIENT"), + order = c("PATIENT", "VISIT") + ) + dat_ice <- dat |> + arrange(PATIENT, VISIT) |> + filter(is.na(CHANGE)) |> + group_by(PATIENT) |> + slice(1) |> + ungroup() |> + select(PATIENT, VISIT) |> + mutate(strategy = "JR") + dat_ice <- dat_ice[-which(dat_ice$PATIENT == 3618), ] + vars <- set_vars( + outcome = "CHANGE", + visit = "VISIT", + subjid = "PATIENT", + group = "THERAPY", + covariates = c("THERAPY") + ) + drawObj <- draws( + data = dat, + data_ice = dat_ice, + vars = vars, + method = method_condmean(type = "jackknife", covariance = "csh"), + quiet = TRUE + ) + references <- c("DRUG" = "PLACEBO", "PLACEBO" = "PLACEBO") + imputeObj <- impute(drawObj, references) + + rbmi_analyse(imputations = imputeObj, vars = vars) +} } \seealso{ -\code{\link[rbmi:extract_imputed_dfs]{rbmi::extract_imputed_dfs()}} for manually extracting imputed +The extract_imputed_dfs() function from the rbmi package for manually extracting imputed datasets. -\code{\link[rbmi:delta_template]{rbmi::delta_template()}} for creating delta data.frames. +The delta_template() function from the rbmi package for creating delta data.frames. \code{\link[=rbmi_ancova]{rbmi_ancova()}} for the default analysis function. } diff --git a/man/rbmi_ancova.Rd b/man/rbmi_ancova.Rd index 93d8ee10..9e3dc261 100644 --- a/man/rbmi_ancova.Rd +++ b/man/rbmi_ancova.Rd @@ -14,7 +14,7 @@ rbmi_ancova( \arguments{ \item{data}{A \code{data.frame} containing the data to be used in the model.} -\item{vars}{A \code{vars} object as generated by \code{\link[rbmi:set_vars]{rbmi::set_vars()}}. Only the \code{group}, +\item{vars}{A \code{vars} object as generated by the set_vars() function from the rbmi package. Only the \code{group}, \code{visit}, \code{outcome} and \code{covariates} elements are required. See details.} \item{visits}{An optional character vector specifying which visits to @@ -71,7 +71,7 @@ square mean results. In the above example \code{vars$group} has two factor level The new "var" refers to the model estimated variance of the residuals. If you want to include interaction terms in your model this can be done -by providing them to the \code{covariates} argument of \code{\link[rbmi:set_vars]{rbmi::set_vars()}} +by providing them to the \code{covariates} argument of the set_vars() function from the rbmi package e.g. \code{set_vars(covariates = c("sex*age"))}. } \note{ @@ -88,5 +88,5 @@ include: \code{\link[stats:lm]{stats::lm()}} -\code{\link[rbmi:set_vars]{rbmi::set_vars()}} +The set_vars() function from the rbmi package } diff --git a/man/rbmi_ancova_single.Rd b/man/rbmi_ancova_single.Rd index 321a97e7..72c53c2c 100644 --- a/man/rbmi_ancova_single.Rd +++ b/man/rbmi_ancova_single.Rd @@ -42,9 +42,11 @@ Performance analysis of covariance. See \code{\link[=rbmi_ancova]{rbmi_ancova()} } \examples{ -iris2 <- iris[iris$Species \%in\% c("versicolor", "virginica"), ] -iris2$Species <- factor(iris2$Species) -rbmi_ancova_single(iris2, "Sepal.Length", "Species", c("Petal.Length * Petal.Width")) +if (requireNamespace("rbmi", quietly = TRUE)) { + iris2 <- iris[iris$Species \%in\% c("versicolor", "virginica"), ] + iris2$Species <- factor(iris2$Species) + rbmi_ancova_single(iris2, "Sepal.Length", "Species", c("Petal.Length * Petal.Width")) +} } \seealso{ diff --git a/man/rbmi_mmrm.Rd b/man/rbmi_mmrm.Rd index bf76294c..1656ab76 100644 --- a/man/rbmi_mmrm.Rd +++ b/man/rbmi_mmrm.Rd @@ -16,7 +16,8 @@ rbmi_mmrm( \arguments{ \item{data}{(\code{data.frame})\cr containing the data to be used in the model.} -\item{vars}{(\code{vars})\cr list as generated by \code{\link[rbmi:set_vars]{rbmi::set_vars()}}. Only the \code{subjid}, \code{group}, +\item{vars}{(\code{vars})\cr list as generated by the set_vars() function from the rbmi package. +Only the \code{subjid}, \code{group}, \code{visit}, \code{outcome} and \code{covariates} elements are required. See details.} \item{cov_struct}{(\code{string})\cr the covariance structure to use. Note that the same @@ -53,7 +54,8 @@ with the specified covariance structure for visits within subjects. vs the control group. } -In order to meet the formatting standards set by \code{\link[rbmi:analyse]{rbmi::analyse()}} the results will be collapsed +In order to meet the formatting standards set by the analyse() function from the rbmi package, +the results will be collapsed into a single list suffixed by the visit name, e.g.: \if{html}{\out{
}}\preformatted{list( @@ -75,7 +77,7 @@ The new 'var' refers to the model estimated variance of the residuals at the giv visit, together with the degrees of freedom (which is treatment group specific). If you want to include additional interaction terms in your model this can be done -by providing them to the \code{covariates} argument of \code{\link[rbmi:set_vars]{rbmi::set_vars()}} +by providing them to the \code{covariates} argument of the set_vars() function from the rbmi package e.g. \code{set_vars(covariates = c('sex*age'))}. } \note{ @@ -88,5 +90,5 @@ you want to include it. This will make sense in most cases. \code{\link[mmrm:mmrm]{mmrm::mmrm()}} -\code{\link[rbmi:set_vars]{rbmi::set_vars()}} +The set_vars() function from the rbmi package } diff --git a/man/rbmi_pool.Rd b/man/rbmi_pool.Rd new file mode 100644 index 00000000..ee4686dd --- /dev/null +++ b/man/rbmi_pool.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/pool_rbmi.R +\name{rbmi_pool} +\alias{rbmi_pool} +\title{Pool analysis results obtained from the imputed datasets} +\usage{ +rbmi_pool( + results, + conf.level = 0.95, + alternative = c("two.sided", "less", "greater"), + type = c("percentile", "normal") +) +} +\arguments{ +\item{results}{an analysis object created by analyse().} + +\item{conf.level}{confidence level of the returned confidence interval. +Must be a single number between 0 and 1. Default is 0.95.} + +\item{alternative}{a character string specifying the alternative hypothesis, +must be one of \code{"two.sided"} (default), \code{"greater"} or \code{"less"}.} + +\item{type}{a character string of either \code{"percentile"} (default) or +\code{"normal"}. Determines what method should be used to calculate the bootstrap +confidence intervals. See details. +Only used if \code{method_condmean(type = "bootstrap")} was specified +in the original call to draws().} +} +\value{ +A list of class \code{pool}. +} +\description{ +Pool analysis results obtained from the imputed datasets +} +\details{ +This has been forked from the \code{rbmi} package, mainly to support in +addition the pooling of variance estimates. See pool() for more details. +} diff --git a/man/real_add_overall_facet.Rd b/man/real_add_overall_facet.Rd index 52d86ac7..89f4b606 100644 --- a/man/real_add_overall_facet.Rd +++ b/man/real_add_overall_facet.Rd @@ -7,21 +7,21 @@ real_add_overall_facet(name, label) } \arguments{ -\item{name}{character(1). Name/virtual 'value' for the new facet} +\item{name}{(\code{character})\cr Name/virtual 'value' for the new facet.} -\item{label}{character(1). label for the new facet} +\item{label}{(\code{character})\cr Label for the new facet.} } \value{ -function usable directly as a split function. +Function usable directly as a split function. } \description{ -A function to help add an overall facet to your tables +A function to help add an overall facet to your tables. } \note{ -current add_overall_facet is bugged, can use that directly after it's fixed +Current add_overall_facet is bugged. Can be used directly after it's fixed https://github.com/insightsengineering/rtables/issues/768 } \examples{ +splfun <- make_split_fun(post = list(real_add_overall_facet("Total", "Total"))) -splfun <- make_split_fun(post = list(real_add_overall_facet('Total', 'Total'))) } diff --git a/man/remove_col_count.Rd b/man/remove_col_count.Rd index 135de8bf..569c44ad 100644 --- a/man/remove_col_count.Rd +++ b/man/remove_col_count.Rd @@ -7,16 +7,17 @@ remove_col_count(obj, span_label_var = "rrisk_header") } \arguments{ -\item{obj}{table tree object} +\item{obj}{(\code{TableTree})\cr TableTree object.} -\item{span_label_var}{the spanning header text variable value for which column headers will be removed from} +\item{span_label_var}{(\code{character})\cr +The spanning header text variable value for which column headers will be removed from.} } \value{ -table tree object with column counts in specified columns removed +TableTree object with column counts in specified columns removed. } \description{ -Remove the N=xx column headers for specified span_label_var columns - default is 'rrisk_header +Remove the N=xx column headers for specified span_label_var columns - default is 'rrisk_header'. } \details{ -This works for only the lowest level of column splitting (since colcounts is used) +This works for only the lowest level of column splitting (since colcounts is used). } diff --git a/man/remove_rows.Rd b/man/remove_rows.Rd index f28e2e8c..630332c9 100644 --- a/man/remove_rows.Rd +++ b/man/remove_rows.Rd @@ -7,12 +7,13 @@ remove_rows(removerowtext = NULL, reg_expr = FALSE) } \arguments{ -\item{removerowtext}{define a text string for which any row with row text will be removed.} +\item{removerowtext}{(\code{character})\cr Define a text string for which any row with row text will be removed.} -\item{reg_expr}{Apply removerowtext as a regular expression (grepl with fixed = TRUE)} +\item{reg_expr}{(\code{logical})\cr Apply removerowtext as a regular expression +(grepl with fixed = TRUE)} } \value{ -function that can be utilized as pruning function in prune_table +Function that can be utilized as pruning function in prune_table. } \description{ This function will remove all rows of a table based on the row text diff --git a/man/resp01_a_comp_stat_factor.Rd b/man/resp01_a_comp_stat_factor.Rd index 54b590d5..1c1236b3 100644 --- a/man/resp01_a_comp_stat_factor.Rd +++ b/man/resp01_a_comp_stat_factor.Rd @@ -34,7 +34,7 @@ resp01_a_comp_stat_factor( arm = "SEX", strata = "RACE", stat = "comp_stat_ci", - method = list(comp_stat_ci = "or_cmh"), + methods = list(comp_stat_ci = "or_cmh"), formats = list( comp_stat_ci = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), pval = jjcsformat_pval_fct(0.05) diff --git a/man/resp01_a_comp_stat_logical.Rd b/man/resp01_a_comp_stat_logical.Rd index 674aa162..474de5b8 100644 --- a/man/resp01_a_comp_stat_logical.Rd +++ b/man/resp01_a_comp_stat_logical.Rd @@ -60,7 +60,7 @@ resp01_a_comp_stat_logical( arm = "SEX", strata = "RACE", stat = "comp_stat_ci", - method = list(comp_stat_ci = "or_cmh"), + methods = list(comp_stat_ci = "or_cmh"), formats = list( comp_stat_ci = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), pval = jjcsformat_pval_fct(0.05) diff --git a/man/response_by_var.Rd b/man/response_by_var.Rd index d164cf86..09662103 100644 --- a/man/response_by_var.Rd +++ b/man/response_by_var.Rd @@ -16,21 +16,21 @@ response_by_var( ) } \arguments{ -\item{df}{Name of dataframe being analyzed.} +\item{df}{(\code{data.frame})\cr Name of dataframe being analyzed.} -\item{labelstr}{Custom label for the variable being analyzed.} +\item{labelstr}{(\verb{character vector})\cr Custom label for the variable being analyzed.} -\item{.var}{Name of the variable being analyzed. Records with non-missing +\item{.var}{(\code{character})\cr Name of the variable being analyzed. Records with non-missing values will be counted in the denominator.} -\item{.N_col}{numeric(1). The total for the current column.} +\item{.N_col}{(\code{numeric})\cr The total for the current column.} -\item{resp_var}{Name of variable, for which, records with a value of 'Y' +\item{resp_var}{(\code{character})\cr Name of variable, for which, records with a value of 'Y' will be counted in the numerator.} -\item{id}{Name of column in df which will have patient identifiers} +\item{id}{(\code{character})\cr Name of column in df which will have patient identifiers} -\item{.format}{Format for the count/denominator/fraction output.} +\item{.format}{(\code{character})\cr Format for the count/denominator/fraction output.} \item{...}{Additional arguments passed to the function.} } @@ -38,7 +38,7 @@ will be counted in the numerator.} a \code{RowsVerticalSection} for use by the internal tabulation machinery of \code{rtables} } \description{ -Derives the count_denom_fraction statistic (i.e., 'xx /xx (xx.x percent)' ) +Derives the count_denom_fraction statistic (i.e., 'xx /xx (xx.x percent)' )\cr Summarizes the number of unique subjects with a response = 'Y' for a given variable (e.g. TRTEMFL) within each category of another variable (e.g., SEX). Note that the denominator is derived using input df, @@ -50,7 +50,6 @@ This is an analysis function for use within \code{analyze}. Arguments the tabulation process. } \examples{ - library(dplyr) ADAE <- data.frame( diff --git a/man/rm_levels.Rd b/man/rm_levels.Rd index 58b2084d..db442504 100644 --- a/man/rm_levels.Rd +++ b/man/rm_levels.Rd @@ -7,13 +7,13 @@ rm_levels(excl) } \arguments{ -\item{excl}{Choose which level(s) to remove} +\item{excl}{(\code{character})\cr Choose which level(s) to remove} } \value{ -a function implementing pre-processing split behavior (for use in +A function implementing pre-processing split behavior (for use in \code{make_split_fun(pre = )} which removes the levels in \code{excl} from the data before facets are generated. } \description{ -custom function for removing level inside pre step in make_split_fun. +Custom function for removing level inside pre step in make_split_fun. } diff --git a/man/s_ancova_j.Rd b/man/s_ancova_j.Rd index 57de63b6..b34f763a 100644 --- a/man/s_ancova_j.Rd +++ b/man/s_ancova_j.Rd @@ -18,7 +18,7 @@ s_ancova_j( ) } \arguments{ -\item{df}{: need to check on how to inherit params from tern::s_ancova} +\item{df}{(\code{data.frame})\cr data set containing all analysis variables.} \item{.var}{(\code{string})\cr single variable name that is passed by \code{rtables} when requested by a statistics function.} @@ -48,10 +48,10 @@ with arm. if the interaction is not needed, the default option is \code{NULL}.} \item{weights_emmeans}{(\code{string})\cr argument from \code{\link[emmeans:emmeans]{emmeans::emmeans()}}, \code{"counterfactual"} by default.} } \value{ -returns a named list of 8 statistics (3 extra compared to \code{tern:::s_ancova()}). +Returns a named list of 8 statistics (3 extra compared to \code{tern:::s_ancova()}). } \description{ -Extension to tern:::s_ancova, 3 extra statistics are returned +Extension to tern:::s_ancova, 3 extra statistics are returned: \itemize{ \item \code{lsmean_se}: Marginal mean and estimated SE in the group. \item \code{lsmean_ci}: Marginal mean and associated confidence interval in the group. diff --git a/man/s_summarize_ancova_j.Rd b/man/s_summarize_ancova_j.Rd index d83fc50c..1b391651 100644 --- a/man/s_summarize_ancova_j.Rd +++ b/man/s_summarize_ancova_j.Rd @@ -21,7 +21,7 @@ a_summarize_ancova_j( s_summarize_ancova_j(df, .var, .df_row, .ref_group, .in_ref_col, ...) } \arguments{ -\item{df}{: need to check on how to inherit params from tern::s_ancova} +\item{df}{(\code{data.frame})\cr data set containing all analysis variables.} \item{.var}{(\code{string})\cr single variable name that is passed by \code{rtables} when requested by a statistics function.} @@ -51,14 +51,14 @@ by a statistics function.} \item \code{a_summarize_ancova_j()} returns the corresponding list with formatted \code{\link[rtables:CellValue]{rtables::CellValue()}}. } -returns the statistics from tern::s_summary(x), appended with a new statistics based upon ANCOVA +returns the statistics from \code{tern::s_summary(x)}, appended with a new statistics based upon ANCOVA } \description{ -Combination of tern::s_summary, and ANCOVA based estimates for mean and diff between columns, -based on ANCOVA function \code{s_ancova_j} +Combination of \link[tern:analyze_variables]{tern::s_summary}, and ANCOVA based estimates for mean and diff between columns, +based on ANCOVA function \code{s_ancova_j}. } \details{ -Combination of tern::s_summary, and ANCOVA based estimates for mean and diff between columns, +Combination of \link[tern:analyze_variables]{tern::s_summary}, and ANCOVA based estimates for mean and diff between columns, based on ANCOVA function \code{s_ancova_j} } \section{Functions}{ diff --git a/man/safe_prune_table.Rd b/man/safe_prune_table.Rd index 900cec10..448c5318 100644 --- a/man/safe_prune_table.Rd +++ b/man/safe_prune_table.Rd @@ -21,10 +21,10 @@ entire subtree should be removed.} \item{stop_depth}{(\code{numeric(1)})\cr the depth after which subtrees should not be checked for pruning. Defaults to \code{NA} which indicates pruning should happen at all levels.} -\item{empty_msg}{character(1). The message to place in the table +\item{empty_msg}{(\code{character(1)})\cr The message to place in the table if no rows were left after pruning} -\item{spancols}{logical(1). Should \code{empty_msg} be spanned +\item{spancols}{(\code{logical(1)})\cr Should \code{empty_msg} be spanned across the table's columns (\code{TRUE}) or placed in the rows row label (\code{FALSE}). Defaults to \code{FALSE} currently.} } @@ -32,7 +32,7 @@ rows row label (\code{FALSE}). Defaults to \code{FALSE} currently.} \code{tt} pruned based on the arguments, or, if pruning would remove all rows, a TableTree with the same column structure, and one row containing the -empty message spanning all columns +empty message spanning all columns. } \description{ Safely Prune Table With Empty Table Message If Needed diff --git a/man/set_titles.Rd b/man/set_titles.Rd index cc3fa68d..3f07f76c 100644 --- a/man/set_titles.Rd +++ b/man/set_titles.Rd @@ -7,18 +7,15 @@ set_titles(obj, titles) } \arguments{ -\item{obj}{The table tree to which the titles and footnotes will be appended.} +\item{obj}{(\code{TableTree})\cr The TableTree to which the titles and footnotes will be appended.} -\item{titles}{The list object containing the titles and footnotes to be appended.} +\item{titles}{(\code{list})\cr The list object containing the titles and footnotes to be appended.} } \value{ -The table tree object specified in the obj argument, with titles +The TableTree object specified in the obj argument, with titles and footnotes appended. } \description{ Retrieves titles and footnotes from the list specified in the titles -argument and appends them to the table tree specified in the obj argument. -} -\seealso{ -Used in all template scripts +argument and appends them to the TableTree specified in the obj argument. } diff --git a/man/short_split_result.Rd b/man/short_split_result.Rd index 4afe0507..1dab7fe6 100644 --- a/man/short_split_result.Rd +++ b/man/short_split_result.Rd @@ -9,13 +9,13 @@ short_split_result(..., fulldf) \arguments{ \item{...}{sequence of named labels for the columns.} -\item{fulldf}{(\code{data.frame})\cr the \code{fulldf} which will be used for each column.} +\item{fulldf}{(\code{data.frame})\cr The \code{fulldf} which will be used for each column.} } \value{ The result from \code{\link[rtables:make_split_result]{rtables::make_split_result()}}. } \description{ -This is a short cut for a common use of \code{\link[rtables:make_split_result]{rtables::make_split_result()}} where you need to create +This is a shortcut for a common use of \code{\link[rtables:make_split_result]{rtables::make_split_result()}} where you need to create custom column splits with different labels but using the same full dataset for each column. It automatically sets up the values, datasplit (using the same full dataset for each column), and subset_exprs (using TRUE for all subsets) parameters for make_split_result(). diff --git a/man/smart_colwidths_1page.Rd b/man/smart_colwidths_1page.Rd index 0f13346e..1a27a0cb 100644 --- a/man/smart_colwidths_1page.Rd +++ b/man/smart_colwidths_1page.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/colwidths.R \name{smart_colwidths_1page} \alias{smart_colwidths_1page} -\title{Colwidths for all columns to be forced on one page} +\title{Colwidths for all columns to be forced on one page.} \usage{ smart_colwidths_1page( tt, @@ -15,21 +15,21 @@ smart_colwidths_1page( ) } \arguments{ -\item{tt}{TableTree object to calculate column widths for} +\item{tt}{(\code{TableTree})\cr TableTree object to calculate column widths for} -\item{fontspec}{Font specification object} +\item{fontspec}{(\code{font_spec})\cr Font specification object} -\item{col_gap}{Column gap in spaces} +\item{col_gap}{(\code{numeric})\cr Column gap in spaces} -\item{rowlabel_width}{Width of row labels in spaces} +\item{rowlabel_width}{(\code{numeric})\cr Width of row labels in spaces} -\item{print_width_ins}{Print width in inches} +\item{print_width_ins}{(\code{numeric})\cr Print width in inches} -\item{landscape}{Whether the output is in landscape orientation} +\item{landscape}{(\code{logical})\cr Whether the output is in landscape orientation} -\item{lastcol_gap}{Whether to include a gap after the last column} +\item{lastcol_gap}{(\code{logical})\cr Whether to include a gap after the last column} } \description{ -Colwidths for all columns to be forced on one page +Colwidths for all columns to be forced on one page. } \keyword{internal} diff --git a/man/string_to_title.Rd b/man/string_to_title.Rd index 689fa332..00bd55c3 100644 --- a/man/string_to_title.Rd +++ b/man/string_to_title.Rd @@ -7,12 +7,23 @@ string_to_title(x) } \arguments{ -\item{x}{Input string} +\item{x}{(\code{character} or \code{factor})\cr Input string} } \value{ -String converted to title case (first letter of each word capitalized) +x converted to title case (first letter of each word capitalized) } \description{ Title Case Conversion +} +\examples{ +x <- c("THIS IS an eXaMple", "statement TO CAPItaliZe") +string_to_title(x) + +x <- factor( + c("OPTIMAL DOSE", "UNDERDOSE"), + levels = c("OPTIMAL DOSE", "UNDERDOSE", "OVERDOSE") +) +string_to_title(x) + } \keyword{internal} diff --git a/man/summarize_lsmeans_wide.Rd b/man/summarize_lsmeans_wide.Rd index 0976bfc1..3bcc7d8d 100644 --- a/man/summarize_lsmeans_wide.Rd +++ b/man/summarize_lsmeans_wide.Rd @@ -20,7 +20,7 @@ summarize_lsmeans_wide( ) } \arguments{ -\item{lyt}{empty layout, i.e. result of \code{\link[rtables:basic_table]{rtables::basic_table()}}} +\item{lyt}{(\code{layout})\cr empty layout, i.e. result of \code{\link[rtables:basic_table]{rtables::basic_table()}}} \item{variables}{(named \code{list} of \code{string})\cr list of additional analysis variables.} diff --git a/man/summarize_mmrm.Rd b/man/summarize_mmrm.Rd index f375243e..9d32924d 100644 --- a/man/summarize_mmrm.Rd +++ b/man/summarize_mmrm.Rd @@ -44,7 +44,7 @@ that is passed by \code{rtables}.} \item{alternative}{(\code{string})\cr whether \code{two.sided}, or one-sided \code{less} or \code{greater} p-value should be displayed.} -\item{show_relative}{should the 'reduction' (\code{control - treatment}, default) or the 'increase' +\item{show_relative}{(\code{string})\cr should the 'reduction' (\code{control - treatment}, default) or the 'increase' (\code{treatment - control}) be shown for the relative change from baseline?} \item{...}{eventually passed to \code{\link[=fit_mmrm_j]{fit_mmrm_j()}} via \code{\link[=h_summarize_mmrm]{h_summarize_mmrm()}}.} diff --git a/man/summarize_row_counts.Rd b/man/summarize_row_counts.Rd index e104a677..ea4ed8b8 100644 --- a/man/summarize_row_counts.Rd +++ b/man/summarize_row_counts.Rd @@ -18,8 +18,7 @@ generates the row label.} } \value{ A modified layout where the latest row split now has a row group -summaries (as created by \link[rtables:summarize_row_groups]{rtables::summarize_row_groups} for the counts. -for the counts. +summaries (as created by \link[rtables:summarize_row_groups]{rtables::summarize_row_groups} for the counts). } \description{ This is a simple wrapper of \code{\link[rtables:summarize_row_groups]{rtables::summarize_row_groups()}} and the main diff --git a/man/tabulate_lsmeans.Rd b/man/tabulate_lsmeans.Rd index 7723e249..58dc949d 100644 --- a/man/tabulate_lsmeans.Rd +++ b/man/tabulate_lsmeans.Rd @@ -39,7 +39,7 @@ a_lsmeans( \item{alternative}{(\code{string})\cr whether \code{two.sided}, or one-sided \code{less} or \code{greater} p-value should be displayed.} -\item{show_relative}{should the 'reduction' (\code{control - treatment}, default) or the 'increase' +\item{show_relative}{(\code{string})\cr should the 'reduction' (\code{control - treatment}, default) or the 'increase' (\code{treatment - control}) be shown for the relative change from baseline?} \item{ref_path}{(\code{character})\cr global reference group specification, see \code{\link[=get_ref_info]{get_ref_info()}}.} @@ -58,9 +58,11 @@ information on the \code{'auto'} setting.} unmodified default behavior. Can be negative.} } \value{ -for \code{s_lsmeans}, a list containing the same statistics returned by \link[tern.mmrm:tabulate_mmrm]{tern.mmrm::s_mmrm_lsmeans}, -with the additional \code{diff_mean_est_ci} three-dimensional statistic. For \code{a_lsmeans}, -a \code{VertalRowsSection} as returned by \link[rtables:in_rows]{rtables::in_rows}. +\itemize{ +\item For \code{s_lsmeans}, a list containing the same statistics returned by tern.mmrm::s_mmrm_lsmeans, +with the additional \code{diff_mean_est_ci} three-dimensional statistic. +\item For \code{a_lsmeans}, a \code{VertalRowsSection} as returned by \link[rtables:in_rows]{rtables::in_rows}. +} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} diff --git a/man/tabulate_rbmi.Rd b/man/tabulate_rbmi.Rd index 3b8f66bb..857eb9e7 100644 --- a/man/tabulate_rbmi.Rd +++ b/man/tabulate_rbmi.Rd @@ -55,9 +55,13 @@ information on the \code{'auto'} setting.} unmodified default behavior. Can be negative.} } \value{ -The \code{data.frame} with results of pooled analysis for a single visit. +\itemize{ +\item \code{h_tidy_pool()} returns a \code{data.frame} with results of pooled analysis for a single visit. +} -A list of statistics extracted from a tidied LS means data frame. +\itemize{ +\item \code{s_rbmi_lsmeans()} returns a list of statistics extracted from a tidied LS means data frame. +} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} diff --git a/man/theme_docx_default_j.Rd b/man/theme_docx_default_j.Rd new file mode 100644 index 00000000..8fe45e88 --- /dev/null +++ b/man/theme_docx_default_j.Rd @@ -0,0 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/docx_exporter_functions.R +\name{theme_docx_default_j} +\alias{theme_docx_default_j} +\title{Obtain the default theme for the docx} +\usage{ +theme_docx_default_j( + font = "Times New Roman", + font_size = 9L, + cell_margins = c(0, 0, 0, 0), + bold = c("header", "content_rows", "label_rows", "top_left"), + bold_manual = NULL, + border = flextable::fp_border_default(width = 0.75, color = "black") +) +} +\arguments{ +\item{font}{(\code{string})\cr font. Defaults to "Times New Roman".} + +\item{font_size}{(\code{integer(1)})\cr font size. Defaults to 9.} + +\item{cell_margins}{(\verb{numeric(1) or numeric(4)})\cr +a numeric or a vector of four numbers indicating +c("left", "right", "top", "bottom"). It defaults to 0mm in Word pt to all 4 margins.} + +\item{bold}{(\code{character})\cr parts of the table text that should be in bold. +Can be any combination of c("header", "content_rows", "label_rows", "top_left"). +The first one renders all column names bold (not topleft content). +The second and third option use formatters::make_row_df() to render +content or/and label rows as bold.} + +\item{bold_manual}{(\verb{named list or NULL})\cr list of index lists. +See example for needed structure. Accepted groupings/names are c("header", "body").} + +\item{border}{(\code{fp_border})\cr border to use. Defaults to width = 0.75 +and color = "black"} +} +\value{ +a function that applies the given theme to a flextable. +} +\description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} + +This function is based on \code{\link[rtables.officer:tt_to_flextable]{rtables.officer::theme_docx_default()}}. +See notes to understand why this is experimental. +} +\note{ +This function has been tested for common use cases but may not work or have +unexpected or undesired behavior in corner cases. As such it is not considered +fully production ready and is being made available for further testing +and early adoption. Please report any issues you encounter to the developers. +This function may be removed from junco in the future if the functionality +is merged into \code{rtables.officer}. +} diff --git a/man/tt_to_flextable_j.Rd b/man/tt_to_flextable_j.Rd new file mode 100644 index 00000000..1aa1e243 --- /dev/null +++ b/man/tt_to_flextable_j.Rd @@ -0,0 +1,131 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/docx_exporter_functions.R +\name{tt_to_flextable_j} +\alias{tt_to_flextable_j} +\title{Convert a VTableTree or a listing_df object to a flextable} +\usage{ +tt_to_flextable_j( + tt, + tblid, + theme = theme_docx_default_j(font = "Times New Roman", font_size = 9L, bold = NULL), + border = flextable::fp_border_default(width = 0.75, color = "black"), + indent_size = NULL, + titles_as_header = TRUE, + bold_titles = TRUE, + integrate_footers = TRUE, + counts_in_newline = FALSE, + paginate = FALSE, + fontspec = formatters::font_spec("Times", 9L, 1.2), + lpp = NULL, + cpp = NULL, + ..., + colwidths = NULL, + tf_wrap = !is.null(cpp), + max_width = cpp, + total_page_height = 10, + total_page_width = my_pg_width_by_orient(orientation), + autofit_to_page = TRUE, + orientation = "portrait", + nosplitin = character(), + string_map = junco::default_str_map, + markup_df_docx = dps_markup_df_docx, + reduce_first_col_indentation = FALSE, + tlgtype = (utils::getFromNamespace("tlg_type", "junco"))(tt), + col_gap = ifelse(tlgtype == "Listing", 0.5, 3), + pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE), + round_type = formatters::obj_round_type(tt), + alignments = list(), + border_mat = make_header_bordmat(obj = tt) +) +} +\arguments{ +\item{tt}{a VTableTree or a listing_df object} + +\item{tblid}{Character. Output ID to be displayed in the Title and last line of footer.} + +\item{theme}{(optional) a function factory. See theme_docx_default_j() +or rtables.officer::theme_docx_default() for more details.} + +\item{border}{(optional) an \code{fp_border} object.} + +\item{indent_size}{(optional) Numeric. Not used and set to 9 points internally.} + +\item{titles_as_header}{(optional) Default = TRUE.} + +\item{bold_titles}{(optional) Default = TRUE.} + +\item{integrate_footers}{(optional) Default = TRUE.} + +\item{counts_in_newline}{(optional) Default = FALSE.} + +\item{paginate}{(optional) Default = FALSE.} + +\item{fontspec}{(optional) a font_spec object.} + +\item{lpp}{(optional) Default = NULL. Not used.} + +\item{cpp}{(optional) Default = NULL. Not used.} + +\item{...}{other arguments.} + +\item{colwidths}{(optional) Default = NULL.} + +\item{tf_wrap}{(optional) Default = FALSE. Not used.} + +\item{max_width}{(optional) Default = NULL. Not used.} + +\item{total_page_height}{(optional) Default = 10. Not used.} + +\item{total_page_width}{(optional). No need to be specified by end user. +Set to 6.38 ("portrait") or 8.88 ("landscape").} + +\item{autofit_to_page}{(optional) Default = TRUE. Not used and set to FALSE internally.} + +\item{orientation}{(optional) Default = "portrait". +One of: "portrait", "landscape".} + +\item{nosplitin}{(optional) Default = character(). Named list.} + +\item{string_map}{(optional) Default = default_str_map.} + +\item{markup_df_docx}{(optional) Default = dps_markup_df_docx.} + +\item{reduce_first_col_indentation}{(optional) Default = FALSE.} + +\item{tlgtype}{(optional). No need to be specified by end user.} + +\item{col_gap}{(optional). Default = 3 (Tables) or 0.5 (Listings).} + +\item{pagenum}{(optional). Default = FALSE (Tables) or TRUE (Listings).} + +\item{round_type}{(\code{"iec"} or \code{"sas"})\cr the type of rounding to perform. iec, +the default, performs rounding compliant with IEC 60559, while +sas performs nearest-value rounding consistent with rounding within SAS. +See \verb{[formatters::format_value()]} for more details.} + +\item{alignments}{(\code{list})\cr List of named lists. Vectorized. +(Default = \code{list()}) Used to specify individual column or cell alignments. +Each named list contains \code{row}, \code{col}, and \code{value}.} + +\item{border_mat}{(\code{matrix})\cr A \verb{m x k} matrix where m is the number of columns of \code{tt} +and k is the number of lines the header takes up. See \link[tidytlg:add_bottom_borders]{tidytlg::add_bottom_borders} +for what the matrix should contain. Users should only specify this when the +default behavior does not meet their needs.} +} +\value{ +a flextable object. +} +\description{ +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} + +This function is based on \code{\link[rtables.officer:tt_to_flextable]{rtables.officer::tt_to_flextable()}}. +See notes to understand why this is experimental. +} +\note{ +This function has been tested for common use cases but may not work or have +unexpected or undesired behavior in corner cases. As such it is not considered +fully production ready and is being made available for further testing +and early adoption. Please report any issues you encounter to the developers. +This function may be removed from junco in the future if the functionality +is merged into \code{rtables.officer}. +} diff --git a/man/tt_to_tbldf.Rd b/man/tt_to_tbldf.Rd index 47710c8e..a2434b02 100644 --- a/man/tt_to_tbldf.Rd +++ b/man/tt_to_tbldf.Rd @@ -8,20 +8,29 @@ tt_to_tbldf( tt, fontspec = font_spec("Times", 9L, 1), string_map = default_str_map, - markup_df = dps_markup_df + markup_df = dps_markup_df, + round_type = obj_round_type(tt), + validate = TRUE ) } \arguments{ -\item{tt}{TableTree object to convert to a data frame} +\item{tt}{(\code{TableTree})\cr TableTree object to convert to a data frame} -\item{fontspec}{Font specification object} +\item{fontspec}{(\code{font_spec})\cr Font specification object} -\item{string_map}{Unicode mapping for special characters} +\item{string_map}{(\code{list})\cr Unicode mapping for special characters} -\item{markup_df}{Data frame containing markup information} +\item{markup_df}{(\code{data.frame})\cr Data frame containing markup information} + +\item{round_type}{(\code{character(1)})\cr the type of rounding to perform. +See \code{\link[formatters:format_value]{formatters::format_value()}} for more details.} + +\item{validate}{logical(1). Whether to validate the table structure using +\code{rtables::validate_table_struct()}. Defaults to \code{TRUE}. If \code{FALSE}, a message +will be displayed instead of stopping with an error when validation fails.} } \value{ -\code{tt} represented as a "tbl" data.frame suitable for passing +\code{tt} represented as a \code{tbl} data.frame suitable for passing to \link[tidytlg:gentlg]{tidytlg::gentlg} via the \code{huxme} argument. } \description{ diff --git a/man/tt_to_tlgrtf.Rd b/man/tt_to_tlgrtf.Rd index dccf2019..de3365f7 100644 --- a/man/tt_to_tlgrtf.Rd +++ b/man/tt_to_tlgrtf.Rd @@ -26,62 +26,76 @@ tt_to_tlgrtf( combined_rtf = FALSE, one_table = TRUE, border_mat = make_header_bordmat(obj = tt), + round_type = obj_round_type(tt), + alignments = list(), + validate = TRUE, ... ) } \arguments{ -\item{tt}{TableTree object to convert to RTF} +\item{tt}{(\code{TableTree})\cr TableTree object to convert to RTF} -\item{file}{character(1). File to create, including path, but excluding +\item{file}{(\code{character(1)})\cr File to create, including path, but excluding .rtf extension.} -\item{orientation}{Orientation of the output ("portrait" or "landscape")} +\item{orientation}{(\code{character})\cr Orientation of the output ("portrait" or "landscape")} -\item{colwidths}{Column widths for the table} +\item{colwidths}{(\code{numeric} vector)\cr Column widths for the table} -\item{label_width_ins}{Label width in inches} +\item{label_width_ins}{(\code{numeric})\cr Label width in inches} \item{watermark}{(optional) String containing the desired watermark for RTF outputs. Vectorized.} -\item{pagenum}{(optional) Logical. When true page numbers are added on the -right side of the footer section in the format page x/y. -Vectorized. (Default = FALSE)} +\item{pagenum}{(\code{logical})\cr Whether to add page numbers to the output. +Only applicable to listings (i.e. it is ignored for tables and figures).} -\item{fontspec}{Font specification object} +\item{fontspec}{(\code{font_spec})\cr Font specification object} -\item{pg_width}{Page width in inches} +\item{pg_width}{(\code{numeric})\cr Page width in inches} -\item{margins}{Margins in inches (top, right, bottom, left)} +\item{margins}{(\code{numeric} vector)\cr Margins in inches (top, right, bottom, left)} -\item{paginate}{Whether to paginate the output} +\item{paginate}{(\code{logical})\cr Whether to paginate the output} -\item{col_gap}{Column gap in spaces} +\item{col_gap}{(\code{numeric})\cr Column gap in spaces} -\item{nosplitin}{list(row=, col=). Path elements whose children should not be paginated within +\item{nosplitin}{(\code{list})\cr list(row=, col=). Path elements whose children should not be paginated within if it can be avoided. e.g., list(col="TRT01A") means don't split within treatment arms unless all the associated columns don't fit on a single page.} -\item{verbose}{Whether to print verbose output} +\item{verbose}{(\code{logical})\cr Whether to print verbose output} -\item{tlgtype}{Type of the output (Table, Listing, or Figure)} +\item{tlgtype}{(\code{character})\cr Type of the output (Table, Listing, or Figure)} -\item{string_map}{Unicode mapping for special characters} +\item{string_map}{(\code{data.frame})\cr Unicode mapping for special characters} -\item{markup_df}{Data frame containing markup information} +\item{markup_df}{(\code{data.frame})\cr Data frame containing markup information} -\item{combined_rtf}{logical(1). In the case where the result is broken up into multiple +\item{combined_rtf}{(\code{logical(1)})\cr In the case where the result is broken up into multiple parts due to width, should a combined rtf file also be created. Defaults to \code{FALSE}.} -\item{one_table}{logical(1). If \code{tt} is a (non-\code{MatrixPrintForm}) list, +\item{one_table}{(\code{logical(1)})\cr If \code{tt} is a (non-\code{MatrixPrintForm}) list, should the parts be added to the rtf within a single table (\code{TRUE}, the default) or as separate tables. End users will not generally need to set this.} -\item{border_mat}{matrix. A \verb{m x k} matrix where m is the number of columns of \code{tt} +\item{border_mat}{(\code{matrix})\cr A \verb{m x k} matrix where m is the number of columns of \code{tt} and k is the number of lines the header takes up. See \link[tidytlg:add_bottom_borders]{tidytlg::add_bottom_borders} for what the matrix should contain. Users should only specify this when the default behavior does not meet their needs.} +\item{round_type}{(\code{character(1)})\cr the type of rounding to perform. +See \code{\link[formatters:format_value]{formatters::format_value()}} for more details.} + +\item{alignments}{(\code{list})\cr List of named lists. Vectorized. +(Default = \code{list()}) Used to specify individual column or cell alignments. +Each named list contains \code{row}, \code{col}, and \code{value}, which are passed to +\code{\link[huxtable:align]{huxtable::set_align()}} to set the alignments.} + +\item{validate}{logical(1). Whether to validate the table structure using +\code{rtables::validate_table_struct()}. Defaults to \code{TRUE}. If \code{FALSE}, a message +will be displayed when validation fails.} + \item{...}{Additional arguments passed to gentlg} } \value{ @@ -106,6 +120,3 @@ split the remaining available width. This will cause, e.g., the elements within the allparts rtf generated when \code{combined_rtf} is \code{TRUE} to differ visually from the content of the individual part rtfs. } -\seealso{ -Used in all table and listing scripts -} diff --git a/tests/testthat.R b/tests/testthat.R index e3af93eb..dee6bbca 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -6,6 +6,7 @@ # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview # * https://testthat.r-lib.org/articles/special-files.html +options(rgl.useNULL = TRUE) library(testthat) library(junco) diff --git a/tests/testthat/_snaps/a_freq_j.md b/tests/testthat/_snaps/a_freq_j.md new file mode 100644 index 00000000..250992b7 --- /dev/null +++ b/tests/testthat/_snaps/a_freq_j.md @@ -0,0 +1,57 @@ +# a_freq_j with label_map works in a table layout as expected + + Code + result + Output + A B + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + No Response 30/50 (60.0%) 28/50 (56.0%) + Response 20/50 (40.0%) 22/50 (44.0%) + +# a_freq_j with label_map restricts the values according to row split and label_map + + Code + result + Output + A B + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + Baseline + Response A 6/50 (12.0%) 4/50 (8.0%) + Response B 6/50 (12.0%) 4/50 (8.0%) + Week 1 + Response C 3/50 (6.0%) 7/50 (14.0%) + Response D 9/50 (18.0%) 7/50 (14.0%) + +# a_freq_j_with_exclude allows to exclude row split levels from the analysis + + Code + result + Output + A B + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + Baseline + Response A 6/50 (12.0%) 4/50 (8.0%) + Response B 6/50 (12.0%) 4/50 (8.0%) + +# a_freq_j in specific situation error for not passing alt_counts_df + + Code + result + Output + Active Study Agent Risk Difference (%) (95% CI) + A: Drug X C: Combination B: Placebo A: Drug X vs B: Placebo C: Combination vs B: Placebo + (N=134) (N=132) (N=134) (N=134) (N=132) + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + A + COMPLETED 22 (16.4%) 22 (16.7%) 23 (17.2%) -0.7 (-9.7, 8.2) -0.5 (-9.5, 8.5) + DISCONTINUED 11 (8.2%) 13 (9.8%) 13 (9.7%) -1.5 (-8.3, 5.3) 0.1 (-7.0, 7.3) + ONGOING 5 (3.7%) 5 (3.8%) 8 (6.0%) -2.2 (-7.4, 2.9) -2.2 (-7.3, 3.0) + B + COMPLETED 23 (17.2%) 23 (17.4%) 19 (14.2%) 3.0 (-5.7, 11.7) 3.2 (-5.5, 12.0) + DISCONTINUED 12 (9.0%) 14 (10.6%) 18 (13.4%) -4.5 (-12.0, 3.1) -2.8 (-10.6, 5.0) + ONGOING 12 (9.0%) 6 (4.5%) 8 (6.0%) 3.0 (-3.3, 9.3) -1.4 (-6.8, 3.9) + C + COMPLETED 24 (17.9%) 27 (20.5%) 27 (20.1%) -2.2 (-11.6, 7.2) 0.3 (-9.4, 10.0) + DISCONTINUED 15 (11.2%) 12 (9.1%) 12 (9.0%) 2.2 (-5.0, 9.4) 0.1 (-6.8, 7.0) + ONGOING 10 (7.5%) 10 (7.6%) 6 (4.5%) 3.0 (-2.7, 8.6) 3.1 (-2.6, 8.8) + diff --git a/tests/testthat/_snaps/a_summarize_aval_chg_diff.md b/tests/testthat/_snaps/a_summarize_aval_chg_diff.md new file mode 100644 index 00000000..241d9131 --- /dev/null +++ b/tests/testthat/_snaps/a_summarize_aval_chg_diff.md @@ -0,0 +1,72 @@ +# a_summarize_aval_chg_diff_j comp_btw_group = FALSE works as expected + + Code + tbl + Output + A: Drug X B: Placebo C: Combination + n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + DIABP + BASELINE 134/134 (100.0%) 48.60 (47.24, 49.96) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.44 (49.08, 51.80) 0.00 (0.00, 0.00) 132/132 (100.0%) 51.11 (49.77, 52.45) 0.00 (0.00, 0.00) + WEEK 1 DAY 8 134/134 (100.0%) 50.26 (48.98, 51.54) 1.66 (-0.18, 3.50) 134/134 (100.0%) 49.67 (48.35, 51.00) -0.77 (-2.64, 1.10) 132/132 (100.0%) 48.86 (47.50, 50.21) -2.25 (-4.04, -0.46) + WEEK 2 DAY 15 134/134 (100.0%) 50.84 (49.49, 52.18) 2.23 (0.23, 4.24) 134/134 (100.0%) 49.72 (48.27, 51.16) -0.72 (-2.85, 1.40) 132/132 (100.0%) 49.98 (48.55, 51.42) -1.13 (-3.13, 0.88) + PULSE + BASELINE 134/134 (100.0%) 51.86 (50.48, 53.24) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.27 (48.76, 51.77) 0.00 (0.00, 0.00) 132/132 (100.0%) 50.25 (48.64, 51.87) 0.00 (0.00, 0.00) + WEEK 1 DAY 8 134/134 (100.0%) 50.06 (48.64, 51.49) -1.80 (-3.78, 0.18) 134/134 (100.0%) 49.27 (47.98, 50.55) -1.00 (-2.98, 0.98) 132/132 (100.0%) 49.80 (48.48, 51.11) -0.46 (-2.63, 1.71) + WEEK 2 DAY 15 134/134 (100.0%) 49.71 (48.21, 51.21) -2.15 (-4.26, -0.04) 134/134 (100.0%) 50.83 (49.53, 52.13) 0.56 (-1.45, 2.58) 132/132 (100.0%) 49.06 (47.74, 50.38) -1.20 (-3.15, 0.75) + +--- + + Code + tbl2 + Output + A: Drug X B: Placebo C: Combination + n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + DIABP + BASELINE 134/134 (100.0%) 48.60 (47.24, 49.96) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.44 (49.08, 51.80) 0.00 (0.00, 0.00) 132/132 (100.0%) 51.11 (49.77, 52.45) 0.00 (0.00, 0.00) + WEEK 1 DAY 8 134/134 (100.0%) 50.26 (48.98, 51.54) 1.66 (-0.18, 3.50) 134/134 (100.0%) 49.67 (48.35, 51.00) -0.77 (-2.64, 1.10) 132/132 (100.0%) 48.86 (47.50, 50.21) -2.25 (-4.04, -0.46) + WEEK 2 DAY 15 134/134 (100.0%) 50.84 (49.49, 52.18) 2.23 (0.23, 4.24) 134/134 (100.0%) 49.72 (48.27, 51.16) -0.72 (-2.85, 1.40) 132/132 (100.0%) 49.98 (48.55, 51.42) -1.13 (-3.13, 0.88) + PULSE + BASELINE 134/134 (100.0%) 51.86 (50.48, 53.24) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.27 (48.76, 51.77) 0.00 (0.00, 0.00) 132/132 (100.0%) 50.25 (48.64, 51.87) 0.00 (0.00, 0.00) + WEEK 1 DAY 8 134/134 (100.0%) 50.06 (48.64, 51.49) -1.80 (-3.78, 0.18) 134/134 (100.0%) 49.27 (47.98, 50.55) -1.00 (-2.98, 0.98) 132/132 (100.0%) 49.80 (48.48, 51.11) -0.46 (-2.63, 1.71) + WEEK 2 DAY 15 134/134 (100.0%) 49.71 (48.21, 51.21) -2.15 (-4.26, -0.04) 134/134 (100.0%) 50.83 (49.53, 52.13) 0.56 (-1.45, 2.58) 132/132 (100.0%) 49.06 (47.74, 50.38) -1.20 (-3.15, 0.75) + +# a_summarize_aval_chg_diff_j t-test sparse data works as expected + + Code + tbl + Output + Active treatment + A: Drug X C: Combination B: Placebo Difference in Mean Change (95% CI) + (N=134) (N=132) (N=134) A: Drug X vs B: Placebo C: Combination vs B: Placebo + n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + DIABP + BASELINE 134/134 (100.0%) 48.60 (47.24, 49.96) 0.00 (0.00, 0.00) 132/132 (100.0%) 51.11 (49.77, 52.45) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.44 (49.08, 51.80) 0.00 (0.00, 0.00) 0.00 (, ) 0.00 (, ) + WEEK 1 DAY 8 134/134 (100.0%) 50.26 (48.98, 51.54) 1.66 (-0.18, 3.50) 132/132 (100.0%) 48.86 (47.50, 50.21) -2.25 (-4.04, -0.46) 134/134 (100.0%) 49.67 (48.35, 51.00) -0.77 (-2.64, 1.10) 2.43 (-0.19, 5.04) -1.48 (-4.06, 1.09) + WEEK 2 DAY 15 134/134 (100.0%) 50.84 (49.49, 52.18) 2.23 (0.23, 4.24) 132/132 (100.0%) 49.98 (48.55, 51.42) -1.13 (-3.13, 0.88) 134/134 (100.0%) 49.72 (48.27, 51.16) -0.72 (-2.85, 1.40) 2.96 (0.05, 5.87) -0.40 (-3.31, 2.51) + PULSE + BASELINE 134/134 (100.0%) 51.86 (50.48, 53.24) 0.00 (0.00, 0.00) 132/132 (100.0%) 50.25 (48.64, 51.87) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.27 (48.76, 51.77) 0.00 (0.00, 0.00) 0.00 (, ) 0.00 (, ) + WEEK 1 DAY 8 134/134 (100.0%) 50.06 (48.64, 51.49) -1.80 (-3.78, 0.18) 132/132 (100.0%) 49.80 (48.48, 51.11) -0.46 (-2.63, 1.71) 134/134 (100.0%) 49.27 (47.98, 50.55) -1.00 (-2.98, 0.98) -0.79 (-3.58, 1.99) 0.54 (-2.38, 3.47) + WEEK 2 DAY 15 134/134 (100.0%) 49.71 (48.21, 51.21) -2.15 (-4.26, -0.04) 132/132 (100.0%) 49.06 (47.74, 50.38) -1.20 (-3.15, 0.75) 134/134 (100.0%) 50.83 (49.53, 52.13) 0.56 (-1.45, 2.58) -2.71 (-5.62, 0.19) -1.76 (-4.55, 1.03) + +--- + + Code + tbl2 + Output + Active treatment + A: Drug X C: Combination B: Placebo Difference in Mean Change (95% CI) + (N=134) (N=132) (N=134) A: Drug X vs B: Placebo C: Combination vs B: Placebo + n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) n/N (%) Mean (95% CI) Mean Change From Baseline (95% CI) + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + DIABP + BASELINE 134/134 (100.0%) 48.60 (47.24, 49.96) 0.00 (0.00, 0.00) 132/132 (100.0%) 51.11 (49.77, 52.45) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.44 (49.08, 51.80) 0.00 (0.00, 0.00) 0.00 (, ) 0.00 (, ) + WEEK 1 DAY 8 2/134 (1.5%) 50.00 (50.00, 50.00) -5.00 (-5.00, -5.00) 2/132 (1.5%) 52.81 (-31.04, 136.65) -1.58 (-40.03, 36.86) 2/134 (1.5%) 45.00 (45.00, 45.00) -7.00 (-7.00, -7.00) 2.00 (, ) 5.42 (-33.03, 43.86) + WEEK 2 DAY 15 134/134 (100.0%) 50.84 (49.49, 52.18) 2.23 (0.23, 4.24) 132/132 (100.0%) 49.98 (48.55, 51.42) -1.13 (-3.13, 0.88) 134/134 (100.0%) 49.72 (48.27, 51.16) -0.72 (-2.85, 1.40) 2.96 (0.05, 5.87) -0.40 (-3.31, 2.51) + PULSE + BASELINE 134/134 (100.0%) 51.86 (50.48, 53.24) 0.00 (0.00, 0.00) 132/132 (100.0%) 50.25 (48.64, 51.87) 0.00 (0.00, 0.00) 134/134 (100.0%) 50.27 (48.76, 51.77) 0.00 (0.00, 0.00) 0.00 (, ) 0.00 (, ) + WEEK 1 DAY 8 134/134 (100.0%) 50.06 (48.64, 51.49) -1.80 (-3.78, 0.18) 132/132 (100.0%) 49.80 (48.48, 51.11) -0.46 (-2.63, 1.71) 134/134 (100.0%) 49.27 (47.98, 50.55) -1.00 (-2.98, 0.98) -0.79 (-3.58, 1.99) 0.54 (-2.38, 3.47) + WEEK 2 DAY 15 134/134 (100.0%) 49.71 (48.21, 51.21) -2.15 (-4.26, -0.04) 132/132 (100.0%) 49.06 (47.74, 50.38) -1.20 (-3.15, 0.75) 134/134 (100.0%) 50.83 (49.53, 52.13) 0.56 (-1.45, 2.58) -2.71 (-5.62, 0.19) -1.76 (-4.55, 1.03) + diff --git a/tests/testthat/_snaps/cmhrms.md b/tests/testthat/_snaps/cmhrms.md new file mode 100644 index 00000000..be36ee50 --- /dev/null +++ b/tests/testthat/_snaps/cmhrms.md @@ -0,0 +1,19 @@ +# a_cmhrms_j works in a table layout as expected + + Code + res + Output + A B + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + p-value 0.524 + +# a_cmhrms_j_with_exclude works in a table layout as expected + + Code + res + Output + A B + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + Week 1 + p-value 0.040 + diff --git a/tests/testthat/_snaps/colwidths.md b/tests/testthat/_snaps/colwidths.md new file mode 100644 index 00000000..c49a3feb --- /dev/null +++ b/tests/testthat/_snaps/colwidths.md @@ -0,0 +1,10 @@ +# find_free_colspc works as expected + + Code + result + Output + colwidth lines cell_lines lbl_lines min_cell_lines max_cell_lines col_num + 2 22 28 25 3 1 3 1 + 19 27 10 9 1 1 1 2 + 22 39 10 9 1 1 1 3 + diff --git a/tests/testthat/_snaps/coxreg_multivar.md b/tests/testthat/_snaps/coxreg_multivar.md index 0fbca21e..02aaec89 100644 --- a/tests/testthat/_snaps/coxreg_multivar.md +++ b/tests/testthat/_snaps/coxreg_multivar.md @@ -80,10 +80,10 @@ Coeff. (SE) p-value Estimate 50% CI β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” Model Parameter - Treatment (B: Placebo vs. A: Drug X) 0 (0) <0.001 1.5170 (1.4, 1.6) - Treatment (C: Combination vs. A: Drug X) 1 (0) <0.001 1.9203 (1.8, 2.1) - Sex (M vs. F) 0 (0) 0.099 0.8813 (0.8, 0.9) - Age 0 (0) 0.646 1.0024 (1.0, 1.0) + Treatment (B: Placebo vs. A: Drug X) 0.4 (0.1) <0.001 1.5170 (1.4, 1.6) + Treatment (C: Combination vs. A: Drug X) 0.7 (0.1) <0.001 1.9203 (1.8, 2.1) + Sex (M vs. F) -0.1 (0.1) 0.099 0.8813 (0.8, 0.9) + Age 0.0 (0.0) 0.646 1.0024 (1.0, 1.0) # summarize_coxreg_multivar works with row splits diff --git a/tests/testthat/_snaps/docx_exporter_functions.md b/tests/testthat/_snaps/docx_exporter_functions.md new file mode 100644 index 00000000..69c2a2a8 --- /dev/null +++ b/tests/testthat/_snaps/docx_exporter_functions.md @@ -0,0 +1,53602 @@ +# tt_to_flextable_j() works fine with Tables + + Code + res$header + Output + $dataset + V1 V2 V3 V4 + 1 V1 V2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 + + $hrule + [1] "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 USA 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + [1] V1 V2 V3 V4 + <0 rows> (or 0-length row.names) + + $content + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + [1] 1.974762 1.468413 1.468413 1.468413 + + $rowheights + numeric(0) + + $hrule + character(0) + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + + $spans$columns + [,1] [,2] [,3] [,4] + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1A: Drug X (N=134)B: Placebo (N=134)C: Combination (N=132)\n body 1CHN74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2USA10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CAN3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n \n \n \n \n \n \n \n \n" + +--- + + Code + res$header + Output + $dataset + V1 V2 + 1 output ID:\tThis is the main Title output ID:\tThis is the main Title + 2 V1 V2 + V3 V4 + 1 output ID:\tThis is the main Title output ID:\tThis is the main Title + 2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 0.3969338 + + $hrule + [1] "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 4 0 0 0 + [2,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "white" "white" "white" "white" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "left" "left" "left" + [2,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0.0 0 0 0 + [2,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] "left_0.8" NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 10 10 10 10 + [2,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] TRUE TRUE TRUE TRUE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 USA 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + V1 V2 V3 V4 + 1 + 2 footer 1 footer 1 footer 1 footer 1 + 3 footer 2 footer 2 footer 2 footer 2 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.25 0.25 0.25 + + $hrule + [1] "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 4 0 0 0 + [2,] 4 0 0 0 + [3,] 4 0 0 0 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "center" "center" "center" + [2,] "bottom" "center" "center" "center" + [3,] "bottom" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "left" "left" "left" + [2,] "left" "left" "left" "left" + [3,] "left" "left" "left" "left" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1output ID:This is the main Title\n header 2A: Drug X (N=134)B: Placebo (N=134)C: Combination (N=132)\n body 1CHN74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2USA10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CAN3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n footer 1\n footer 2footer 1\n footer 3footer 2\n \n \n \n \n \n \n \n \n" + +--- + + Code + res$header + Output + $dataset + V1 V2 + 1 output ID:\tThis is the main Title output ID:\tThis is the main Title + 2 V1 V2 + V3 V4 + 1 output ID:\tThis is the main Title output ID:\tThis is the main Title + 2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 0.3969338 + + $hrule + [1] "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 4 0 0 0 + [2,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "white" "white" "white" "white" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "left" "left" "left" + [2,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0.0 0 0 0 + [2,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] "left_0.8" NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 10 10 10 10 + [2,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] TRUE TRUE TRUE TRUE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 USA 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN β‰₯ 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN~[super a] 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + V1 + 1 + 2 ~{super a}Canada + 3 This ~{optional text should} stay the same + V2 + 1 + 2 ~{super a}Canada + 3 This ~{optional text should} stay the same + V3 + 1 + 2 ~{super a}Canada + 3 This ~{optional text should} stay the same + V4 + 1 + 2 ~{super a}Canada + 3 This ~{optional text should} stay the same + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.25 0.25 0.25 + + $hrule + [1] "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 4 0 0 0 + [2,] 4 0 0 0 + [3,] 4 0 0 0 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "center" "center" "center" + [2,] "bottom" "center" "center" "center" + [3,] "bottom" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "left" "left" "left" + [2,] "left" "left" "left" "left" + [3,] "left" "left" "left" "left" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1output ID:This is the main Title\n header 2A: Drug X (N=134)B: Placebo (N=134)C: Combination (N=132)\n body 1CHN74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2USA10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN β‰₯5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CANa3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n footer 1\n footer 2aCanada\n footer 3This text should stay the same\n \n \n \n \n \n \n \n \n" + +--- + + Code + res$header + Output + $dataset + V1 V2 V3 V4 + 1 V1 V2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 + + $hrule + [1] "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "right" "right" "right" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 USA 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "left" "center" "center" + [5,] "left" "left" "center" "center" + [6,] "right" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + [1] V1 V2 V3 V4 + <0 rows> (or 0-length row.names) + + $content + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + [1] 1.974762 1.468413 1.468413 1.468413 + + $rowheights + numeric(0) + + $hrule + character(0) + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + + $spans$columns + [,1] [,2] [,3] [,4] + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1A: Drug X (N=134)B: Placebo (N=134)C: Combination (N=132)\n body 1CHN74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2USA10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CAN3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n \n \n \n \n \n \n \n \n" + +# tt_to_flextable_j() works fine with border_mat + + Code + res$header + Output + $dataset + V1 V2 V3 V4 + 1 Active Study Agent Active Study Agent + 2 A: Drug X C: Combination B: Placebo + 3 V1 V2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 0.3969338 0.3969338 + + $hrule + [1] "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 2 0 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.75 0.75 0.00 + [2,] 0.00 0.00 0.00 0.75 + [3,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.00 0.75 0.75 0.00 + [3,] 0.00 0.00 0.00 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "#666666" "black" "black" "#666666" + [2,] "#666666" "#666666" "#666666" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "#666666" "black" "black" "#666666" + [3,] "#666666" "#666666" "#666666" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + [3,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + [3,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 3.6 0 0 0 + [2,] 3.6 0 0 0 + [3,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 64/132 (48.5%) 81/134 (60.4%) + 2 USA 10/134 (7.5%) 17/132 (12.9%) 13/134 (9.7%) + 3 BRA 13/134 (9.7%) 10/132 (7.6%) 7/134 (5.2%) + 4 PAK 12/134 (9.0%) 10/132 (7.6%) 9/134 (6.7%) + 5 NGA 8/134 (6.0%) 11/132 (8.3%) 7/134 (5.2%) + 6 RUS 5/134 (3.7%) 6/132 (4.5%) 8/134 (6.0%) + 7 JPN 5/134 (3.7%) 9/132 (6.8%) 4/134 (3.0%) + 8 GBR 4/134 (3.0%) 2/132 (1.5%) 3/134 (2.2%) + 9 CAN 3/134 (2.2%) 3/132 (2.3%) 2/134 (1.5%) + 10 CHE 0/134 (0.0%) 0/132 (0.0%) 0/134 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + [1] V1 V2 V3 V4 + <0 rows> (or 0-length row.names) + + $content + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + [1] 1.974762 1.468413 1.468413 1.468413 + + $rowheights + numeric(0) + + $hrule + character(0) + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + + $spans$columns + [,1] [,2] [,3] [,4] + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1Active Study Agent \n header 2A: Drug XC: CombinationB: Placebo\n header 3N=134N=132N=134\n body 1CHN74/134 (55.2%)64/132 (48.5%)81/134 (60.4%)\n body 2USA10/134 (7.5%)17/132 (12.9%)13/134 (9.7%)\n body 3BRA13/134 (9.7%)10/132 (7.6%)7/134 (5.2%)\n body 4PAK12/134 (9.0%)10/132 (7.6%)9/134 (6.7%)\n body 5NGA8/134 (6.0%)11/132 (8.3%)7/134 (5.2%)\n body 6RUS5/134 (3.7%)6/132 (4.5%)8/134 (6.0%)\n body 7JPN5/134 (3.7%)9/132 (6.8%)4/134 (3.0%)\n body 8GBR4/134 (3.0%)2/132 (1.5%)3/134 (2.2%)\n body 9CAN3/134 (2.2%)3/132 (2.3%)2/134 (1.5%)\n body10CHE0/134 (0.0%)0/132 (0.0%)0/134 (0.0%)\n \n \n \n \n \n \n \n \n" + +# tt_to_flextable_j() works fine with Listings + + Code + res$header + Output + $dataset + COL0 COL1 COL2 + 1 COL0 COL1 COL2 + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.3983511 + + $hrule + [1] "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 1 1 1 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "bottom" "bottom" "bottom" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "#666666" "#666666" "#666666" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "#666666" "#666666" "#666666" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 1 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + COL0 COL1 + 1 A: Drug X AB12345-BRA-1-id-134 + 2 AB12345-BRA-1-id-42 + 3 AB12345-BRA-1-id-93 + 4 AB12345-BRA-11-id-345 + 5 AB12345-BRA-11-id-397 + 6 AB12345-BRA-11-id-50 + 7 AB12345-BRA-13-id-177 + 8 AB12345-BRA-14-id-23 + 9 AB12345-BRA-15-id-36 + 10 AB12345-BRA-2-id-296 + 11 B: Placebo AB12345-BRA-1-id-236 + 12 AB12345-BRA-1-id-65 + 13 AB12345-BRA-12-id-59 + 14 AB12345-BRA-2-id-101 + 15 AB12345-BRA-3-id-8 + 16 AB12345-BRA-4-id-383 + 17 AB12345-CAN-1-id-341 + 18 AB12345-CAN-4-id-331 + 19 AB12345-CHN-1-id-107 + 20 AB12345-CHN-1-id-12 + 21 C: Combination AB12345-BRA-1-id-141 + 22 AB12345-BRA-1-id-265 + 23 AB12345-BRA-11-id-237 + 24 AB12345-BRA-11-id-321 + 25 AB12345-BRA-11-id-9 + 26 AB12345-BRA-14-id-120 + 27 AB12345-BRA-4-id-368 + 28 AB12345-BRA-5-id-234 + 29 AB12345-BRA-7-id-301 + 30 AB12345-CAN-11-id-306 + COL2 + 1 47 / M / WHITE + 2 36 / M / BLACK OR AFRICAN AMERICAN + 3 34 / F / ASIAN + 4 37 / F / WHITE + 5 38 / M / ASIAN + 6 26 / M / BLACK OR AFRICAN AMERICAN + 7 24 / M / WHITE + 8 37 / M / ASIAN + 9 38 / F / ASIAN + 10 44 / F / ASIAN + 11 32 / M / BLACK OR AFRICAN AMERICAN + 12 25 / F / BLACK OR AFRICAN AMERICAN + 13 36 / M / BLACK OR AFRICAN AMERICAN + 14 34 / M / ASIAN + 15 25 / F / BLACK OR AFRICAN AMERICAN + 16 30 / F / ASIAN + 17 43 / F / ASIAN + 18 34 / F / AMERICAN INDIAN OR ALASKA NATIVE + 19 41 / M / BLACK OR AFRICAN AMERICAN + 20 42 / F / BLACK OR AFRICAN AMERICAN + 21 35 / F / WHITE + 22 25 / M / WHITE + 23 64 / F / ASIAN + 24 33 / F / ASIAN + 25 40 / M / ASIAN + 26 33 / F / ASIAN + 27 46 / M / BLACK OR AFRICAN AMERICAN + 28 32 / M / WHITE + 29 35 / M / ASIAN + 30 37 / F / ASIAN + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 + [11,] data.frame,19 data.frame,19 data.frame,19 + [12,] data.frame,19 data.frame,19 data.frame,19 + [13,] data.frame,19 data.frame,19 data.frame,19 + [14,] data.frame,19 data.frame,19 data.frame,19 + [15,] data.frame,19 data.frame,19 data.frame,19 + [16,] data.frame,19 data.frame,19 data.frame,19 + [17,] data.frame,19 data.frame,19 data.frame,19 + [18,] data.frame,19 data.frame,19 data.frame,19 + [19,] data.frame,19 data.frame,19 data.frame,19 + [20,] data.frame,19 data.frame,19 data.frame,19 + [21,] data.frame,19 data.frame,19 data.frame,19 + [22,] data.frame,19 data.frame,19 data.frame,19 + [23,] data.frame,19 data.frame,19 data.frame,19 + [24,] data.frame,19 data.frame,19 data.frame,19 + [25,] data.frame,19 data.frame,19 data.frame,19 + [26,] data.frame,19 data.frame,19 data.frame,19 + [27,] data.frame,19 data.frame,19 data.frame,19 + [28,] data.frame,19 data.frame,19 data.frame,19 + [29,] data.frame,19 data.frame,19 data.frame,19 + [30,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.4266986 0.3984257 0.3983511 0.3983511 0.3983511 0.3983511 0.3982765 + [8] 0.3983511 0.3983511 0.3982765 0.3984257 0.3983511 0.3984257 0.3983511 + [15] 0.3983511 0.3983511 0.3983511 0.3984257 0.3983511 0.3983511 0.3983511 + [22] 0.3982765 0.3982765 0.3983511 0.3982765 0.3983511 0.3983511 0.3983511 + [29] 0.3983511 0.3983511 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + [11] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + [21] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "top" "top" "top" + [2,] "top" "top" "top" + [3,] "top" "top" "top" + [4,] "top" "top" "top" + [5,] "top" "top" "top" + [6,] "top" "top" "top" + [7,] "top" "top" "top" + [8,] "top" "top" "top" + [9,] "top" "top" "top" + [10,] "top" "top" "top" + [11,] "top" "top" "top" + [12,] "top" "top" "top" + [13,] "top" "top" "top" + [14,] "top" "top" "top" + [15,] "top" "top" "top" + [16,] "top" "top" "top" + [17,] "top" "top" "top" + [18,] "top" "top" "top" + [19,] "top" "top" "top" + [20,] "top" "top" "top" + [21,] "top" "top" "top" + [22,] "top" "top" "top" + [23,] "top" "top" "top" + [24,] "top" "top" "top" + [25,] "top" "top" "top" + [26,] "top" "top" "top" + [27,] "top" "top" "top" + [28,] "top" "top" "top" + [29,] "top" "top" "top" + [30,] "top" "top" "top" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 + [10,] 0.00 0.00 0.00 + [11,] 0.00 0.00 0.00 + [12,] 0.00 0.00 0.00 + [13,] 0.00 0.00 0.00 + [14,] 0.00 0.00 0.00 + [15,] 0.00 0.00 0.00 + [16,] 0.00 0.00 0.00 + [17,] 0.00 0.00 0.00 + [18,] 0.00 0.00 0.00 + [19,] 0.00 0.00 0.00 + [20,] 0.00 0.00 0.00 + [21,] 0.00 0.00 0.00 + [22,] 0.00 0.00 0.00 + [23,] 0.00 0.00 0.00 + [24,] 0.00 0.00 0.00 + [25,] 0.00 0.00 0.00 + [26,] 0.00 0.00 0.00 + [27,] 0.00 0.00 0.00 + [28,] 0.00 0.00 0.00 + [29,] 0.00 0.00 0.00 + [30,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" + [11,] "lrtb" "lrtb" "lrtb" + [12,] "lrtb" "lrtb" "lrtb" + [13,] "lrtb" "lrtb" "lrtb" + [14,] "lrtb" "lrtb" "lrtb" + [15,] "lrtb" "lrtb" "lrtb" + [16,] "lrtb" "lrtb" "lrtb" + [17,] "lrtb" "lrtb" "lrtb" + [18,] "lrtb" "lrtb" "lrtb" + [19,] "lrtb" "lrtb" "lrtb" + [20,] "lrtb" "lrtb" "lrtb" + [21,] "lrtb" "lrtb" "lrtb" + [22,] "lrtb" "lrtb" "lrtb" + [23,] "lrtb" "lrtb" "lrtb" + [24,] "lrtb" "lrtb" "lrtb" + [25,] "lrtb" "lrtb" "lrtb" + [26,] "lrtb" "lrtb" "lrtb" + [27,] "lrtb" "lrtb" "lrtb" + [28,] "lrtb" "lrtb" "lrtb" + [29,] "lrtb" "lrtb" "lrtb" + [30,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + [2,] "auto" "auto" "auto" + [3,] "auto" "auto" "auto" + [4,] "auto" "auto" "auto" + [5,] "auto" "auto" "auto" + [6,] "auto" "auto" "auto" + [7,] "auto" "auto" "auto" + [8,] "auto" "auto" "auto" + [9,] "auto" "auto" "auto" + [10,] "auto" "auto" "auto" + [11,] "auto" "auto" "auto" + [12,] "auto" "auto" "auto" + [13,] "auto" "auto" "auto" + [14,] "auto" "auto" "auto" + [15,] "auto" "auto" "auto" + [16,] "auto" "auto" "auto" + [17,] "auto" "auto" "auto" + [18,] "auto" "auto" "auto" + [19,] "auto" "auto" "auto" + [20,] "auto" "auto" "auto" + [21,] "auto" "auto" "auto" + [22,] "auto" "auto" "auto" + [23,] "auto" "auto" "auto" + [24,] "auto" "auto" "auto" + [25,] "auto" "auto" "auto" + [26,] "auto" "auto" "auto" + [27,] "auto" "auto" "auto" + [28,] "auto" "auto" "auto" + [29,] "auto" "auto" "auto" + [30,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "center" "center" + [2,] "left" "center" "center" + [3,] "left" "center" "center" + [4,] "left" "center" "center" + [5,] "left" "center" "center" + [6,] "left" "center" "center" + [7,] "left" "center" "center" + [8,] "left" "center" "center" + [9,] "left" "center" "center" + [10,] "left" "center" "center" + [11,] "left" "center" "center" + [12,] "left" "center" "center" + [13,] "left" "center" "center" + [14,] "left" "center" "center" + [15,] "left" "center" "center" + [16,] "left" "center" "center" + [17,] "left" "center" "center" + [18,] "left" "center" "center" + [19,] "left" "center" "center" + [20,] "left" "center" "center" + [21,] "left" "center" "center" + [22,] "left" "center" "center" + [23,] "left" "center" "center" + [24,] "left" "center" "center" + [25,] "left" "center" "center" + [26,] "left" "center" "center" + [27,] "left" "center" "center" + [28,] "left" "center" "center" + [29,] "left" "center" "center" + [30,] "left" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 8 8 8 + [2,] 8 8 8 + [3,] 8 8 8 + [4,] 8 8 8 + [5,] 8 8 8 + [6,] 8 8 8 + [7,] 8 8 8 + [8,] 8 8 8 + [9,] 8 8 8 + [10,] 8 8 8 + [11,] 8 8 8 + [12,] 8 8 8 + [13,] 8 8 8 + [14,] 8 8 8 + [15,] 8 8 8 + [16,] 8 8 8 + [17,] 8 8 8 + [18,] 8 8 8 + [19,] 8 8 8 + [20,] 8 8 8 + [21,] 8 8 8 + [22,] 8 8 8 + [23,] 8 8 8 + [24,] 8 8 8 + [25,] 8 8 8 + [26,] 8 8 8 + [27,] 8 8 8 + [28,] 8 8 8 + [29,] 8 8 8 + [30,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" + [11,] "baseline" "baseline" "baseline" + [12,] "baseline" "baseline" "baseline" + [13,] "baseline" "baseline" "baseline" + [14,] "baseline" "baseline" "baseline" + [15,] "baseline" "baseline" "baseline" + [16,] "baseline" "baseline" "baseline" + [17,] "baseline" "baseline" "baseline" + [18,] "baseline" "baseline" "baseline" + [19,] "baseline" "baseline" "baseline" + [20,] "baseline" "baseline" "baseline" + [21,] "baseline" "baseline" "baseline" + [22,] "baseline" "baseline" "baseline" + [23,] "baseline" "baseline" "baseline" + [24,] "baseline" "baseline" "baseline" + [25,] "baseline" "baseline" "baseline" + [26,] "baseline" "baseline" "baseline" + [27,] "baseline" "baseline" "baseline" + [28,] "baseline" "baseline" "baseline" + [29,] "baseline" "baseline" "baseline" + [30,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + [1] COL0 COL1 COL2 + <0 rows> (or 0-length row.names) + + $content + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + [1] 1.197778 3.647778 3.974444 + + $rowheights + numeric(0) + + $hrule + character(0) + + $spans + $spans$rows + [,1] [,2] [,3] + + $spans$columns + [,1] [,2] [,3] + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 0 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "COL0" "COL1" "COL2" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n header 1Treatment GroupSubject IDAge (years) / Sex / Race\n body 1A: Drug XAB12345-BRA-1-id-13447 / M / WHITE\n body 2 AB12345-BRA-1-id-4236 / M / BLACK OR AFRICAN AMERICAN\n body 3 AB12345-BRA-1-id-9334 / F / ASIAN\n body 4 AB12345-BRA-11-id-34537 / F / WHITE\n body 5 AB12345-BRA-11-id-39738 / M / ASIAN\n body 6 AB12345-BRA-11-id-5026 / M / BLACK OR AFRICAN AMERICAN\n body 7 AB12345-BRA-13-id-17724 / M / WHITE\n body 8 AB12345-BRA-14-id-2337 / M / ASIAN\n body 9 AB12345-BRA-15-id-3638 / F / ASIAN\n body10 AB12345-BRA-2-id-29644 / F / ASIAN\n body11B: PlaceboAB12345-BRA-1-id-23632 / M / BLACK OR AFRICAN AMERICAN\n body12 AB12345-BRA-1-id-6525 / F / BLACK OR AFRICAN AMERICAN\n body13 AB12345-BRA-12-id-5936 / M / BLACK OR AFRICAN AMERICAN\n body14 AB12345-BRA-2-id-10134 / M / ASIAN\n body15 AB12345-BRA-3-id-825 / F / BLACK OR AFRICAN AMERICAN\n body16 AB12345-BRA-4-id-38330 / F / ASIAN\n body17 AB12345-CAN-1-id-34143 / F / ASIAN\n body18 AB12345-CAN-4-id-33134 / F / AMERICAN INDIAN OR ALASKA NATIVE\n body19 AB12345-CHN-1-id-10741 / M / BLACK OR AFRICAN AMERICAN\n body20 AB12345-CHN-1-id-1242 / F / BLACK OR AFRICAN AMERICAN\n body21C: CombinationAB12345-BRA-1-id-14135 / F / WHITE\n body22 AB12345-BRA-1-id-26525 / M / WHITE\n body23 AB12345-BRA-11-id-23764 / F / ASIAN\n body24 AB12345-BRA-11-id-32133 / F / ASIAN\n body25 AB12345-BRA-11-id-940 / M / ASIAN\n body26 AB12345-BRA-14-id-12033 / F / ASIAN\n body27 AB12345-BRA-4-id-36846 / M / BLACK OR AFRICAN AMERICAN\n body28 AB12345-BRA-5-id-23432 / M / WHITE\n body29 AB12345-BRA-7-id-30135 / M / ASIAN\n body30 AB12345-CAN-11-id-30637 / F / ASIAN\n \n \n \n \n \n \n \n \n" + +--- + + Code + res$header + Output + $dataset + COL0 COL1 + 1 output ID:\tThis is the main Title output ID:\tThis is the main Title + 2 COL0 COL1 + COL2 + 1 output ID:\tThis is the main Title + 2 COL2 + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.3983511 0.3983511 + + $hrule + [1] "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 3 0 0 + [2,] 1 1 1 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "white" "white" "white" + [2,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + [2,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "left" "left" + [2,] "left" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + [2,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] "left_0.8" NA NA + [2,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 10 10 10 + [2,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] TRUE TRUE TRUE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + COL0 COL1 + 1 A: Drug X AB12345-BRA-1-id-134 + 2 AB12345-BRA-1-id-42 + 3 AB12345-BRA-1-id-93 + 4 AB12345-BRA-11-id-345 + 5 AB12345-BRA-11-id-397 + 6 AB12345-BRA-11-id-50 + 7 AB12345-BRA-13-id-177 + 8 AB12345-BRA-14-id-23 + 9 AB12345-BRA-15-id-36 + 10 AB12345-BRA-2-id-296 + 11 B: Placebo AB12345-BRA-1-id-236 + 12 AB12345-BRA-1-id-65 + 13 AB12345-BRA-12-id-59 + 14 AB12345-BRA-2-id-101 + 15 AB12345-BRA-3-id-8 + 16 AB12345-BRA-4-id-383 + 17 AB12345-CAN-1-id-341 + 18 AB12345-CAN-4-id-331 + 19 AB12345-CHN-1-id-107 + 20 AB12345-CHN-1-id-12 + 21 C: Combination AB12345-BRA-1-id-141 + 22 AB12345-BRA-1-id-265 + 23 AB12345-BRA-11-id-237 + 24 AB12345-BRA-11-id-321 + 25 AB12345-BRA-11-id-9 + 26 AB12345-BRA-14-id-120 + 27 AB12345-BRA-4-id-368 + 28 AB12345-BRA-5-id-234 + 29 AB12345-BRA-7-id-301 + 30 AB12345-CAN-11-id-306 + COL2 + 1 47 / M / WHITE + 2 36 / M / BLACK OR AFRICAN AMERICAN + 3 34 / F / ASIAN + 4 37 / F / WHITE + 5 38 / M / ASIAN + 6 26 / M / BLACK OR AFRICAN AMERICAN + 7 24 / M / WHITE + 8 37 / M / ASIAN + 9 38 / F / ASIAN + 10 44 / F / ASIAN + 11 32 / M / BLACK OR AFRICAN AMERICAN + 12 25 / F / BLACK OR AFRICAN AMERICAN + 13 36 / M / BLACK OR AFRICAN AMERICAN + 14 34 / M / ASIAN + 15 25 / F / BLACK OR AFRICAN AMERICAN + 16 30 / F / ASIAN + 17 43 / F / ASIAN + 18 34 / F / AMERICAN INDIAN OR ALASKA NATIVE + 19 41 / M / BLACK OR AFRICAN AMERICAN + 20 42 / F / BLACK OR AFRICAN AMERICAN + 21 35 / F / WHITE + 22 25 / M / WHITE + 23 64 / F / ASIAN + 24 33 / F / ASIAN + 25 40 / M / ASIAN + 26 33 / F / ASIAN + 27 46 / M / BLACK OR AFRICAN AMERICAN + 28 32 / M / WHITE + 29 35 / M / ASIAN + 30 37 / F / ASIAN + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 + [11,] data.frame,19 data.frame,19 data.frame,19 + [12,] data.frame,19 data.frame,19 data.frame,19 + [13,] data.frame,19 data.frame,19 data.frame,19 + [14,] data.frame,19 data.frame,19 data.frame,19 + [15,] data.frame,19 data.frame,19 data.frame,19 + [16,] data.frame,19 data.frame,19 data.frame,19 + [17,] data.frame,19 data.frame,19 data.frame,19 + [18,] data.frame,19 data.frame,19 data.frame,19 + [19,] data.frame,19 data.frame,19 data.frame,19 + [20,] data.frame,19 data.frame,19 data.frame,19 + [21,] data.frame,19 data.frame,19 data.frame,19 + [22,] data.frame,19 data.frame,19 data.frame,19 + [23,] data.frame,19 data.frame,19 data.frame,19 + [24,] data.frame,19 data.frame,19 data.frame,19 + [25,] data.frame,19 data.frame,19 data.frame,19 + [26,] data.frame,19 data.frame,19 data.frame,19 + [27,] data.frame,19 data.frame,19 data.frame,19 + [28,] data.frame,19 data.frame,19 data.frame,19 + [29,] data.frame,19 data.frame,19 data.frame,19 + [30,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.4266986 0.3984257 0.3983511 0.3983511 0.3983511 0.3983511 0.3982765 + [8] 0.3983511 0.3983511 0.3982765 0.3984257 0.3983511 0.3984257 0.3983511 + [15] 0.3983511 0.3983511 0.3983511 0.3984257 0.3983511 0.3983511 0.3983511 + [22] 0.3982765 0.3982765 0.3983511 0.3982765 0.3983511 0.3983511 0.3983511 + [29] 0.3983511 0.3983511 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + [11] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + [21] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "top" "top" "top" + [2,] "top" "top" "top" + [3,] "top" "top" "top" + [4,] "top" "top" "top" + [5,] "top" "top" "top" + [6,] "top" "top" "top" + [7,] "top" "top" "top" + [8,] "top" "top" "top" + [9,] "top" "top" "top" + [10,] "top" "top" "top" + [11,] "top" "top" "top" + [12,] "top" "top" "top" + [13,] "top" "top" "top" + [14,] "top" "top" "top" + [15,] "top" "top" "top" + [16,] "top" "top" "top" + [17,] "top" "top" "top" + [18,] "top" "top" "top" + [19,] "top" "top" "top" + [20,] "top" "top" "top" + [21,] "top" "top" "top" + [22,] "top" "top" "top" + [23,] "top" "top" "top" + [24,] "top" "top" "top" + [25,] "top" "top" "top" + [26,] "top" "top" "top" + [27,] "top" "top" "top" + [28,] "top" "top" "top" + [29,] "top" "top" "top" + [30,] "top" "top" "top" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 + [10,] 0.00 0.00 0.00 + [11,] 0.00 0.00 0.00 + [12,] 0.00 0.00 0.00 + [13,] 0.00 0.00 0.00 + [14,] 0.00 0.00 0.00 + [15,] 0.00 0.00 0.00 + [16,] 0.00 0.00 0.00 + [17,] 0.00 0.00 0.00 + [18,] 0.00 0.00 0.00 + [19,] 0.00 0.00 0.00 + [20,] 0.00 0.00 0.00 + [21,] 0.00 0.00 0.00 + [22,] 0.00 0.00 0.00 + [23,] 0.00 0.00 0.00 + [24,] 0.00 0.00 0.00 + [25,] 0.00 0.00 0.00 + [26,] 0.00 0.00 0.00 + [27,] 0.00 0.00 0.00 + [28,] 0.00 0.00 0.00 + [29,] 0.00 0.00 0.00 + [30,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" + [11,] "lrtb" "lrtb" "lrtb" + [12,] "lrtb" "lrtb" "lrtb" + [13,] "lrtb" "lrtb" "lrtb" + [14,] "lrtb" "lrtb" "lrtb" + [15,] "lrtb" "lrtb" "lrtb" + [16,] "lrtb" "lrtb" "lrtb" + [17,] "lrtb" "lrtb" "lrtb" + [18,] "lrtb" "lrtb" "lrtb" + [19,] "lrtb" "lrtb" "lrtb" + [20,] "lrtb" "lrtb" "lrtb" + [21,] "lrtb" "lrtb" "lrtb" + [22,] "lrtb" "lrtb" "lrtb" + [23,] "lrtb" "lrtb" "lrtb" + [24,] "lrtb" "lrtb" "lrtb" + [25,] "lrtb" "lrtb" "lrtb" + [26,] "lrtb" "lrtb" "lrtb" + [27,] "lrtb" "lrtb" "lrtb" + [28,] "lrtb" "lrtb" "lrtb" + [29,] "lrtb" "lrtb" "lrtb" + [30,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + [2,] "auto" "auto" "auto" + [3,] "auto" "auto" "auto" + [4,] "auto" "auto" "auto" + [5,] "auto" "auto" "auto" + [6,] "auto" "auto" "auto" + [7,] "auto" "auto" "auto" + [8,] "auto" "auto" "auto" + [9,] "auto" "auto" "auto" + [10,] "auto" "auto" "auto" + [11,] "auto" "auto" "auto" + [12,] "auto" "auto" "auto" + [13,] "auto" "auto" "auto" + [14,] "auto" "auto" "auto" + [15,] "auto" "auto" "auto" + [16,] "auto" "auto" "auto" + [17,] "auto" "auto" "auto" + [18,] "auto" "auto" "auto" + [19,] "auto" "auto" "auto" + [20,] "auto" "auto" "auto" + [21,] "auto" "auto" "auto" + [22,] "auto" "auto" "auto" + [23,] "auto" "auto" "auto" + [24,] "auto" "auto" "auto" + [25,] "auto" "auto" "auto" + [26,] "auto" "auto" "auto" + [27,] "auto" "auto" "auto" + [28,] "auto" "auto" "auto" + [29,] "auto" "auto" "auto" + [30,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "center" "center" + [2,] "left" "center" "center" + [3,] "left" "center" "center" + [4,] "left" "center" "center" + [5,] "left" "center" "center" + [6,] "left" "center" "center" + [7,] "left" "center" "center" + [8,] "left" "center" "center" + [9,] "left" "center" "center" + [10,] "left" "center" "center" + [11,] "left" "center" "center" + [12,] "left" "center" "center" + [13,] "left" "center" "center" + [14,] "left" "center" "center" + [15,] "left" "center" "center" + [16,] "left" "center" "center" + [17,] "left" "center" "center" + [18,] "left" "center" "center" + [19,] "left" "center" "center" + [20,] "left" "center" "center" + [21,] "left" "center" "center" + [22,] "left" "center" "center" + [23,] "left" "center" "center" + [24,] "left" "center" "center" + [25,] "left" "center" "center" + [26,] "left" "center" "center" + [27,] "left" "center" "center" + [28,] "left" "center" "center" + [29,] "left" "center" "center" + [30,] "left" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 8 8 8 + [2,] 8 8 8 + [3,] 8 8 8 + [4,] 8 8 8 + [5,] 8 8 8 + [6,] 8 8 8 + [7,] 8 8 8 + [8,] 8 8 8 + [9,] 8 8 8 + [10,] 8 8 8 + [11,] 8 8 8 + [12,] 8 8 8 + [13,] 8 8 8 + [14,] 8 8 8 + [15,] 8 8 8 + [16,] 8 8 8 + [17,] 8 8 8 + [18,] 8 8 8 + [19,] 8 8 8 + [20,] 8 8 8 + [21,] 8 8 8 + [22,] 8 8 8 + [23,] 8 8 8 + [24,] 8 8 8 + [25,] 8 8 8 + [26,] 8 8 8 + [27,] 8 8 8 + [28,] 8 8 8 + [29,] 8 8 8 + [30,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" + [11,] "baseline" "baseline" "baseline" + [12,] "baseline" "baseline" "baseline" + [13,] "baseline" "baseline" "baseline" + [14,] "baseline" "baseline" "baseline" + [15,] "baseline" "baseline" "baseline" + [16,] "baseline" "baseline" "baseline" + [17,] "baseline" "baseline" "baseline" + [18,] "baseline" "baseline" "baseline" + [19,] "baseline" "baseline" "baseline" + [20,] "baseline" "baseline" "baseline" + [21,] "baseline" "baseline" "baseline" + [22,] "baseline" "baseline" "baseline" + [23,] "baseline" "baseline" "baseline" + [24,] "baseline" "baseline" "baseline" + [25,] "baseline" "baseline" "baseline" + [26,] "baseline" "baseline" "baseline" + [27,] "baseline" "baseline" "baseline" + [28,] "baseline" "baseline" "baseline" + [29,] "baseline" "baseline" "baseline" + [30,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + COL0 COL1 COL2 + 1 + 2 footer 1 footer 1 footer 1 + 3 footer 2 footer 2 footer 2 + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.25 0.25 0.25 + + $hrule + [1] "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 3 0 0 + [2,] 3 0 0 + [3,] 3 0 0 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "bottom" "center" "center" + [2,] "bottom" "center" "center" + [3,] "bottom" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 + [3,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + [2,] "auto" "auto" "auto" + [3,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "left" "left" + [2,] "left" "left" "left" + [3,] "left" "left" "left" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 8 8 8 + [2,] 8 8 8 + [3,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 3 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "COL0" "COL1" "COL2" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n header 1output ID:This is the main Title\n header 2Treatment GroupSubject IDAge (years) / Sex / Race\n body 1A: Drug XAB12345-BRA-1-id-13447 / M / WHITE\n body 2 AB12345-BRA-1-id-4236 / M / BLACK OR AFRICAN AMERICAN\n body 3 AB12345-BRA-1-id-9334 / F / ASIAN\n body 4 AB12345-BRA-11-id-34537 / F / WHITE\n body 5 AB12345-BRA-11-id-39738 / M / ASIAN\n body 6 AB12345-BRA-11-id-5026 / M / BLACK OR AFRICAN AMERICAN\n body 7 AB12345-BRA-13-id-17724 / M / WHITE\n body 8 AB12345-BRA-14-id-2337 / M / ASIAN\n body 9 AB12345-BRA-15-id-3638 / F / ASIAN\n body10 AB12345-BRA-2-id-29644 / F / ASIAN\n body11B: PlaceboAB12345-BRA-1-id-23632 / M / BLACK OR AFRICAN AMERICAN\n body12 AB12345-BRA-1-id-6525 / F / BLACK OR AFRICAN AMERICAN\n body13 AB12345-BRA-12-id-5936 / M / BLACK OR AFRICAN AMERICAN\n body14 AB12345-BRA-2-id-10134 / M / ASIAN\n body15 AB12345-BRA-3-id-825 / F / BLACK OR AFRICAN AMERICAN\n body16 AB12345-BRA-4-id-38330 / F / ASIAN\n body17 AB12345-CAN-1-id-34143 / F / ASIAN\n body18 AB12345-CAN-4-id-33134 / F / AMERICAN INDIAN OR ALASKA NATIVE\n body19 AB12345-CHN-1-id-10741 / M / BLACK OR AFRICAN AMERICAN\n body20 AB12345-CHN-1-id-1242 / F / BLACK OR AFRICAN AMERICAN\n body21C: CombinationAB12345-BRA-1-id-14135 / F / WHITE\n body22 AB12345-BRA-1-id-26525 / M / WHITE\n body23 AB12345-BRA-11-id-23764 / F / ASIAN\n body24 AB12345-BRA-11-id-32133 / F / ASIAN\n body25 AB12345-BRA-11-id-940 / M / ASIAN\n body26 AB12345-BRA-14-id-12033 / F / ASIAN\n body27 AB12345-BRA-4-id-36846 / M / BLACK OR AFRICAN AMERICAN\n body28 AB12345-BRA-5-id-23432 / M / WHITE\n body29 AB12345-BRA-7-id-30135 / M / ASIAN\n body30 AB12345-CAN-11-id-30637 / F / ASIAN\n footer 1\n footer 2footer 1\n footer 3footer 2\n \n \n \n \n \n \n \n \n" + +--- + + Code + res$header + Output + $dataset + COL0 COL1 + 1 output ID:\tThis is the main Title output ID:\tThis is the main Title + 2 COL0 COL1 + COL2 + 1 output ID:\tThis is the main Title + 2 COL2 + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.3983511 0.3983511 + + $hrule + [1] "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 3 0 0 + [2,] 1 1 1 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "white" "white" "white" + [2,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + [2,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "left" "left" + [2,] "left" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + [2,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] "left_0.8" NA NA + [2,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 10 10 10 + [2,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] TRUE TRUE TRUE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 2 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + COL0 COL1 + 1 A: Drug X~[super b] AB12345-BRA-1-id-134 + 2 AB12345-BRA-1-id-42 + 3 AB12345-BRA-1-id-93 + 4 AB12345-BRA-11-id-345 + 5 AB12345-BRA-11-id-397 + 6 AB12345-BRA-11-id-50 + 7 AB12345-BRA-13-id-177 + 8 AB12345-BRA-14-id-23 + 9 AB12345-BRA-15-id-36 + 10 AB12345-BRA-2-id-296 + 11 B: Placebo AB12345-BRA-1-id-236 + 12 AB12345-BRA-1-id-65 + 13 AB12345-BRA-12-id-59 + 14 AB12345-BRA-2-id-101 + 15 AB12345-BRA-3-id-8 + 16 AB12345-BRA-4-id-383 + 17 AB12345-CAN-1-id-341 + 18 AB12345-CAN-4-id-331 + 19 AB12345-CHN-1-id-107 + 20 AB12345-CHN-1-id-12 + 21 C: Combination AB12345-BRA-1-id-141 + 22 AB12345-BRA-1-id-265 + 23 AB12345-BRA-11-id-237 + 24 AB12345-BRA-11-id-321 + 25 AB12345-BRA-11-id-9 + 26 AB12345-BRA-14-id-120 + 27 AB12345-BRA-4-id-368 + 28 AB12345-BRA-5-id-234 + 29 AB12345-BRA-7-id-301 + 30 AB12345-CAN-11-id-306 + COL2 + 1 47 / M / WHITE + 2 36 / M / BLACK OR AFRICAN AMERICAN + 3 34 / F / ASIAN + 4 37 / F / WHITE + 5 38 / M / ASIAN + 6 26 / M / BLACK OR AFRICAN AMERICAN + 7 24 / M / WHITE + 8 37 / M / ASIAN + 9 38 / F / ASIAN + 10 44 / F / ASIAN + 11 32 / M / BLACK OR AFRICAN AMERICAN + 12 25 / F / BLACK OR AFRICAN AMERICAN + 13 36 / M / BLACK OR AFRICAN AMERICAN + 14 34 / M / ASIAN + 15 25 / F / BLACK OR AFRICAN AMERICAN + 16 30 / F / ASIAN + 17 43 / F / ASIAN + 18 34 / F / AMERICAN INDIAN OR ALASKA NATIVE + 19 41 / M / BLACK OR AFRICAN AMERICAN + 20 42 / F / BLACK OR AFRICAN AMERICAN + 21 35 / F / WHITE + 22 25 / M / WHITE + 23 64 / F / ASIAN + 24 33 / F / ASIAN + 25 40 / M / ASIAN + 26 33 / F / ASIAN + 27 46 / M / BLACK OR AFRICAN AMERICAN + 28 32 / M / WHITE + 29 35 / M / ASIAN + 30 37 / F / ASIAN + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 + [11,] data.frame,19 data.frame,19 data.frame,19 + [12,] data.frame,19 data.frame,19 data.frame,19 + [13,] data.frame,19 data.frame,19 data.frame,19 + [14,] data.frame,19 data.frame,19 data.frame,19 + [15,] data.frame,19 data.frame,19 data.frame,19 + [16,] data.frame,19 data.frame,19 data.frame,19 + [17,] data.frame,19 data.frame,19 data.frame,19 + [18,] data.frame,19 data.frame,19 data.frame,19 + [19,] data.frame,19 data.frame,19 data.frame,19 + [20,] data.frame,19 data.frame,19 data.frame,19 + [21,] data.frame,19 data.frame,19 data.frame,19 + [22,] data.frame,19 data.frame,19 data.frame,19 + [23,] data.frame,19 data.frame,19 data.frame,19 + [24,] data.frame,19 data.frame,19 data.frame,19 + [25,] data.frame,19 data.frame,19 data.frame,19 + [26,] data.frame,19 data.frame,19 data.frame,19 + [27,] data.frame,19 data.frame,19 data.frame,19 + [28,] data.frame,19 data.frame,19 data.frame,19 + [29,] data.frame,19 data.frame,19 data.frame,19 + [30,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.4266986 0.3984257 0.3983511 0.3983511 0.3983511 0.3983511 0.3982765 + [8] 0.3983511 0.3983511 0.3982765 0.3984257 0.3983511 0.3984257 0.3983511 + [15] 0.3983511 0.3983511 0.3983511 0.3984257 0.3983511 0.3983511 0.3983511 + [22] 0.3982765 0.3982765 0.3983511 0.3982765 0.3983511 0.3983511 0.3983511 + [29] 0.3983511 0.3983511 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + [11] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + [21] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "top" "top" "top" + [2,] "top" "top" "top" + [3,] "top" "top" "top" + [4,] "top" "top" "top" + [5,] "top" "top" "top" + [6,] "top" "top" "top" + [7,] "top" "top" "top" + [8,] "top" "top" "top" + [9,] "top" "top" "top" + [10,] "top" "top" "top" + [11,] "top" "top" "top" + [12,] "top" "top" "top" + [13,] "top" "top" "top" + [14,] "top" "top" "top" + [15,] "top" "top" "top" + [16,] "top" "top" "top" + [17,] "top" "top" "top" + [18,] "top" "top" "top" + [19,] "top" "top" "top" + [20,] "top" "top" "top" + [21,] "top" "top" "top" + [22,] "top" "top" "top" + [23,] "top" "top" "top" + [24,] "top" "top" "top" + [25,] "top" "top" "top" + [26,] "top" "top" "top" + [27,] "top" "top" "top" + [28,] "top" "top" "top" + [29,] "top" "top" "top" + [30,] "top" "top" "top" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 + [10,] 0.00 0.00 0.00 + [11,] 0.00 0.00 0.00 + [12,] 0.00 0.00 0.00 + [13,] 0.00 0.00 0.00 + [14,] 0.00 0.00 0.00 + [15,] 0.00 0.00 0.00 + [16,] 0.00 0.00 0.00 + [17,] 0.00 0.00 0.00 + [18,] 0.00 0.00 0.00 + [19,] 0.00 0.00 0.00 + [20,] 0.00 0.00 0.00 + [21,] 0.00 0.00 0.00 + [22,] 0.00 0.00 0.00 + [23,] 0.00 0.00 0.00 + [24,] 0.00 0.00 0.00 + [25,] 0.00 0.00 0.00 + [26,] 0.00 0.00 0.00 + [27,] 0.00 0.00 0.00 + [28,] 0.00 0.00 0.00 + [29,] 0.00 0.00 0.00 + [30,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" + [11,] "lrtb" "lrtb" "lrtb" + [12,] "lrtb" "lrtb" "lrtb" + [13,] "lrtb" "lrtb" "lrtb" + [14,] "lrtb" "lrtb" "lrtb" + [15,] "lrtb" "lrtb" "lrtb" + [16,] "lrtb" "lrtb" "lrtb" + [17,] "lrtb" "lrtb" "lrtb" + [18,] "lrtb" "lrtb" "lrtb" + [19,] "lrtb" "lrtb" "lrtb" + [20,] "lrtb" "lrtb" "lrtb" + [21,] "lrtb" "lrtb" "lrtb" + [22,] "lrtb" "lrtb" "lrtb" + [23,] "lrtb" "lrtb" "lrtb" + [24,] "lrtb" "lrtb" "lrtb" + [25,] "lrtb" "lrtb" "lrtb" + [26,] "lrtb" "lrtb" "lrtb" + [27,] "lrtb" "lrtb" "lrtb" + [28,] "lrtb" "lrtb" "lrtb" + [29,] "lrtb" "lrtb" "lrtb" + [30,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + [2,] "auto" "auto" "auto" + [3,] "auto" "auto" "auto" + [4,] "auto" "auto" "auto" + [5,] "auto" "auto" "auto" + [6,] "auto" "auto" "auto" + [7,] "auto" "auto" "auto" + [8,] "auto" "auto" "auto" + [9,] "auto" "auto" "auto" + [10,] "auto" "auto" "auto" + [11,] "auto" "auto" "auto" + [12,] "auto" "auto" "auto" + [13,] "auto" "auto" "auto" + [14,] "auto" "auto" "auto" + [15,] "auto" "auto" "auto" + [16,] "auto" "auto" "auto" + [17,] "auto" "auto" "auto" + [18,] "auto" "auto" "auto" + [19,] "auto" "auto" "auto" + [20,] "auto" "auto" "auto" + [21,] "auto" "auto" "auto" + [22,] "auto" "auto" "auto" + [23,] "auto" "auto" "auto" + [24,] "auto" "auto" "auto" + [25,] "auto" "auto" "auto" + [26,] "auto" "auto" "auto" + [27,] "auto" "auto" "auto" + [28,] "auto" "auto" "auto" + [29,] "auto" "auto" "auto" + [30,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "center" "center" + [2,] "left" "center" "center" + [3,] "left" "center" "center" + [4,] "left" "center" "center" + [5,] "left" "center" "center" + [6,] "left" "center" "center" + [7,] "left" "center" "center" + [8,] "left" "center" "center" + [9,] "left" "center" "center" + [10,] "left" "center" "center" + [11,] "left" "center" "center" + [12,] "left" "center" "center" + [13,] "left" "center" "center" + [14,] "left" "center" "center" + [15,] "left" "center" "center" + [16,] "left" "center" "center" + [17,] "left" "center" "center" + [18,] "left" "center" "center" + [19,] "left" "center" "center" + [20,] "left" "center" "center" + [21,] "left" "center" "center" + [22,] "left" "center" "center" + [23,] "left" "center" "center" + [24,] "left" "center" "center" + [25,] "left" "center" "center" + [26,] "left" "center" "center" + [27,] "left" "center" "center" + [28,] "left" "center" "center" + [29,] "left" "center" "center" + [30,] "left" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + [5,] 1 1 1 + [6,] 1 1 1 + [7,] 1 1 1 + [8,] 1 1 1 + [9,] 1 1 1 + [10,] 1 1 1 + [11,] 1 1 1 + [12,] 1 1 1 + [13,] 1 1 1 + [14,] 1 1 1 + [15,] 1 1 1 + [16,] 1 1 1 + [17,] 1 1 1 + [18,] 1 1 1 + [19,] 1 1 1 + [20,] 1 1 1 + [21,] 1 1 1 + [22,] 1 1 1 + [23,] 1 1 1 + [24,] 1 1 1 + [25,] 1 1 1 + [26,] 1 1 1 + [27,] 1 1 1 + [28,] 1 1 1 + [29,] 1 1 1 + [30,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + [5,] 0 0 0 + [6,] 0 0 0 + [7,] 0 0 0 + [8,] 0 0 0 + [9,] 0 0 0 + [10,] 0 0 0 + [11,] 0 0 0 + [12,] 0 0 0 + [13,] 0 0 0 + [14,] 0 0 0 + [15,] 0 0 0 + [16,] 0 0 0 + [17,] 0 0 0 + [18,] 0 0 0 + [19,] 0 0 0 + [20,] 0 0 0 + [21,] 0 0 0 + [22,] 0 0 0 + [23,] 0 0 0 + [24,] 0 0 0 + [25,] 0 0 0 + [26,] 0 0 0 + [27,] 0 0 0 + [28,] 0 0 0 + [29,] 0 0 0 + [30,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + [5,] "solid" "solid" "solid" + [6,] "solid" "solid" "solid" + [7,] "solid" "solid" "solid" + [8,] "solid" "solid" "solid" + [9,] "solid" "solid" "solid" + [10,] "solid" "solid" "solid" + [11,] "solid" "solid" "solid" + [12,] "solid" "solid" "solid" + [13,] "solid" "solid" "solid" + [14,] "solid" "solid" "solid" + [15,] "solid" "solid" "solid" + [16,] "solid" "solid" "solid" + [17,] "solid" "solid" "solid" + [18,] "solid" "solid" "solid" + [19,] "solid" "solid" "solid" + [20,] "solid" "solid" "solid" + [21,] "solid" "solid" "solid" + [22,] "solid" "solid" "solid" + [23,] "solid" "solid" "solid" + [24,] "solid" "solid" "solid" + [25,] "solid" "solid" "solid" + [26,] "solid" "solid" "solid" + [27,] "solid" "solid" "solid" + [28,] "solid" "solid" "solid" + [29,] "solid" "solid" "solid" + [30,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + [5,] NA NA NA + [6,] NA NA NA + [7,] NA NA NA + [8,] NA NA NA + [9,] NA NA NA + [10,] NA NA NA + [11,] NA NA NA + [12,] NA NA NA + [13,] NA NA NA + [14,] NA NA NA + [15,] NA NA NA + [16,] NA NA NA + [17,] NA NA NA + [18,] NA NA NA + [19,] NA NA NA + [20,] NA NA NA + [21,] NA NA NA + [22,] NA NA NA + [23,] NA NA NA + [24,] NA NA NA + [25,] NA NA NA + [26,] NA NA NA + [27,] NA NA NA + [28,] NA NA NA + [29,] NA NA NA + [30,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + [5,] "black" "black" "black" + [6,] "black" "black" "black" + [7,] "black" "black" "black" + [8,] "black" "black" "black" + [9,] "black" "black" "black" + [10,] "black" "black" "black" + [11,] "black" "black" "black" + [12,] "black" "black" "black" + [13,] "black" "black" "black" + [14,] "black" "black" "black" + [15,] "black" "black" "black" + [16,] "black" "black" "black" + [17,] "black" "black" "black" + [18,] "black" "black" "black" + [19,] "black" "black" "black" + [20,] "black" "black" "black" + [21,] "black" "black" "black" + [22,] "black" "black" "black" + [23,] "black" "black" "black" + [24,] "black" "black" "black" + [25,] "black" "black" "black" + [26,] "black" "black" "black" + [27,] "black" "black" "black" + [28,] "black" "black" "black" + [29,] "black" "black" "black" + [30,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 8 8 8 + [2,] 8 8 8 + [3,] 8 8 8 + [4,] 8 8 8 + [5,] 8 8 8 + [6,] 8 8 8 + [7,] 8 8 8 + [8,] 8 8 8 + [9,] 8 8 8 + [10,] 8 8 8 + [11,] 8 8 8 + [12,] 8 8 8 + [13,] 8 8 8 + [14,] 8 8 8 + [15,] 8 8 8 + [16,] 8 8 8 + [17,] 8 8 8 + [18,] 8 8 8 + [19,] 8 8 8 + [20,] 8 8 8 + [21,] 8 8 8 + [22,] 8 8 8 + [23,] 8 8 8 + [24,] 8 8 8 + [25,] 8 8 8 + [26,] 8 8 8 + [27,] 8 8 8 + [28,] 8 8 8 + [29,] 8 8 8 + [30,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + [5,] FALSE FALSE FALSE + [6,] FALSE FALSE FALSE + [7,] FALSE FALSE FALSE + [8,] FALSE FALSE FALSE + [9,] FALSE FALSE FALSE + [10,] FALSE FALSE FALSE + [11,] FALSE FALSE FALSE + [12,] FALSE FALSE FALSE + [13,] FALSE FALSE FALSE + [14,] FALSE FALSE FALSE + [15,] FALSE FALSE FALSE + [16,] FALSE FALSE FALSE + [17,] FALSE FALSE FALSE + [18,] FALSE FALSE FALSE + [19,] FALSE FALSE FALSE + [20,] FALSE FALSE FALSE + [21,] FALSE FALSE FALSE + [22,] FALSE FALSE FALSE + [23,] FALSE FALSE FALSE + [24,] FALSE FALSE FALSE + [25,] FALSE FALSE FALSE + [26,] FALSE FALSE FALSE + [27,] FALSE FALSE FALSE + [28,] FALSE FALSE FALSE + [29,] FALSE FALSE FALSE + [30,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" + [11,] "Times New Roman" "Times New Roman" "Times New Roman" + [12,] "Times New Roman" "Times New Roman" "Times New Roman" + [13,] "Times New Roman" "Times New Roman" "Times New Roman" + [14,] "Times New Roman" "Times New Roman" "Times New Roman" + [15,] "Times New Roman" "Times New Roman" "Times New Roman" + [16,] "Times New Roman" "Times New Roman" "Times New Roman" + [17,] "Times New Roman" "Times New Roman" "Times New Roman" + [18,] "Times New Roman" "Times New Roman" "Times New Roman" + [19,] "Times New Roman" "Times New Roman" "Times New Roman" + [20,] "Times New Roman" "Times New Roman" "Times New Roman" + [21,] "Times New Roman" "Times New Roman" "Times New Roman" + [22,] "Times New Roman" "Times New Roman" "Times New Roman" + [23,] "Times New Roman" "Times New Roman" "Times New Roman" + [24,] "Times New Roman" "Times New Roman" "Times New Roman" + [25,] "Times New Roman" "Times New Roman" "Times New Roman" + [26,] "Times New Roman" "Times New Roman" "Times New Roman" + [27,] "Times New Roman" "Times New Roman" "Times New Roman" + [28,] "Times New Roman" "Times New Roman" "Times New Roman" + [29,] "Times New Roman" "Times New Roman" "Times New Roman" + [30,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" + [11,] "baseline" "baseline" "baseline" + [12,] "baseline" "baseline" "baseline" + [13,] "baseline" "baseline" "baseline" + [14,] "baseline" "baseline" "baseline" + [15,] "baseline" "baseline" "baseline" + [16,] "baseline" "baseline" "baseline" + [17,] "baseline" "baseline" "baseline" + [18,] "baseline" "baseline" "baseline" + [19,] "baseline" "baseline" "baseline" + [20,] "baseline" "baseline" "baseline" + [21,] "baseline" "baseline" "baseline" + [22,] "baseline" "baseline" "baseline" + [23,] "baseline" "baseline" "baseline" + [24,] "baseline" "baseline" "baseline" + [25,] "baseline" "baseline" "baseline" + [26,] "baseline" "baseline" "baseline" + [27,] "baseline" "baseline" "baseline" + [28,] "baseline" "baseline" "baseline" + [29,] "baseline" "baseline" "baseline" + [30,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" + [11,] "transparent" "transparent" "transparent" + [12,] "transparent" "transparent" "transparent" + [13,] "transparent" "transparent" "transparent" + [14,] "transparent" "transparent" "transparent" + [15,] "transparent" "transparent" "transparent" + [16,] "transparent" "transparent" "transparent" + [17,] "transparent" "transparent" "transparent" + [18,] "transparent" "transparent" "transparent" + [19,] "transparent" "transparent" "transparent" + [20,] "transparent" "transparent" "transparent" + [21,] "transparent" "transparent" "transparent" + [22,] "transparent" "transparent" "transparent" + [23,] "transparent" "transparent" "transparent" + [24,] "transparent" "transparent" "transparent" + [25,] "transparent" "transparent" "transparent" + [26,] "transparent" "transparent" "transparent" + [27,] "transparent" "transparent" "transparent" + [28,] "transparent" "transparent" "transparent" + [29,] "transparent" "transparent" "transparent" + [30,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 30 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + COL0 + 1 + 2 ~{super a}Age in years + 3 ~{super b}Xanomeline with dose β‰₯ 20mg + 4 This ~{optional text should} stay the same + COL1 + 1 + 2 ~{super a}Age in years + 3 ~{super b}Xanomeline with dose β‰₯ 20mg + 4 This ~{optional text should} stay the same + COL2 + 1 + 2 ~{super a}Age in years + 3 ~{super b}Xanomeline with dose β‰₯ 20mg + 4 This ~{optional text should} stay the same + + $content + $data + COL0 COL1 COL2 + [1,] data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "COL0" "COL1" "COL2" + + $colwidths + COL0 COL1 COL2 + 1.197778 3.647778 3.974444 + + $rowheights + [1] 0.25 0.25 0.25 0.25 + + $hrule + [1] "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] + [1,] 3 0 0 + [2,] 3 0 0 + [3,] 3 0 0 + [4,] 3 0 0 + + $spans$columns + [,1] [,2] [,3] + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + COL0 COL1 COL2 + [1,] "bottom" "center" "center" + [2,] "bottom" "center" "center" + [3,] "bottom" "center" "center" + [4,] "bottom" "center" "center" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 + [4,] 0.75 0.75 0.75 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + COL0 COL1 COL2 + [1,] "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + COL0 COL1 COL2 + [1,] "auto" "auto" "auto" + [2,] "auto" "auto" "auto" + [3,] "auto" "auto" "auto" + [4,] "auto" "auto" "auto" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + COL0 COL1 COL2 + [1,] "left" "left" "left" + [2,] "left" "left" "left" + [3,] "left" "left" "left" + [4,] "left" "left" "left" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + COL0 COL1 COL2 + [1,] 1 1 1 + [2,] 1 1 1 + [3,] 1 1 1 + [4,] 1 1 1 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + COL0 COL1 COL2 + [1,] 0 0 0 + [2,] 0 0 0 + [3,] 0 0 0 + [4,] 0 0 0 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + COL0 COL1 COL2 + [1,] "solid" "solid" "solid" + [2,] "solid" "solid" "solid" + [3,] "solid" "solid" "solid" + [4,] "solid" "solid" "solid" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + COL0 COL1 COL2 + [1,] NA NA NA + [2,] NA NA NA + [3,] NA NA NA + [4,] NA NA NA + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + COL0 COL1 COL2 + [1,] "black" "black" "black" + [2,] "black" "black" "black" + [3,] "black" "black" "black" + [4,] "black" "black" "black" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + COL0 COL1 COL2 + [1,] 8 8 8 + [2,] 8 8 8 + [3,] 8 8 8 + [4,] 8 8 8 + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + COL0 COL1 COL2 + [1,] FALSE FALSE FALSE + [2,] FALSE FALSE FALSE + [3,] FALSE FALSE FALSE + [4,] FALSE FALSE FALSE + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + COL0 COL1 COL2 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + COL0 COL1 COL2 + [1,] "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + COL0 COL1 COL2 + [1,] "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" + + $keys + [1] "COL0" "COL1" "COL2" + + $nrow + [1] 4 + + $ncol + [1] 3 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "COL0" "COL1" "COL2" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n header 1output ID:This is the main Title\n header 2Treatment GroupSubject IDAgea / Sex / Race\n body 1A: Drug XbAB12345-BRA-1-id-13447 / M / WHITE\n body 2 AB12345-BRA-1-id-4236 / M / BLACK OR AFRICAN AMERICAN\n body 3 AB12345-BRA-1-id-9334 / F / ASIAN\n body 4 AB12345-BRA-11-id-34537 / F / WHITE\n body 5 AB12345-BRA-11-id-39738 / M / ASIAN\n body 6 AB12345-BRA-11-id-5026 / M / BLACK OR AFRICAN AMERICAN\n body 7 AB12345-BRA-13-id-17724 / M / WHITE\n body 8 AB12345-BRA-14-id-2337 / M / ASIAN\n body 9 AB12345-BRA-15-id-3638 / F / ASIAN\n body10 AB12345-BRA-2-id-29644 / F / ASIAN\n body11B: PlaceboAB12345-BRA-1-id-23632 / M / BLACK OR AFRICAN AMERICAN\n body12 AB12345-BRA-1-id-6525 / F / BLACK OR AFRICAN AMERICAN\n body13 AB12345-BRA-12-id-5936 / M / BLACK OR AFRICAN AMERICAN\n body14 AB12345-BRA-2-id-10134 / M / ASIAN\n body15 AB12345-BRA-3-id-825 / F / BLACK OR AFRICAN AMERICAN\n body16 AB12345-BRA-4-id-38330 / F / ASIAN\n body17 AB12345-CAN-1-id-34143 / F / ASIAN\n body18 AB12345-CAN-4-id-33134 / F / AMERICAN INDIAN OR ALASKA NATIVE\n body19 AB12345-CHN-1-id-10741 / M / BLACK OR AFRICAN AMERICAN\n body20 AB12345-CHN-1-id-1242 / F / BLACK OR AFRICAN AMERICAN\n body21C: CombinationAB12345-BRA-1-id-14135 / F / WHITE\n body22 AB12345-BRA-1-id-26525 / M / WHITE\n body23 AB12345-BRA-11-id-23764 / F / ASIAN\n body24 AB12345-BRA-11-id-32133 / F / ASIAN\n body25 AB12345-BRA-11-id-940 / M / ASIAN\n body26 AB12345-BRA-14-id-12033 / F / ASIAN\n body27 AB12345-BRA-4-id-36846 / M / BLACK OR AFRICAN AMERICAN\n body28 AB12345-BRA-5-id-23432 / M / WHITE\n body29 AB12345-BRA-7-id-30135 / M / ASIAN\n body30 AB12345-CAN-11-id-30637 / F / ASIAN\n footer 1\n footer 2aAge in years\n footer 3bXanomeline with dose β‰₯ 20mg\n footer 4This text should stay the same\n \n \n \n \n \n \n \n \n" + +# interpret_all_cell_content() is interpreting markups correctly + + Code + res$header + Output + $dataset + V1 V2 + 1 This is the main Ttl~[super a] This is the main Ttl~[super a] + 2 V1 V2 + V3 V4 + 1 This is the main Ttl~[super a] This is the main Ttl~[super a] + 2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 0.3969338 + + $hrule + [1] "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 4 0 0 0 + [2,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "white" "white" "white" "white" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "left" "left" "left" + [2,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0.0 0 0 0 + [2,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] "left_0.8" NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 10 10 10 10 + [2,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] TRUE TRUE TRUE TRUE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 USA 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + V1 V2 + 1 ~[super a]Title ~[super a]Title + 2 ~{super b}Drug = Xanomeline ~{super b}Drug = Xanomeline + 3 ~[super c]United States of America ~[super c]United States of America + V3 V4 + 1 ~[super a]Title ~[super a]Title + 2 ~{super b}Drug = Xanomeline ~{super b}Drug = Xanomeline + 3 ~[super c]United States of America ~[super c]United States of America + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.25 0.25 0.25 + + $hrule + [1] "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 4 0 0 0 + [2,] 4 0 0 0 + [3,] 4 0 0 0 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "center" "center" "center" "center" + [2,] "center" "center" "center" "center" + [3,] "center" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "left" "left" "left" + [2,] "left" "left" "left" "left" + [3,] "left" "left" "left" "left" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 8 8 8 8 + [2,] 8 8 8 8 + [3,] 8 8 8 8 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Arial" "Arial" "Arial" "Arial" + [2,] "Arial" "Arial" "Arial" "Arial" + [3,] "Arial" "Arial" "Arial" "Arial" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Arial" "Arial" "Arial" "Arial" + [2,] "Arial" "Arial" "Arial" "Arial" + [3,] "Arial" "Arial" "Arial" "Arial" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Arial" "Arial" "Arial" "Arial" + [2,] "Arial" "Arial" "Arial" "Arial" + [3,] "Arial" "Arial" "Arial" "Arial" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Arial" "Arial" "Arial" "Arial" + [2,] "Arial" "Arial" "Arial" "Arial" + [3,] "Arial" "Arial" "Arial" "Arial" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 3 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1This is the main Ttla\n header 2A: Drug X (N=134)bB: Placebo (N=134)C: Combination (N=132)\n body 1CHN74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2USAc10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CAN3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n footer 1aTitle\n footer 2bDrug = Xanomeline\n footer 3cUnited States of America\n \n \n \n \n \n \n \n \n" + +# insert_title_hanging_indent_v3() adds the title correctly + + Code + res$header + Output + $dataset + V1 V2 + 1 output id:\tthis is a test title output id:\tthis is a test title + 2 V1 V2 + V3 V4 + 1 output id:\tthis is a test title output id:\tthis is a test title + 2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 0.3969338 + + $hrule + [1] "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 4 0 0 0 + [2,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "white" "white" "white" "white" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "left" "left" "left" + [2,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0.0 0 0 0 + [2,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] "left_0.8" NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 10 10 10 10 + [2,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] TRUE TRUE TRUE TRUE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 USA 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + [1] V1 V2 V3 V4 + <0 rows> (or 0-length row.names) + + $content + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + [1] 1.974762 1.468413 1.468413 1.468413 + + $rowheights + numeric(0) + + $hrule + character(0) + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + + $spans$columns + [,1] [,2] [,3] [,4] + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1output id:this is a test title\n header 2A: Drug X (N=134)B: Placebo (N=134)C: Combination (N=132)\n body 1CHN74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2USA10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CAN3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n \n \n \n \n \n \n \n \n" + +# add_hanging_indent_first_column() works correctly + + Code + res$header + Output + $dataset + V1 V2 V3 V4 + 1 V1 V2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 + + $hrule + [1] "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 1 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 Republic of China 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 United States of America 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] "left_0.06" NA NA NA + [2,] "left_0.06" NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + [1] V1 V2 V3 V4 + <0 rows> (or 0-length row.names) + + $content + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + [1] 1.974762 1.468413 1.468413 1.468413 + + $rowheights + numeric(0) + + $hrule + character(0) + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + + $spans$columns + [,1] [,2] [,3] [,4] + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1A: Drug X (N=134)B: Placebo (N=134)C: Combination (N=132)\n body 1Republic ofChina74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2United Statesof America10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CAN3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n \n \n \n \n \n \n \n \n" + +# add_little_gap_bottom_borders_spanning_headers() works correctly + + Code + res$header + Output + $dataset + V1 V2 V3 V4 + 1 spanning header 1 spanning header 1 spanning header 2 spanning header 2 + 2 V1 V2 V3 V4 + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.3969338 0.3969338 + + $hrule + [1] "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 2 0 2 0 + [2,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 3 3 3 3 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 3 3 3 3 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "#666666" "#666666" "#666666" "#666666" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "center" "center" "center" "center" + [2,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0.0 0 0 0 + [2,] 3.6 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.75 0.75 0.75 0.75 + [2,] 0.00 0.00 0.00 0.00 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 2 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$body + Output + $dataset + V1 V2 V3 V4 + 1 CHN 74/134 (55.2%) 81/134 (60.4%) 64/132 (48.5%) + 2 USA 10/134 (7.5%) 13/134 (9.7%) 17/132 (12.9%) + 3 BRA 13/134 (9.7%) 7/134 (5.2%) 10/132 (7.6%) + 4 PAK 12/134 (9.0%) 9/134 (6.7%) 10/132 (7.6%) + 5 NGA 8/134 (6.0%) 7/134 (5.2%) 11/132 (8.3%) + 6 RUS 5/134 (3.7%) 8/134 (6.0%) 6/132 (4.5%) + 7 JPN 5/134 (3.7%) 4/134 (3.0%) 9/132 (6.8%) + 8 GBR 4/134 (3.0%) 3/134 (2.2%) 2/132 (1.5%) + 9 CAN 3/134 (2.2%) 2/134 (1.5%) 3/132 (2.3%) + 10 CHE 0/134 (0.0%) 0/134 (0.0%) 0/132 (0.0%) + + $content + $data + V1 V2 V3 V4 + [1,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [2,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [3,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [4,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [5,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [6,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [7,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [8,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [9,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + [10,] data.frame,19 data.frame,19 data.frame,19 data.frame,19 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + V1 V2 V3 V4 + 1.974762 1.468413 1.468413 1.468413 + + $rowheights + [1] 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 0.4285635 + [8] 0.4285635 0.4285635 0.4285635 + + $hrule + [1] "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" "auto" + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $spans$columns + [,1] [,2] [,3] [,4] + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + [1,] "bottom" "bottom" "bottom" "bottom" + [2,] "bottom" "bottom" "bottom" "bottom" + [3,] "bottom" "bottom" "bottom" "bottom" + [4,] "bottom" "bottom" "bottom" "bottom" + [5,] "bottom" "bottom" "bottom" "bottom" + [6,] "bottom" "bottom" "bottom" "bottom" + [7,] "bottom" "bottom" "bottom" "bottom" + [8,] "bottom" "bottom" "bottom" "bottom" + [9,] "bottom" "bottom" "bottom" "bottom" + [10,] "bottom" "bottom" "bottom" "bottom" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0.00 0.00 0.00 0.00 + [2,] 0.00 0.00 0.00 0.00 + [3,] 0.00 0.00 0.00 0.00 + [4,] 0.00 0.00 0.00 0.00 + [5,] 0.00 0.00 0.00 0.00 + [6,] 0.00 0.00 0.00 0.00 + [7,] 0.00 0.00 0.00 0.00 + [8,] 0.00 0.00 0.00 0.00 + [9,] 0.00 0.00 0.00 0.00 + [10,] 0.75 0.75 0.75 0.75 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + [1,] "lrtb" "lrtb" "lrtb" "lrtb" + [2,] "lrtb" "lrtb" "lrtb" "lrtb" + [3,] "lrtb" "lrtb" "lrtb" "lrtb" + [4,] "lrtb" "lrtb" "lrtb" "lrtb" + [5,] "lrtb" "lrtb" "lrtb" "lrtb" + [6,] "lrtb" "lrtb" "lrtb" "lrtb" + [7,] "lrtb" "lrtb" "lrtb" "lrtb" + [8,] "lrtb" "lrtb" "lrtb" "lrtb" + [9,] "lrtb" "lrtb" "lrtb" "lrtb" + [10,] "lrtb" "lrtb" "lrtb" "lrtb" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + [1,] "auto" "auto" "auto" "auto" + [2,] "auto" "auto" "auto" "auto" + [3,] "auto" "auto" "auto" "auto" + [4,] "auto" "auto" "auto" "auto" + [5,] "auto" "auto" "auto" "auto" + [6,] "auto" "auto" "auto" "auto" + [7,] "auto" "auto" "auto" "auto" + [8,] "auto" "auto" "auto" "auto" + [9,] "auto" "auto" "auto" "auto" + [10,] "auto" "auto" "auto" "auto" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + [1,] "left" "center" "center" "center" + [2,] "left" "center" "center" "center" + [3,] "left" "center" "center" "center" + [4,] "left" "center" "center" "center" + [5,] "left" "center" "center" "center" + [6,] "left" "center" "center" "center" + [7,] "left" "center" "center" "center" + [8,] "left" "center" "center" "center" + [9,] "left" "center" "center" "center" + [10,] "left" "center" "center" "center" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + [1,] 1 1 1 1 + [2,] 1 1 1 1 + [3,] 1 1 1 1 + [4,] 1 1 1 1 + [5,] 1 1 1 1 + [6,] 1 1 1 1 + [7,] 1 1 1 1 + [8,] 1 1 1 1 + [9,] 1 1 1 1 + [10,] 1 1 1 1 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + [1,] 0 0 0 0 + [2,] 0 0 0 0 + [3,] 0 0 0 0 + [4,] 0 0 0 0 + [5,] 0 0 0 0 + [6,] 0 0 0 0 + [7,] 0 0 0 0 + [8,] 0 0 0 0 + [9,] 0 0 0 0 + [10,] 0 0 0 0 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + [1,] "solid" "solid" "solid" "solid" + [2,] "solid" "solid" "solid" "solid" + [3,] "solid" "solid" "solid" "solid" + [4,] "solid" "solid" "solid" "solid" + [5,] "solid" "solid" "solid" "solid" + [6,] "solid" "solid" "solid" "solid" + [7,] "solid" "solid" "solid" "solid" + [8,] "solid" "solid" "solid" "solid" + [9,] "solid" "solid" "solid" "solid" + [10,] "solid" "solid" "solid" "solid" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + [1,] NA NA NA NA + [2,] NA NA NA NA + [3,] NA NA NA NA + [4,] NA NA NA NA + [5,] NA NA NA NA + [6,] NA NA NA NA + [7,] NA NA NA NA + [8,] NA NA NA NA + [9,] NA NA NA NA + [10,] NA NA NA NA + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + [1,] "black" "black" "black" "black" + [2,] "black" "black" "black" "black" + [3,] "black" "black" "black" "black" + [4,] "black" "black" "black" "black" + [5,] "black" "black" "black" "black" + [6,] "black" "black" "black" "black" + [7,] "black" "black" "black" "black" + [8,] "black" "black" "black" "black" + [9,] "black" "black" "black" "black" + [10,] "black" "black" "black" "black" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + [1,] 9 9 9 9 + [2,] 9 9 9 9 + [3,] 9 9 9 9 + [4,] 9 9 9 9 + [5,] 9 9 9 9 + [6,] 9 9 9 9 + [7,] 9 9 9 9 + [8,] 9 9 9 9 + [9,] 9 9 9 9 + [10,] 9 9 9 9 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + [1,] FALSE FALSE FALSE FALSE + [2,] FALSE FALSE FALSE FALSE + [3,] FALSE FALSE FALSE FALSE + [4,] FALSE FALSE FALSE FALSE + [5,] FALSE FALSE FALSE FALSE + [6,] FALSE FALSE FALSE FALSE + [7,] FALSE FALSE FALSE FALSE + [8,] FALSE FALSE FALSE FALSE + [9,] FALSE FALSE FALSE FALSE + [10,] FALSE FALSE FALSE FALSE + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + [1,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [2,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [3,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [4,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [5,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [6,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [7,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [8,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [9,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + [10,] "Times New Roman" "Times New Roman" "Times New Roman" "Times New Roman" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + [1,] "baseline" "baseline" "baseline" "baseline" + [2,] "baseline" "baseline" "baseline" "baseline" + [3,] "baseline" "baseline" "baseline" "baseline" + [4,] "baseline" "baseline" "baseline" "baseline" + [5,] "baseline" "baseline" "baseline" "baseline" + [6,] "baseline" "baseline" "baseline" "baseline" + [7,] "baseline" "baseline" "baseline" "baseline" + [8,] "baseline" "baseline" "baseline" "baseline" + [9,] "baseline" "baseline" "baseline" "baseline" + [10,] "baseline" "baseline" "baseline" "baseline" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + [1,] "transparent" "transparent" "transparent" "transparent" + [2,] "transparent" "transparent" "transparent" "transparent" + [3,] "transparent" "transparent" "transparent" "transparent" + [4,] "transparent" "transparent" "transparent" "transparent" + [5,] "transparent" "transparent" "transparent" "transparent" + [6,] "transparent" "transparent" "transparent" "transparent" + [7,] "transparent" "transparent" "transparent" "transparent" + [8,] "transparent" "transparent" "transparent" "transparent" + [9,] "transparent" "transparent" "transparent" "transparent" + [10,] "transparent" "transparent" "transparent" "transparent" + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 10 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$footer + Output + $dataset + [1] V1 V2 V3 V4 + <0 rows> (or 0-length row.names) + + $content + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [[1]] + txt font.size italic bold underlined color shading.color font.family + 1 NA NA NA NA + hansi.family eastasia.family cs.family vertical.align width height url + 1 NA NA + eq_data word_field_data img_data .chunk_index + 1 NULL 1 + + attr(,"class") + [1] "paragraph" + + attr(,"class") + [1] "chunkset_struct" + + $col_keys + [1] "V1" "V2" "V3" "V4" + + $colwidths + [1] 1.974762 1.468413 1.468413 1.468413 + + $rowheights + numeric(0) + + $hrule + character(0) + + $spans + $spans$rows + [,1] [,2] [,3] [,4] + + $spans$columns + [,1] [,2] [,3] [,4] + + + $styles + $styles$cells + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "center" + + attr(,"class") + [1] "fpstruct" + + $width + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $height + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + $margin.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $margin.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $text.direction + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "lrtb" + + attr(,"class") + [1] "fpstruct" + + $background.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $hrule + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "auto" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "cell_struct" + + $styles$pars + $text.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "left" + + attr(,"class") + [1] "fpstruct" + + $padding.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $padding.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 5 + + attr(,"class") + [1] "fpstruct" + + $line_spacing + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 1 + + attr(,"class") + [1] "fpstruct" + + $border.width.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.width.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 0 + + attr(,"class") + [1] "fpstruct" + + $border.color.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.color.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $border.style.bottom + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.top + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.left + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $border.style.right + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "solid" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + $keep_with_next + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $tabs + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] NA + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "par_struct" + + $styles$text + $color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "black" + + attr(,"class") + [1] "fpstruct" + + $font.size + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] 11 + + attr(,"class") + [1] "fpstruct" + + $bold + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $italic + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $underlined + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] FALSE + + attr(,"class") + [1] "fpstruct" + + $font.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $hansi.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $eastasia.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $cs.family + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "Arial" + + attr(,"class") + [1] "fpstruct" + + $vertical.align + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "baseline" + + attr(,"class") + [1] "fpstruct" + + $shading.color + $data + V1 V2 V3 V4 + + $keys + [1] "V1" "V2" "V3" "V4" + + $nrow + [1] 0 + + $ncol + [1] 4 + + $default + [1] "transparent" + + attr(,"class") + [1] "fpstruct" + + attr(,"class") + [1] "text_struct" + + + attr(,"class") + [1] "complex_tabpart" + +--- + + Code + res$col_keys + Output + [1] "V1" "V2" "V3" "V4" + +--- + + Code + res$caption + Output + $value + NULL + + +--- + + Code + res$blanks + Output + character(0) + +--- + + Code + res$properties + Output + $layout + [1] "fixed" + + $width + [1] 0 + + $align + [1] "left" + + $opts_html + $extra_css + [1] "" + + $scroll + NULL + + $extra_class + NULL + + attr(,"class") + [1] "opts_ft_html" + + $opts_word + $split + [1] FALSE + + $keep_with_next + [1] TRUE + + $repeat_headers + [1] TRUE + + attr(,"class") + [1] "opts_ft_word" + + $opts_pdf + $tabcolsep + [1] 2 + + $arraystretch + [1] 1.5 + + $float + [1] "none" + + $default_line_color + [1] "black" + + $caption_repeat + [1] TRUE + + $footer_repeat + [1] FALSE + + $fonts_ignore + [1] FALSE + + attr(,"class") + [1] "opts_ft_pdf" + + $word_title + NULL + + $word_description + NULL + + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n header 1spanning header 1spanning header 2\n header 2A: Drug X (N=134)B: Placebo (N=134)C: Combination (N=132)\n body 1CHN74/134 (55.2%)81/134 (60.4%)64/132 (48.5%)\n body 2USA10/134 (7.5%)13/134 (9.7%)17/132 (12.9%)\n body 3BRA13/134 (9.7%)7/134 (5.2%)10/132 (7.6%)\n body 4PAK12/134 (9.0%)9/134 (6.7%)10/132 (7.6%)\n body 5NGA8/134 (6.0%)7/134 (5.2%)11/132 (8.3%)\n body 6RUS5/134 (3.7%)8/134 (6.0%)6/132 (4.5%)\n body 7JPN5/134 (3.7%)4/134 (3.0%)9/132 (6.8%)\n body 8GBR4/134 (3.0%)3/134 (2.2%)2/132 (1.5%)\n body 9CAN3/134 (2.2%)2/134 (1.5%)3/132 (2.3%)\n body10CHE0/134 (0.0%)0/134 (0.0%)0/132 (0.0%)\n \n \n \n \n \n \n \n \n" + +# export_as_docx_j() works with pagination + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n header 1\ntest1234part1of2:This is the main Title\n header 2\nActive Study Agent\n header 3\nA: Drug XC: Combination\n header 4\nLaboratory TestN=134N=132\n header 5\nStudy Visitn/N (%)Mean (95% CI)Mean Change From Baseline (95% CI)n/N (%)Mean (95% CI)Mean Change From Baseline (95% CI)\n body 1\nAge: < 35 years134 132 \n body 2\n \n body 3\nAlanine AminotransferaseMeasurement \n body 4\nBASELINE77/77 (100.0%)50.1 (48.2, 52.0)0.0 (0.0, 0.0)63/63 (100.0%)51.1 (49.2, 53.0)0.0 (0.0, 0.0)\n body 5\nWEEK 1 DAY 877/77 (100.0%)49.2 (47.3, 51.0)-0.9 (-3.8, 1.9)63/63 (100.0%)50.4 (48.5, 52.4)-0.7 (-3.2, 1.9)\n body 6\nWEEK 2 DAY 1577/77 (100.0%)50.5 (48.6, 52.3)0.4 (-2.3, 3.1)63/63 (100.0%)48.3 (46.5, 50.2)-2.8 (-5.4, -0.2)\n body 7\nWEEK 3 DAY 2277/77 (100.0%)50.1 (48.3, 51.9)0.0 (-2.6, 2.6)63/63 (100.0%)49.5 (47.5, 51.5)-1.6 (-4.3, 1.2)\n body 8\nWEEK 4 DAY 2977/77 (100.0%)50.8 (49.0, 52.6)0.7 (-2.1, 3.5)63/63 (100.0%)49.6 (47.6, 51.6)-1.5 (-4.2, 1.1)\n body 9\nWEEK 5 DAY 3677/77 (100.0%)50.8 (49.1, 52.5)0.7 (-2.1, 3.6)63/63 (100.0%)49.9 (47.9, 51.9)-1.2 (-4.0, 1.7)\n body10\n\n body11\nC-Reactive Protein Measurement \n body12\nBASELINE77/77 (100.0%)49.3 (46.9, 51.6)0.0 (0.0, 0.0)63/63 (100.0%)50.8 (48.6, 53.0)0.0 (0.0, 0.0)\n body13\nWEEK 1 DAY 877/77 (100.0%)51.2 (49.2, 53.2)2.0 (-1.2, 5.2)63/63 (100.0%)51.0 (48.8, 53.1)0.2 (-2.9, 3.3)\n body14\nWEEK 2 DAY 1577/77 (100.0%)49.3 (47.5, 51.2)0.1 (-2.9, 3.0)63/63 (100.0%)50.1 (48.3, 52.0)-0.6 (-3.3, 2.1)\n body15\nWEEK 3 DAY 2277/77 (100.0%)49.3 (47.2, 51.3)0.0 (-3.1, 3.2)63/63 (100.0%)49.6 (47.7, 51.4)-1.2 (-4.1, 1.8)\n body16\nWEEK 4 DAY 2977/77 (100.0%)51.1 (49.1, 53.2)1.9 (-1.2, 5.0)63/63 (100.0%)50.0 (48.0, 52.0)-0.7 (-3.9, 2.4)\n body17\nWEEK 5 DAY 3677/77 (100.0%)50.3 (48.2, 52.3)1.0 (-2.3, 4.3)63/63 (100.0%)49.1 (47.2, 51.0)-1.6 (-4.5, 1.2)\n body18\nAge: β‰₯ 35 years134 132 \n body19\n \n body20\nAlanine AminotransferaseMeasurement \n body21\nBASELINE57/57 (100.0%)48.9 (46.6, 51.1)0.0 (0.0, 0.0)69/69 (100.0%)50.7 (48.8, 52.7)0.0 (0.0, 0.0)\n body22\nWEEK 1 DAY 857/57 (100.0%)47.8 (45.8, 49.9)-1.0 (-3.8, 1.8)69/69 (100.0%)51.7 (49.8, 53.6)1.0 (-1.8, 3.8)\n body23\nWEEK 2 DAY 1557/57 (100.0%)48.0 (45.7, 50.3)-0.9 (-4.1, 2.3)69/69 (100.0%)48.7 (47.0, 50.4)-2.1 (-4.8, 0.7)\n body24\nWEEK 3 DAY 2257/57 (100.0%)50.5 (48.6, 52.4)1.6 (-1.5, 4.7)69/69 (100.0%)48.2 (46.3, 50.1)-2.5 (-5.2, 0.2)\n body25\nWEEK 4 DAY 2957/57 (100.0%)50.6 (47.8, 53.4)1.7 (-2.1, 5.4)69/69 (100.0%)49.7 (47.8, 51.6)-1.0 (-3.6, 1.6)\n body26\nWEEK 5 DAY 3657/57 (100.0%)50.9 (48.6, 53.1)2.0 (-1.0, 5.0)69/69 (100.0%)50.0 (47.9, 52.1)-0.7 (-3.4, 2.0)\n body27\n\n body28\nC-Reactive Protein Measurement \n body29\nBASELINE57/57 (100.0%)48.5 (46.3, 50.7)0.0 (0.0, 0.0)69/69 (100.0%)49.7 (47.8, 51.7)0.0 (0.0, 0.0)\n body30\nWEEK 1 DAY 857/57 (100.0%)52.7 (50.9, 54.6)4.2 (1.6, 6.8)69/69 (100.0%)49.6 (47.2, 52.0)-0.1 (-3.4, 3.2)\n body31\nWEEK 2 DAY 1557/57 (100.0%)50.3 (48.1, 52.6)1.8 (-1.3, 4.9)69/69 (100.0%)48.2 (46.0, 50.3)-1.5 (-4.3, 1.3)\n body32\nWEEK 3 DAY 2257/57 (100.0%)51.1 (49.2, 53.0)2.6 (-0.1, 5.3)69/69 (100.0%)50.0 (48.1, 51.9)0.3 (-2.7, 3.3)\n body33\nWEEK 4 DAY 2957/57 (100.0%)52.2 (50.4, 54.1)3.7 (1.1, 6.3)69/69 (100.0%)49.5 (47.8, 51.3)-0.2 (-2.8, 2.4)\n body34\nWEEK 5 DAY 3657/57 (100.0%)49.0 (46.7, 51.3)0.5 (-2.6, 3.6)69/69 (100.0%)49.0 (47.1, 50.9)-0.7 (-3.6, 2.2)\n footer 1\n\n footer 2\nfooter 1\n footer 3\nfooter 2\n \n \n \n \n \n \n \n" + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n header 1\ntest1234part2of2:This is the main Title\n header 2\n Difference in Mean Change (95% CI)\n header 3\nB: PlaceboA: Drug X vs B: PlaceboC: Combination vs B: Placebo\n header 4\nLaboratory TestN=134N=134N=132\n header 5\nStudy Visitn/N (%)Mean (95% CI)Mean Change From Baseline (95% CI) \n body 1\nAge: < 35 years134 \n body 2\n \n body 3\nAlanine Aminotransferase Measurement \n body 4\nBASELINE65/65 (100.0%)49.7 (47.7, 51.7)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body 5\nWEEK 1 DAY 865/65 (100.0%)49.9 (48.3, 51.5)0.2 (-2.6, 3.0)-1.1 (-5.1, 2.8)-0.9 (-4.6, 2.9)\n body 6\nWEEK 2 DAY 1565/65 (100.0%)49.4 (47.1, 51.6)-0.4 (-3.6, 2.9)0.7 (-3.5, 5.0)-2.4 (-6.6, 1.7)\n body 7\nWEEK 3 DAY 2265/65 (100.0%)49.6 (47.7, 51.5)-0.1 (-2.8, 2.5)0.1 (-3.6, 3.8)-1.4 (-5.2, 2.3)\n body 8\nWEEK 4 DAY 2965/65 (100.0%)49.4 (47.3, 51.4)-0.3 (-3.1, 2.5)1.1 (-2.9, 5.0)-1.2 (-5.0, 2.6)\n body 9\nWEEK 5 DAY 3665/65 (100.0%)49.1 (47.1, 51.1)-0.6 (-3.7, 2.4)1.4 (-2.8, 5.5)-0.5 (-4.7, 3.6)\n body10\n\n body11\nC-Reactive Protein Measurement \n body12\nBASELINE65/65 (100.0%)48.7 (46.7, 50.7)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body13\nWEEK 1 DAY 865/65 (100.0%)50.3 (48.1, 52.6)1.6 (-1.4, 4.7)0.3 (-4.0, 4.7)-1.4 (-5.7, 2.9)\n body14\nWEEK 2 DAY 1565/65 (100.0%)50.9 (49.1, 52.8)2.2 (-0.5, 4.9)-2.2 (-6.2, 1.8)-2.8 (-6.6, 1.0)\n body15\nWEEK 3 DAY 2265/65 (100.0%)49.1 (47.2, 51.1)0.4 (-2.3, 3.2)-0.4 (-4.5, 3.7)-1.6 (-5.6, 2.4)\n body16\nWEEK 4 DAY 2965/65 (100.0%)49.0 (47.0, 51.0)0.3 (-2.5, 3.1)1.6 (-2.6, 5.8)-1.0 (-5.2, 3.2)\n body17\nWEEK 5 DAY 3665/65 (100.0%)51.1 (49.3, 52.9)2.4 (-0.4, 5.2)-1.4 (-5.7, 2.9)-4.0 (-8.0, -0.1)\n body18\nAge: β‰₯ 35 years134 \n body19\n \n body20\nAlanine Aminotransferase Measurement \n body21\nBASELINE69/69 (100.0%)50.9 (48.8, 52.9)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body22\nWEEK 1 DAY 869/69 (100.0%)50.9 (48.8, 53.1)0.1 (-3.0, 3.2)-1.1 (-5.3, 3.1)0.9 (-3.2, 5.0)\n body23\nWEEK 2 DAY 1569/69 (100.0%)51.1 (49.2, 52.9)0.2 (-2.6, 3.1)-1.1 (-5.4, 3.1)-2.3 (-6.2, 1.7)\n body24\nWEEK 3 DAY 2269/69 (100.0%)49.8 (47.9, 51.6)-1.1 (-3.9, 1.7)2.7 (-1.4, 6.9)-1.4 (-5.3, 2.5)\n body25\nWEEK 4 DAY 2969/69 (100.0%)49.2 (47.0, 51.3)-1.7 (-5.0, 1.6)3.4 (-1.5, 8.3)0.7 (-3.5, 4.9)\n body26\nWEEK 5 DAY 3669/69 (100.0%)50.3 (48.2, 52.4)-0.6 (-3.7, 2.6)2.5 (-1.8, 6.8)-0.1 (-4.2, 3.9)\n body27\n\n body28\nC-Reactive Protein Measurement \n body29\nBASELINE69/69 (100.0%)51.4 (49.5, 53.2)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body30\nWEEK 1 DAY 869/69 (100.0%)50.2 (48.2, 52.3)-1.2 (-3.8, 1.4)5.4 (1.7, 9.0)1.1 (-3.1, 5.3)\n body31\nWEEK 2 DAY 1569/69 (100.0%)50.8 (49.1, 52.6)-0.5 (-3.0, 1.9)2.4 (-1.6, 6.3)-1.0 (-4.7, 2.7)\n body32\nWEEK 3 DAY 2269/69 (100.0%)49.4 (47.7, 51.1)-2.0 (-4.4, 0.4)4.6 (1.0, 8.2)2.3 (-1.5, 6.1)\n body33\nWEEK 4 DAY 2969/69 (100.0%)49.9 (47.9, 52.0)-1.4 (-4.0, 1.2)5.1 (1.5, 8.8)1.2 (-2.4, 4.9)\n body34\nWEEK 5 DAY 3669/69 (100.0%)50.6 (48.7, 52.5)-0.8 (-3.5, 1.9)1.2 (-2.8, 5.3)0.1 (-3.8, 4.0)\n footer 1\n\n footer 2\nfooter 1\n footer 3\nfooter 2\n \n \n \n \n \n \n \n" + +--- + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n header 1\ntest1234allparts:This is the main Title\n header 2\nActive Study Agent\n header 3\nA: Drug XC: Combination\n header 4\nLaboratory TestN=134N=132\n header 5\nStudy Visitn/N (%)Mean (95% CI)Mean Change From Baseline (95% CI)n/N (%)Mean (95% CI)Mean Change From Baseline (95% CI)\n body 1\nAge: < 35 years134 132 \n body 2\n \n body 3\nAlanine AminotransferaseMeasurement \n body 4\nBASELINE77/77 (100.0%)50.1 (48.2, 52.0)0.0 (0.0, 0.0)63/63 (100.0%)51.1 (49.2, 53.0)0.0 (0.0, 0.0)\n body 5\nWEEK 1 DAY 877/77 (100.0%)49.2 (47.3, 51.0)-0.9 (-3.8, 1.9)63/63 (100.0%)50.4 (48.5, 52.4)-0.7 (-3.2, 1.9)\n body 6\nWEEK 2 DAY 1577/77 (100.0%)50.5 (48.6, 52.3)0.4 (-2.3, 3.1)63/63 (100.0%)48.3 (46.5, 50.2)-2.8 (-5.4, -0.2)\n body 7\nWEEK 3 DAY 2277/77 (100.0%)50.1 (48.3, 51.9)0.0 (-2.6, 2.6)63/63 (100.0%)49.5 (47.5, 51.5)-1.6 (-4.3, 1.2)\n body 8\nWEEK 4 DAY 2977/77 (100.0%)50.8 (49.0, 52.6)0.7 (-2.1, 3.5)63/63 (100.0%)49.6 (47.6, 51.6)-1.5 (-4.2, 1.1)\n body 9\nWEEK 5 DAY 3677/77 (100.0%)50.8 (49.1, 52.5)0.7 (-2.1, 3.6)63/63 (100.0%)49.9 (47.9, 51.9)-1.2 (-4.0, 1.7)\n body10\n\n body11\nC-Reactive Protein Measurement \n body12\nBASELINE77/77 (100.0%)49.3 (46.9, 51.6)0.0 (0.0, 0.0)63/63 (100.0%)50.8 (48.6, 53.0)0.0 (0.0, 0.0)\n body13\nWEEK 1 DAY 877/77 (100.0%)51.2 (49.2, 53.2)2.0 (-1.2, 5.2)63/63 (100.0%)51.0 (48.8, 53.1)0.2 (-2.9, 3.3)\n body14\nWEEK 2 DAY 1577/77 (100.0%)49.3 (47.5, 51.2)0.1 (-2.9, 3.0)63/63 (100.0%)50.1 (48.3, 52.0)-0.6 (-3.3, 2.1)\n body15\nWEEK 3 DAY 2277/77 (100.0%)49.3 (47.2, 51.3)0.0 (-3.1, 3.2)63/63 (100.0%)49.6 (47.7, 51.4)-1.2 (-4.1, 1.8)\n body16\nWEEK 4 DAY 2977/77 (100.0%)51.1 (49.1, 53.2)1.9 (-1.2, 5.0)63/63 (100.0%)50.0 (48.0, 52.0)-0.7 (-3.9, 2.4)\n body17\nWEEK 5 DAY 3677/77 (100.0%)50.3 (48.2, 52.3)1.0 (-2.3, 4.3)63/63 (100.0%)49.1 (47.2, 51.0)-1.6 (-4.5, 1.2)\n body18\nAge: β‰₯ 35 years134 132 \n body19\n \n body20\nAlanine AminotransferaseMeasurement \n body21\nBASELINE57/57 (100.0%)48.9 (46.6, 51.1)0.0 (0.0, 0.0)69/69 (100.0%)50.7 (48.8, 52.7)0.0 (0.0, 0.0)\n body22\nWEEK 1 DAY 857/57 (100.0%)47.8 (45.8, 49.9)-1.0 (-3.8, 1.8)69/69 (100.0%)51.7 (49.8, 53.6)1.0 (-1.8, 3.8)\n body23\nWEEK 2 DAY 1557/57 (100.0%)48.0 (45.7, 50.3)-0.9 (-4.1, 2.3)69/69 (100.0%)48.7 (47.0, 50.4)-2.1 (-4.8, 0.7)\n body24\nWEEK 3 DAY 2257/57 (100.0%)50.5 (48.6, 52.4)1.6 (-1.5, 4.7)69/69 (100.0%)48.2 (46.3, 50.1)-2.5 (-5.2, 0.2)\n body25\nWEEK 4 DAY 2957/57 (100.0%)50.6 (47.8, 53.4)1.7 (-2.1, 5.4)69/69 (100.0%)49.7 (47.8, 51.6)-1.0 (-3.6, 1.6)\n body26\nWEEK 5 DAY 3657/57 (100.0%)50.9 (48.6, 53.1)2.0 (-1.0, 5.0)69/69 (100.0%)50.0 (47.9, 52.1)-0.7 (-3.4, 2.0)\n body27\n\n body28\nC-Reactive Protein Measurement \n body29\nBASELINE57/57 (100.0%)48.5 (46.3, 50.7)0.0 (0.0, 0.0)69/69 (100.0%)49.7 (47.8, 51.7)0.0 (0.0, 0.0)\n body30\nWEEK 1 DAY 857/57 (100.0%)52.7 (50.9, 54.6)4.2 (1.6, 6.8)69/69 (100.0%)49.6 (47.2, 52.0)-0.1 (-3.4, 3.2)\n body31\nWEEK 2 DAY 1557/57 (100.0%)50.3 (48.1, 52.6)1.8 (-1.3, 4.9)69/69 (100.0%)48.2 (46.0, 50.3)-1.5 (-4.3, 1.3)\n body32\nWEEK 3 DAY 2257/57 (100.0%)51.1 (49.2, 53.0)2.6 (-0.1, 5.3)69/69 (100.0%)50.0 (48.1, 51.9)0.3 (-2.7, 3.3)\n body33\nWEEK 4 DAY 2957/57 (100.0%)52.2 (50.4, 54.1)3.7 (1.1, 6.3)69/69 (100.0%)49.5 (47.8, 51.3)-0.2 (-2.8, 2.4)\n body34\nWEEK 5 DAY 3657/57 (100.0%)49.0 (46.7, 51.3)0.5 (-2.6, 3.6)69/69 (100.0%)49.0 (47.1, 50.9)-0.7 (-3.6, 2.2)\n footer 1\n\n footer 2\nfooter 1\n footer 3\nfooter 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n header 1\ntest1234allparts:This is the main Title\n header 2\n Difference in Mean Change (95% CI)\n header 3\nB: PlaceboA: Drug X vs B: PlaceboC: Combination vs B: Placebo\n header 4\nLaboratory TestN=134N=134N=132\n header 5\nStudy Visitn/N (%)Mean (95% CI)Mean Change From Baseline (95% CI) \n body 1\nAge: < 35 years134 \n body 2\n \n body 3\nAlanine Aminotransferase Measurement \n body 4\nBASELINE65/65 (100.0%)49.7 (47.7, 51.7)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body 5\nWEEK 1 DAY 865/65 (100.0%)49.9 (48.3, 51.5)0.2 (-2.6, 3.0)-1.1 (-5.1, 2.8)-0.9 (-4.6, 2.9)\n body 6\nWEEK 2 DAY 1565/65 (100.0%)49.4 (47.1, 51.6)-0.4 (-3.6, 2.9)0.7 (-3.5, 5.0)-2.4 (-6.6, 1.7)\n body 7\nWEEK 3 DAY 2265/65 (100.0%)49.6 (47.7, 51.5)-0.1 (-2.8, 2.5)0.1 (-3.6, 3.8)-1.4 (-5.2, 2.3)\n body 8\nWEEK 4 DAY 2965/65 (100.0%)49.4 (47.3, 51.4)-0.3 (-3.1, 2.5)1.1 (-2.9, 5.0)-1.2 (-5.0, 2.6)\n body 9\nWEEK 5 DAY 3665/65 (100.0%)49.1 (47.1, 51.1)-0.6 (-3.7, 2.4)1.4 (-2.8, 5.5)-0.5 (-4.7, 3.6)\n body10\n\n body11\nC-Reactive Protein Measurement \n body12\nBASELINE65/65 (100.0%)48.7 (46.7, 50.7)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body13\nWEEK 1 DAY 865/65 (100.0%)50.3 (48.1, 52.6)1.6 (-1.4, 4.7)0.3 (-4.0, 4.7)-1.4 (-5.7, 2.9)\n body14\nWEEK 2 DAY 1565/65 (100.0%)50.9 (49.1, 52.8)2.2 (-0.5, 4.9)-2.2 (-6.2, 1.8)-2.8 (-6.6, 1.0)\n body15\nWEEK 3 DAY 2265/65 (100.0%)49.1 (47.2, 51.1)0.4 (-2.3, 3.2)-0.4 (-4.5, 3.7)-1.6 (-5.6, 2.4)\n body16\nWEEK 4 DAY 2965/65 (100.0%)49.0 (47.0, 51.0)0.3 (-2.5, 3.1)1.6 (-2.6, 5.8)-1.0 (-5.2, 3.2)\n body17\nWEEK 5 DAY 3665/65 (100.0%)51.1 (49.3, 52.9)2.4 (-0.4, 5.2)-1.4 (-5.7, 2.9)-4.0 (-8.0, -0.1)\n body18\nAge: β‰₯ 35 years134 \n body19\n \n body20\nAlanine Aminotransferase Measurement \n body21\nBASELINE69/69 (100.0%)50.9 (48.8, 52.9)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body22\nWEEK 1 DAY 869/69 (100.0%)50.9 (48.8, 53.1)0.1 (-3.0, 3.2)-1.1 (-5.3, 3.1)0.9 (-3.2, 5.0)\n body23\nWEEK 2 DAY 1569/69 (100.0%)51.1 (49.2, 52.9)0.2 (-2.6, 3.1)-1.1 (-5.4, 3.1)-2.3 (-6.2, 1.7)\n body24\nWEEK 3 DAY 2269/69 (100.0%)49.8 (47.9, 51.6)-1.1 (-3.9, 1.7)2.7 (-1.4, 6.9)-1.4 (-5.3, 2.5)\n body25\nWEEK 4 DAY 2969/69 (100.0%)49.2 (47.0, 51.3)-1.7 (-5.0, 1.6)3.4 (-1.5, 8.3)0.7 (-3.5, 4.9)\n body26\nWEEK 5 DAY 3669/69 (100.0%)50.3 (48.2, 52.4)-0.6 (-3.7, 2.6)2.5 (-1.8, 6.8)-0.1 (-4.2, 3.9)\n body27\n\n body28\nC-Reactive Protein Measurement \n body29\nBASELINE69/69 (100.0%)51.4 (49.5, 53.2)0.0 (0.0, 0.0)0.0 (NE, NE)0.0 (NE, NE)\n body30\nWEEK 1 DAY 869/69 (100.0%)50.2 (48.2, 52.3)-1.2 (-3.8, 1.4)5.4 (1.7, 9.0)1.1 (-3.1, 5.3)\n body31\nWEEK 2 DAY 1569/69 (100.0%)50.8 (49.1, 52.6)-0.5 (-3.0, 1.9)2.4 (-1.6, 6.3)-1.0 (-4.7, 2.7)\n body32\nWEEK 3 DAY 2269/69 (100.0%)49.4 (47.7, 51.1)-2.0 (-4.4, 0.4)4.6 (1.0, 8.2)2.3 (-1.5, 6.1)\n body33\nWEEK 4 DAY 2969/69 (100.0%)49.9 (47.9, 52.0)-1.4 (-4.0, 1.2)5.1 (1.5, 8.8)1.2 (-2.4, 4.9)\n body34\nWEEK 5 DAY 3669/69 (100.0%)50.6 (48.7, 52.5)-0.8 (-3.5, 1.9)1.2 (-2.8, 5.3)0.1 (-3.8, 4.0)\n footer 1\n\n footer 2\nfooter 1\n footer 3\nfooter 2\n \n \n \n \n \n \n \n" + +# export_graph_as_docx() works with basic example + + Code + as.character(xml2::xml_child(doc$doc_obj$get(), 1)) + Output + [1] "\n \n \n \n \n \n \n \n \n \n header1\ntestgraph1234:Duration of Treatment; Safety Analysis Set (Study jjcs - core)\n body1\n\n body2\n\n \n \n \n \n \n \n \n" + diff --git a/tests/testthat/_snaps/jjcs_num_formats.md b/tests/testthat/_snaps/jjcs_num_formats.md index 15df9649..bbe44134 100644 --- a/tests/testthat/_snaps/jjcs_num_formats.md +++ b/tests/testthat/_snaps/jjcs_num_formats.md @@ -24,23 +24,26 @@ --- Code - format_value(values, format = jjcsformat_xx_SAS("xx.x (xx.xx)")) + format_value(values, format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "sas") Output [1] "5.1 (7.89)" Code - format_value(values, format = jjcsformat_xx_R("xx.x (xx.xx)")) + format_value(values, format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "iec") Output [1] "5.1 (7.89)" Code - format_value(c(5.05, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.xx)")) + format_value(c(5.05, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), + round_type = "sas") Output [1] "5.1 (7.89)" Code - format_value(c(5.05, values[2]), format = jjcsformat_xx_R("xx.x (xx.xx)")) + format_value(c(5.05, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), + round_type = "iec") Output [1] "5.0 (7.89)" Code - format_value(c(5.15, values[2]), format = jjcsformat_xx_R("xx.x (xx.xx)")) + format_value(c(5.15, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), + round_type = "iec") Output [1] "5.2 (7.89)" Code @@ -48,11 +51,13 @@ Output [1] "5.2 (7.9)" Code - format_value(c(4.15, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.xx)")) + format_value(c(4.15, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), + round_type = "sas") Output [1] "4.2 (7.89)" Code - format_value(c(4.15, values[2]), format = jjcsformat_xx_R("xx.x (xx.xx)")) + format_value(c(4.15, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), + round_type = "iec") Output [1] "4.2 (7.89)" Code @@ -60,7 +65,8 @@ Output [1] "4.2 (7.9)" Code - format_value(c(4.15, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.x)")) + format_value(c(4.15, values[2]), format = jjcsformat_xx("xx.x (xx.x)"), + round_type = "sas") Output [1] "4.2 (7.9)" Code @@ -68,303 +74,316 @@ Output [1] "3.1 (7.9)" Code - format_value(c(3.15, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.x)")) + format_value(c(3.15, values[2]), format = jjcsformat_xx("xx.x (xx.x)"), + round_type = "sas") Output [1] "3.2 (7.9)" Code - format_value(c(3.15, values[2]), format = jjcsformat_xx_R("xx.x (xx.x)")) + format_value(c(3.15, values[2]), format = jjcsformat_xx("xx.x (xx.x)"), + round_type = "iec") Output [1] "3.1 (7.9)" --- Code - format_value(values, format = jjcsformat_xx_SAS("xx / xx")) + format_value(values, format = jjcsformat_xx("xx / xx"), round_type = "sas") Output [1] "5.123456 / 7.891112" Code - format_value(values, format = jjcsformat_xx_SAS("xx. / xx.")) + format_value(values, format = jjcsformat_xx("xx. / xx."), round_type = "sas") Output [1] "5 / 8" Code - format_value(values, format = jjcsformat_xx_SAS("xx.x / xx.x")) + format_value(values, format = jjcsformat_xx("xx.x / xx.x"), round_type = "sas") Output [1] "5.1 / 7.9" Code - format_value(values, format = jjcsformat_xx_SAS("xx.xx / xx.xx")) + format_value(values, format = jjcsformat_xx("xx.xx / xx.xx"), round_type = "sas") Output [1] "5.12 / 7.89" Code - format_value(values, format = jjcsformat_xx_SAS("xx.xxx / xx.xxx")) + format_value(values, format = jjcsformat_xx("xx.xxx / xx.xxx"), round_type = "sas") Output [1] "5.123 / 7.891" Code - format_value(values, format = jjcsformat_xx_SAS("(xx, xx)")) + format_value(values, format = jjcsformat_xx("(xx, xx)"), round_type = "sas") Output [1] "(5.123456, 7.891112)" Code - format_value(values, format = jjcsformat_xx_SAS("(xx., xx.)")) + format_value(values, format = jjcsformat_xx("(xx., xx.)"), round_type = "sas") Output [1] "(5, 8)" Code - format_value(values, format = jjcsformat_xx_SAS("(xx.x, xx.x)")) + format_value(values, format = jjcsformat_xx("(xx.x, xx.x)"), round_type = "sas") Output [1] "(5.1, 7.9)" Code - format_value(values, format = jjcsformat_xx_SAS("(xx.xx, xx.xx)")) + format_value(values, format = jjcsformat_xx("(xx.xx, xx.xx)"), round_type = "sas") Output [1] "(5.12, 7.89)" Code - format_value(values, format = jjcsformat_xx_SAS("(xx.xxx, xx.xxx)")) + format_value(values, format = jjcsformat_xx("(xx.xxx, xx.xxx)"), round_type = "sas") Output [1] "(5.123, 7.891)" Code - format_value(values, format = jjcsformat_xx_SAS("(xx.xxxx, xx.xxxx)")) + format_value(values, format = jjcsformat_xx("(xx.xxxx, xx.xxxx)"), round_type = "sas") Output [1] "(5.1235, 7.8911)" Code - format_value(values, format = jjcsformat_xx_SAS("xx - xx")) + format_value(values, format = jjcsformat_xx("xx - xx"), round_type = "sas") Output [1] "5.123456 - 7.891112" Code - format_value(values, format = jjcsformat_xx_SAS("xx.x - xx.x")) + format_value(values, format = jjcsformat_xx("xx.x - xx.x"), round_type = "sas") Output [1] "5.1 - 7.9" Code - format_value(values, format = jjcsformat_xx_SAS("xx.xx - xx.xx")) + format_value(values, format = jjcsformat_xx("xx.xx - xx.xx"), round_type = "sas") Output [1] "5.12 - 7.89" Code - format_value(values, format = jjcsformat_xx_SAS("xx (xx)")) + format_value(values, format = jjcsformat_xx("xx (xx)"), round_type = "sas") Output [1] "5.123456 (7.891112)" Code - format_value(values, format = jjcsformat_xx_SAS("xx (xx.)")) + format_value(values, format = jjcsformat_xx("xx (xx.)"), round_type = "sas") Output [1] "5.123456 (8)" Code - format_value(values, format = jjcsformat_xx_SAS("xx (xx.x)")) + format_value(values, format = jjcsformat_xx("xx (xx.x)"), round_type = "sas") Output [1] "5.123456 (7.9)" Code - format_value(values, format = jjcsformat_xx_SAS("xx (xx.xx)")) + format_value(values, format = jjcsformat_xx("xx (xx.xx)"), round_type = "sas") Output [1] "5.123456 (7.89)" Code - format_value(values, format = jjcsformat_xx_SAS("xx. (xx.)")) + format_value(values, format = jjcsformat_xx("xx. (xx.)"), round_type = "sas") Output [1] "5 (8)" Code - format_value(values, format = jjcsformat_xx_SAS("xx.x (xx.x)")) + format_value(values, format = jjcsformat_xx("xx.x (xx.x)"), round_type = "sas") Output [1] "5.1 (7.9)" Code - format_value(values, format = jjcsformat_xx_SAS("xx.xx (xx.xx)")) + format_value(values, format = jjcsformat_xx("xx.xx (xx.xx)"), round_type = "sas") Output [1] "5.12 (7.89)" Code - format_value(values, format = jjcsformat_xx_SAS("xx.x, xx.x")) + format_value(values, format = jjcsformat_xx("xx.x, xx.x"), round_type = "sas") Output [1] "5.1, 7.9" Code - format_value(values, format = jjcsformat_xx_SAS("xx.x to xx.x")) + format_value(values, format = jjcsformat_xx("xx.x to xx.x"), round_type = "sas") Output [1] "5.1 to 7.9" Code - format_value(c(values, 10.1235), format = jjcsformat_xx_SAS("xx. (xx. - xx.)")) + format_value(c(values, 10.1235), format = jjcsformat_xx("xx. (xx. - xx.)"), + round_type = "sas") Output [1] "5 (8 - 10)" Code - format_value(c(values, 10.1235), format = jjcsformat_xx_SAS( - "xx.x (xx.x - xx.x)")) + format_value(c(values, 10.1235), format = jjcsformat_xx("xx.x (xx.x - xx.x)"), + round_type = "sas") Output [1] "5.1 (7.9 - 10.1)" Code - format_value(c(values, 10.1235), format = jjcsformat_xx_SAS( - "xx.xx (xx.xx - xx.xx)")) + format_value(c(values, 10.1235), format = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), + round_type = "sas") Output [1] "5.12 (7.89 - 10.12)" Code - format_value(c(values, 10.1235), format = jjcsformat_xx_SAS( - "xx.xxx (xx.xxx - xx.xxx)")) + format_value(c(values, 10.1235), format = jjcsformat_xx( + "xx.xxx (xx.xxx - xx.xxx)"), round_type = "sas") Output [1] "5.123 (7.891 - 10.124)" Code - format_value(NULL, jjcsformat_xx_SAS("xx")) + format_value(NULL, jjcsformat_xx("xx"), round_type = "sas") Output [1] "" Code - format_value(c(500), jjcsformat_xx_SAS("N=xx")) + format_value(c(500), jjcsformat_xx("N=xx"), round_type = "sas") Output [1] "N=500" Code - format_value(c(500), jjcsformat_xx_SAS("(N=xx)")) + format_value(c(500), jjcsformat_xx("(N=xx)"), round_type = "sas") Output [1] "(N=500)" --- Code - format_value(0, jjcsformat_xx_SAS("xx.")) + format_value(0, jjcsformat_xx("xx."), round_type = "sas") Output [1] "0" Code - format_value(0, jjcsformat_xx_SAS("xx.x")) + format_value(0, jjcsformat_xx("xx.x"), round_type = "sas") Output [1] "0.0" Code - format_value(0, jjcsformat_xx_SAS("xx.xx")) + format_value(0, jjcsformat_xx("xx.xx"), round_type = "sas") Output [1] "0.00" Code - format_value(0, jjcsformat_xx_SAS("xx.xxx")) + format_value(0, jjcsformat_xx("xx.xxx"), round_type = "sas") Output [1] "0.000" Code - format_value(0, jjcsformat_xx_SAS("xx.xxxx")) + format_value(0, jjcsformat_xx("xx.xxxx"), round_type = "sas") Output [1] "0.0000" # jjcsformats NA works Code - format_value(NA, jjcsformat_xx_SAS("xx."), na_str = "-") + format_value(NA, jjcsformat_xx("xx."), round_type = "sas", na_str = "-") Output [1] "-" Code - format_value(NA, jjcsformat_xx_SAS("xx"), na_str = "-") + format_value(NA, jjcsformat_xx("xx"), round_type = "sas", na_str = "-") Output [1] "-" --- Code - format_value(c(1.2, NA, NA), jjcsformat_xx_SAS("xx.x (xx.x - xx.x)"), na_str = "NA") + format_value(c(1.2, NA, NA), jjcsformat_xx("xx.x (xx.x - xx.x)"), round_type = "sas", + na_str = "NE") Output [1] "1.2 (NE - NE)" Code - format_value(c(1.2, NA, NA), jjcsformat_xx_SAS("xx.x (xx.x - xx.x)"), na_str = "x") + format_value(c(1.2, NA, NA), jjcsformat_xx("xx.x (xx.x - xx.x)"), round_type = "sas", + na_str = "x") Output [1] "1.2 (x - x)" Code - format_value(c(NA, NA, NA), jjcsformat_xx_SAS("xx.x (xx.x - xx.x)"), na_str = "x") + format_value(c(NA, NA, NA), jjcsformat_xx("xx.x (xx.x - xx.x)"), round_type = "sas", + na_str = "x") Output [1] "x" --- Code - format_value(c(NA, NA), format = jjcsformat_xx_SAS("xx.x - xx.x"), na_str = c( - "hi", "lo")) + format_value(c(NA, NA), format = jjcsformat_xx("xx.x - xx.x"), round_type = "sas", + na_str = c("hi", "lo")) Output [1] "hi - lo" Code - format_value(c(NA, 5.2), format = jjcsformat_xx_SAS("xx.x - xx.x"), na_str = "what") + format_value(c(NA, 5.2), format = jjcsformat_xx("xx.x - xx.x"), round_type = "sas", + na_str = "what") Output [1] "what - 5.2" Code - format_value(c(NA, 5.2), format = jjcsformat_xx_SAS("xx.x - xx.x"), na_str = c( - "hi", "lo")) + format_value(c(NA, 5.2), format = jjcsformat_xx("xx.x - xx.x"), round_type = "sas", + na_str = c("hi", "lo")) Output [1] "hi - 5.2" Code - format_value(c(NA, NA), format = jjcsformat_xx_SAS("xx.x - xx.x"), na_str = "what") + format_value(c(NA, NA), format = jjcsformat_xx("xx.x - xx.x"), round_type = "sas", + na_str = "what") Output [1] "what" --- Code - format_value(NA, format = jjcsformat_xx_SAS("xx.x"), na_str = character()) + format_value(NA, format = jjcsformat_xx("xx.x"), round_type = "sas", na_str = character()) Output [1] "NA" Code - format_value(NA, format = jjcsformat_xx_SAS("xx.x"), na_str = NA_character_) + format_value(NA, format = jjcsformat_xx("xx.x"), round_type = "sas", na_str = NA_character_) Output [1] "NA" --- Code - format_value(c(6.23, NA, NA), format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), - na_str = "-") + format_value(c(6.23, NA, NA), format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = "-") Output [1] "6.2 (-, -)" Code - format_value(c(NA, NA, NA), format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), - na_str = "-") + format_value(c(NA, NA, NA), format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = "-") Output [1] "-" Code - format_value(c(6.23, NA, NA), format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), - na_str = c("-", "x", "x")) + format_value(c(6.23, NA, NA), format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = c("-", "x", "x")) Output [1] "6.2 (-, x)" Code - format_value(c(6.23, NA, NA), format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), - na_str = c("-", "x", "y")) + format_value(c(6.23, NA, NA), format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = c("-", "x", "y")) Output [1] "6.2 (-, x)" # jjcsformats count_fraction works Code - format_value(cdf, format = jjcsformat_count_denom_fraction) + format_value(cdf, format = jjcsformat_count_denom_fraction, round_type = "sas") Output [1] "5/2000 (0.3%)" Code - format_value(cf, format = jjcsformat_count_fraction) + format_value(cf, format = jjcsformat_count_fraction, round_type = "sas") Output [1] "5 (0.3%)" Code - format_value(cf, format = "xx (xx.x%)") + format_value(cf, format = "xx (xx.x%)", round_type = "iec") Output [1] "5 (0.2%)" Code - format_value(c(2000, 2001, 2000 / 2001), format = jjcsformat_count_denom_fraction) + format_value(c(2000, 2001, 2000 / 2001), format = jjcsformat_count_denom_fraction, + round_type = "sas") Output [1] "2000/2001 (>99.9%)" Code - format_value(c(2000, 2000 / 2001), format = "xx (xx.x%)") + format_value(c(2000, 2000 / 2001), format = "xx (xx.x%)", round_type = "iec") Output [1] "2000 (100.0%)" Code - format_value(c(1, 2001, 1 / 2001), format = jjcsformat_count_denom_fraction) + format_value(c(1, 2001, 1 / 2001), format = jjcsformat_count_denom_fraction, + round_type = "sas") Output [1] "1/2001 (<0.1%)" Code - format_value(c(1, 1 / 2001), format = "xx (xx.x%)") + format_value(c(1, 1 / 2001), format = "xx (xx.x%)", round_type = "iec") Output [1] "1 (0.0%)" Code - format_value(c(3, 3, 3 / 3), format = jjcsformat_count_denom_fraction) + format_value(c(3, 3, 3 / 3), format = jjcsformat_count_denom_fraction, + round_type = "sas") Output [1] "3/3 (100.0%)" Code - format_value(c(3, 3 / 3), format = "xx (xx.x%)") + format_value(c(3, 3 / 3), format = "xx (xx.x%)", round_type = "iec") Output [1] "3 (100.0%)" Code - format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), na_str = rep( - "NA", 10)) + format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), + round_type = "sas", na_str = rep("NE", 10)) Output [1] "NE (NE, NE)" Code - format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), na_str = rep( - "NA", 1)) + format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), + round_type = "sas", na_str = rep("NA", 1)) Output [1] "NA" Code - format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)")) + format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), + round_type = "sas", na_str = "NA") Output [1] "NA" Code - format_value(c(1, rep(NA, 2)), format = jjcsformat_xx("xx.x (xx.x, xx.x)")) + format_value(c(1, rep(NA, 2)), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), + round_type = "sas", na_str = rep("NE", 10)) Output [1] "1.0 (NE, NE)" Code format_value(c(1, rep(NA, 2)), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), - na_str = c("ne1", "ne2", "ne3")) + round_type = "sas", na_str = c("ne1", "ne2", "ne3")) Output [1] "1.0 (ne1, ne2)" diff --git a/tests/testthat/_snaps/jjcsformats.md b/tests/testthat/_snaps/jjcsformats.md index b7ee6ced..391fa205 100644 --- a/tests/testthat/_snaps/jjcsformats.md +++ b/tests/testthat/_snaps/jjcsformats.md @@ -199,6 +199,10 @@ my_range_format(c(0.35235, 99.2342, 1, 1)) Output [1] "(0.35+, 99.23+)" + Code + my_range_format2(c(0.35235, 99.2342, 0, 1)) + Output + [1] "(0.35, 99.23*)" # jjcsformat_pval_fct works @@ -210,6 +214,10 @@ jjcsformat_pval_fct(0.005)(0.00499) Output [1] "0.00499" + Code + jjcsformat_pval_fct(0.005)(0.000499) + Output + [1] "<0.001" Code jjcsformat_pval_fct(0)(0.0048) Output @@ -246,4 +254,24 @@ jjcsformat_pval_fct(0)(0.9990000001) Output [1] ">0.999" + Code + jjcsformat_pval_fct(0)(NA_real_, na_str = "ne") + Output + [1] "ne" + Code + jjcsformat_pval_fct(5e-04)(NA_real_, na_str = "ne") + Output + [1] "ne" + Code + jjcsformat_pval_fct(0.005)(0.004999999) + Output + [1] "0.004999999" + Code + jjcsformat_pval_fct(0.005)(0.0049999999) + Output + [1] "0.0049999999" + Code + jjcsformat_pval_fct(0.005)(0.00499999999) + Output + [1] "0.0050000000" diff --git a/tests/testthat/_snaps/junco_utils_default_stats_formats_labels.md b/tests/testthat/_snaps/junco_utils_default_stats_formats_labels.md new file mode 100644 index 00000000..882ed6fe --- /dev/null +++ b/tests/testthat/_snaps/junco_utils_default_stats_formats_labels.md @@ -0,0 +1,54 @@ +# get_stats works as expected + + Code + res + Output + [1] "quantiles_lower" "median_ci_3d" "quantiles_upper" + [4] "range_with_cens_info" + +# get_formats_from_stats works as expected + + Code + normalize_fun(res$quantiles_upper) + Output + [1] "{if(anyNA(na_str)||(replace_na_dflt&&any(na_str==\"NA\"))){na_inds<-which(is.na(na_str)|(replace_na_dflt&na_str==\"NA\"))na_str[na_inds]<-rep(na_str_dflt,length.out=length(na_str))[na_inds]}if(length(x)==0||isTRUE(all(x==\"\"))){return(NULL)}elseif(!length(positions[[1]])==length(x)){stop(\"Error:inputstrincalltojjcsformat_xxmustcontainsamenumberofxxasthenumberofstats.\")}round_type<-match.arg(round_type)values<-Map(y=x,fun=roundings,na_str=na_str,function(y,fun,na_str,output){fun(y,na_str=na_str,round_type=round_type)})regmatches(x=str,m=positions)[[1]]<-valuesreturn(str)}" + +--- + + Code + normalize_fun(res$range_with_cens_info) + Output + [1] "{round_type<-match.arg(round_type)checkmate::assert_numeric(x,len=4L,finite=TRUE,any.missing=FALSE)checkmate::assert_true(all(x[c(3,4)]%in%c(0,1)))res<-vapply(x[c(1,2)],FUN=function(x){format_value(x,format_xx,round_type=round_type)},character(1))if(x[3]==1)res[1]<-paste0(res[1],censor_char)if(x[4]==1)res[2]<-paste0(res[2],censor_char)paste0(\"(\",res[1],\",\",res[2],\")\")}" + +# get_labels_from_stats works as expected + + Code + res + Output + $quantiles_upper + [1] "75%-ile (95% CI)" + + $range_with_cens_info + [1] "Min, max" + + +# get_label_attr_from_stats works as expected + + Code + res + Output + stats1 stats2 + "bla" "boo" + +# get_indents_from_stats works as expected + + Code + res + Output + $quantiles_upper + [1] 0 + + $range_with_cens_info + [1] 0 + + diff --git a/tests/testthat/_snaps/resp01_functions.md b/tests/testthat/_snaps/resp01_functions.md index 3cd507c1..25a2f4cd 100644 --- a/tests/testthat/_snaps/resp01_functions.md +++ b/tests/testthat/_snaps/resp01_functions.md @@ -1,4 +1,4 @@ -# resp01_split_fun_fct works as expected +# resp01_split_fun_fct 1 works as expected Code result @@ -7,7 +7,7 @@ Odds Ratio (95% CI)~[super a] p-value~[super b] n (%) 95% CI for % n (%) 95% CI for % n (%) 95% CI for % β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” ---- +# resp01_split_fun_fct 2 works as expected Code col_info(result) @@ -24,7 +24,7 @@ C: Combination (ARM) -> prop_ci (ID) -# resp01_counts_cfun works as expected +# resp01_counts_cfun 1 works as expected Code result @@ -34,21 +34,28 @@ row_name formatted_cell indent_mod row_label 1 Color: Blue 2 0 Color: Blue -# resp01_a_comp_stat_logical works as expected +# resp01_a_comp_stat_logical or_cmh works as expected Code result Output rcell: 0.87 (0.61 - 1.24) ---- +# resp01_a_comp_stat_logical or_logistic works as expected Code result Output rcell: 0.524 -# resp01_a_comp_stat_factor works as expected +# resp01_a_comp_stat_logical rr works as expected + + Code + result + Output + rcell: 0.94 (0.80 - 1.11) + +# resp01_a_comp_stat_factor or_cmh works as expected Code result @@ -66,7 +73,7 @@ 8 GBR 0 GBR 9 CAN 0 CAN ---- +# resp01_a_comp_stat_factor or_logistic works as expected Code result @@ -102,7 +109,7 @@ 8 GBR 7 (2.0%) 0 GBR 9 CAN 7 (2.0%) 0 CAN ---- +# resp01_acfun works 2 as expected Code result @@ -120,7 +127,7 @@ 8 GBR 0 GBR 9 CAN 0 CAN ---- +# resp01_acfun 3 works as expected Code result diff --git a/tests/testthat/_snaps/summarize_ancova.md b/tests/testthat/_snaps/summarize_ancova.md index 915adf41..5e2a0e28 100644 --- a/tests/testthat/_snaps/summarize_ancova.md +++ b/tests/testthat/_snaps/summarize_ancova.md @@ -48,7 +48,7 @@ n 50 50 50 Mean (SD) 1.46 (0.174) 4.26 (0.470) 5.55 (0.552) Median 1.50 4.35 5.55 - Min, max 1.00, 1.90 3.00, 5.10 4.50, 6.90 + Min, max 1.0, 1.9 3.0, 5.1 4.5, 6.9 25% and 75%-ile 1.40, 1.60 4.00, 4.60 5.10, 5.90 Difference in Adjusted Means (95% CI) 2.80 (2.63, 2.97) 4.09 (3.92, 4.26) p-value <0.001 <0.001 diff --git a/tests/testthat/_snaps/tabulate_lsmeans_wide.md b/tests/testthat/_snaps/tabulate_lsmeans_wide.md index c461787b..03b1a0de 100644 --- a/tests/testthat/_snaps/tabulate_lsmeans_wide.md +++ b/tests/testthat/_snaps/tabulate_lsmeans_wide.md @@ -48,6 +48,16 @@ row_name formatted_cell indent_mod row_label 1 1 62.1 0 Day 15 (DB) +--- + + Code + result + Output + RowsVerticalSection (in_rows) object print method: + ---------------------------- + row_name formatted_cell indent_mod row_label + 1 1 0.6 0 Day 15 (DB) + # lsmeans_wide_cfun works as expected with more than one treatment group Code @@ -130,50 +140,50 @@ Code result Output - Reference Group Testing Group Testing - Reference - Treatment N LS Mean Treatment N LS Mean M. S. Error Error DF LS Mean SE 80% CI 2-sided p-value~[super a] - β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” - VIS1 PBO 68 33.2 TRT 66 36.8 41.2 129 3.7 1.13 (1.80, 5.56) 0.001 + Reference Group Testing Group Testing - Reference + Treatment N LS Mean SE Treatment N LS Mean SE M. S. Error Error DF LS Mean SE 80% CI 2-sided p-value~[super a] + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + VIS1 PBO 68 33.2 0.82 TRT 66 36.8 0.79 41.2 129 3.7 1.13 (1.80, 5.56) 0.001 - VIS2 PBO 69 38.0 TRT 71 42.3 26.0 135 4.2 0.88 (2.79, 5.70) <0.001 + VIS2 PBO 69 38.0 0.63 TRT 71 42.3 0.61 26.0 135 4.2 0.88 (2.79, 5.70) <0.001 - VIS3 PBO 71 43.8 TRT 58 46.8 15.0 124 3.1 0.70 (1.89, 4.22) <0.001 + VIS3 PBO 71 43.8 0.47 TRT 58 46.8 0.52 15.0 124 3.1 0.70 (1.89, 4.22) <0.001 - VIS4 PBO 67 48.7 TRT 67 52.5 94.6 129 3.9 1.70 (1.07, 6.71) 0.024 + VIS4 PBO 67 48.7 1.22 TRT 67 52.5 1.19 94.6 129 3.9 1.70 (1.07, 6.71) 0.024 # summarize_lsmeans_wide works as expected with more than 1 treatment group Code result Output - Reference Group Testing Group Testing - Reference - Treatment N LS Mean Treatment N LS Mean M. S. Error Error DF LS Mean SE 80% CI 2-sided p-value~[super a] - β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” - VIS1 PBO 68 33.0 TRT 66 36.5 74.3 194 3.5 1.51 (1.41, 5.53) 0.044 - TRT2 66 37.5 4.4 1.51 (2.36, 6.48) 0.008 + Reference Group Testing Group Testing - Reference + Treatment N LS Mean SE Treatment N LS Mean SE M. S. Error Error DF LS Mean SE 80% CI 2-sided p-value~[super a] + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + VIS1 PBO 68 33.0 1.06 TRT 66 36.5 1.06 74.3 194 3.5 1.51 (1.41, 5.53) 0.044 + TRT2 66 37.5 1.06 4.4 1.51 (2.36, 6.48) 0.008 - VIS2 PBO 69 37.6 TRT 71 41.9 51.7 205 4.3 1.23 (2.58, 5.94) 0.001 - TRT2 71 42.4 4.8 1.23 (3.12, 6.47) <0.001 + VIS2 PBO 69 37.6 0.87 TRT 71 41.9 0.86 51.7 205 4.3 1.23 (2.58, 5.94) 0.001 + TRT2 71 42.4 0.86 4.8 1.23 (3.12, 6.47) <0.001 - VIS3 PBO 71 43.6 TRT 58 46.6 47.6 181 3.0 1.25 (1.25, 4.65) 0.036 - TRT2 58 49.2 5.5 1.25 (3.85, 7.24) <0.001 + VIS3 PBO 71 43.6 0.83 TRT 58 46.6 0.91 47.6 181 3.0 1.25 (1.25, 4.65) 0.036 + TRT2 58 49.2 0.91 5.5 1.25 (3.85, 7.24) <0.001 - VIS4 PBO 67 48.5 TRT 67 52.2 129.6 195 3.7 1.98 (1.04, 6.45) 0.111 - TRT2 67 52.9 4.4 1.98 (1.68, 7.08) 0.054 + VIS4 PBO 67 48.5 1.40 TRT 67 52.2 1.39 129.6 195 3.7 1.98 (1.04, 6.45) 0.111 + TRT2 67 52.9 1.39 4.4 1.98 (1.68, 7.08) 0.054 # summarize_lsmeans_wide can omit variance and p-value columns Code result Output - Reference Group Testing Group Testing - Reference - Treatment N LS Mean Treatment N LS Mean LS Mean SE 80% CI - β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” - VIS1 PBO 68 33.2 TRT 66 36.8 3.7 1.13 (1.80, 5.56) + Reference Group Testing Group Testing - Reference + Treatment N LS Mean SE Treatment N LS Mean SE LS Mean SE 80% CI + β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” + VIS1 PBO 68 33.2 0.82 TRT 66 36.8 0.79 3.7 1.13 (1.80, 5.56) - VIS2 PBO 69 38.0 TRT 71 42.3 4.2 0.88 (2.79, 5.70) + VIS2 PBO 69 38.0 0.63 TRT 71 42.3 0.61 4.2 0.88 (2.79, 5.70) - VIS3 PBO 71 43.8 TRT 58 46.8 3.1 0.70 (1.89, 4.22) + VIS3 PBO 71 43.8 0.47 TRT 58 46.8 0.52 3.1 0.70 (1.89, 4.22) - VIS4 PBO 67 48.7 TRT 67 52.5 3.9 1.70 (1.07, 6.71) + VIS4 PBO 67 48.7 1.22 TRT 67 52.5 1.19 3.9 1.70 (1.07, 6.71) diff --git a/tests/testthat/_snaps/test_proportion_diff.md b/tests/testthat/_snaps/test_proportion_diff.md index 7bba0a6c..8f07bb15 100644 --- a/tests/testthat/_snaps/test_proportion_diff.md +++ b/tests/testthat/_snaps/test_proportion_diff.md @@ -1,36 +1,3 @@ -# s_test_proportion_diff works as expected - - Code - result - Output - $pval - [1] 0.6477165 - attr(,"label") - [1] "p-value (Cochran-Mantel-Haenszel Test)" - - ---- - - Code - result - Output - $pval - [1] 0.6761418 - attr(,"label") - [1] "p-value (Cochran-Mantel-Haenszel Test, 1-sided, direction greater)" - - ---- - - Code - result - Output - $pval - list() - attr(,"label") - [1] "p-value (Cochran-Mantel-Haenszel Test, 1-sided, direction greater)" - - # a_test_proportion_diff works as expected in table layout Code @@ -40,87 +7,3 @@ β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” p-value (Cochran-Mantel-Haenszel Test) 0.648 -# prop_chisq returns right result - - Code - res - Output - [1] 0.05653028 - ---- - - Code - res - Output - [1] 0.9717349 - ---- - - Code - res - Output - [1] 0.02826514 - -# prop_cmh returns right result - - Code - res - Output - [1] 0.6477165 - ---- - - Code - res - Output - [1] 0.6761418 - ---- - - Code - res - Output - [1] 0.3238582 - -# prop_cmh also works when there are strata with just one observation - - Code - res - Output - [1] 0.3325724 - ---- - - Code - res - Output - [1] 0.8337138 - ---- - - Code - res - Output - [1] 0.1662862 - -# prop_fisher returns right result - - Code - res - Output - [1] 0.1109695 - ---- - - Code - res - Output - [1] 0.9875791 - ---- - - Code - res - Output - [1] 0.05548477 - diff --git a/tests/testthat/_snaps/tt_to_tblfile/listing1.rtf b/tests/testthat/_snaps/tt_to_tblfile/listing1.rtf index 4b3b8f2c..4744dc50 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/listing1.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/listing1.rtf @@ -723,16 +723,16 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx558 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx2757 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx3446 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx3971 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx4234 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx5547 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx7122 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx7614 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx8270 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx558 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx2757 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx3446 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx3971 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx4234 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx5547 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx7122 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx7614 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx8270 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 \cell \pard\intbl\qc\fs16 AB12345-CHN-2-id-395 \cell \pard\intbl\qc\fs16 id-395 \cell \pard\intbl\qc\fs16 CHN-2 \cell @@ -747,16 +747,16 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx558 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx2757 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx3446 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx3971 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx4234 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx5547 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx7122 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx7614 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx8270 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx558 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx2757 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx3446 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx3971 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx4234 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx5547 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx7122 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx7614 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx8270 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 \cell \pard\intbl\qc\fs16 AB12345-USA-1-id-242 \cell \pard\intbl\qc\fs16 id-242 \cell \pard\intbl\qc\fs16 USA-1 \cell @@ -768,5 +768,29 @@ \pard\intbl\qc\fs16 C: Combination \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx558 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx2757 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx3446 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx3971 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx4234 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx5547 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx7122 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx7614 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx8270 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \par {\footer\pard\sb240\qr\fs16{\insrsid2691151 Listing Page }{\field{\*\fldinst {\insrsid2691151 PAGE }}{\fldrslt {\insrsid26911511}}}{\insrsid2691151 of }{\field{\*\fldinst {\insrsid2691151 NUMPAGES }} {\fldrslt {\insrsid112265262}}}{\insrsid2691151 \par }} } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test1.rtf b/tests/testthat/_snaps/tt_to_tblfile/test1.rtf index 7e7d5503..8cc5dd87 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test1.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test1.rtf @@ -27,14 +27,26 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2828 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4948 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7069 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2828 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4948 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7069 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 33.77 \cell \pard\intbl\qc\fs18 35.43 \cell \pard\intbl\qc\fs18 35.43 \cell \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2828 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4948 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7069 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test1b.rtf b/tests/testthat/_snaps/tt_to_tblfile/test1b.rtf index 69505e28..c1a42cc2 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test1b.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test1b.rtf @@ -27,14 +27,26 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2863 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4971 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7080 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2863 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4971 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7080 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 33.77 \cell \pard\intbl\qc\fs18 35.43 \cell \pard\intbl\qc\fs18 35.43 \cell \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2863 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4971 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7080 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2part1of7.rtf b/tests/testthat/_snaps/tt_to_tblfile/test2part1of7.rtf index 120921ea..bd3d2855 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2part1of7.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test2part1of7.rtf @@ -327,13 +327,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6161 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6161 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -345,13 +345,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3968 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5065 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6161 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7101 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8197 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6161 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -361,4 +361,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6161 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2part2of7.rtf b/tests/testthat/_snaps/tt_to_tblfile/test2part2of7.rtf index 2b498724..0cc6ddfe 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2part2of7.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test2part2of7.rtf @@ -327,13 +327,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4908 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6005 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6997 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8093 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4908 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6005 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6997 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8093 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -345,13 +345,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3968 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4908 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6005 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6997 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8093 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4908 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6005 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6997 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8093 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -361,4 +361,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4908 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6005 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6997 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8093 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2part3of7.rtf b/tests/testthat/_snaps/tt_to_tblfile/test2part3of7.rtf index f1ca988f..dc3c7952 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2part3of7.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test2part3of7.rtf @@ -327,13 +327,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6161 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6161 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -345,13 +345,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3968 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5065 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6161 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7101 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8197 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6161 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -361,4 +361,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6161 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2part4of7.rtf b/tests/testthat/_snaps/tt_to_tblfile/test2part4of7.rtf index 162a60fb..f2f7d6cf 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2part4of7.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test2part4of7.rtf @@ -327,13 +327,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2862 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4017 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5008 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6053 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7208 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8199 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2862 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4017 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5008 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6053 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7208 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8199 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -345,13 +345,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2862 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4017 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5008 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6053 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7208 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8199 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2862 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4017 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5008 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6053 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7208 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8199 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -361,4 +361,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2862 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4017 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5008 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6053 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7208 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8199 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2part5of7.rtf b/tests/testthat/_snaps/tt_to_tblfile/test2part5of7.rtf index df3576ce..138d9d85 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2part5of7.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test2part5of7.rtf @@ -291,12 +291,12 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4166 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5330 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6616 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7903 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4166 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5330 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6616 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7903 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -307,12 +307,12 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4166 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5330 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6616 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7903 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4166 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5330 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6616 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7903 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -321,4 +321,20 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4166 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5330 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6616 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7903 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2part6of7.rtf b/tests/testthat/_snaps/tt_to_tblfile/test2part6of7.rtf index 2db782fe..10ef0651 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2part6of7.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test2part6of7.rtf @@ -327,13 +327,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6005 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6005 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell @@ -345,13 +345,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3968 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5065 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6005 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7101 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8197 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6005 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -361,4 +361,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6005 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2part7of7.rtf b/tests/testthat/_snaps/tt_to_tblfile/test2part7of7.rtf index 27105640..f5d3d7f2 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2part7of7.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test2part7of7.rtf @@ -147,18 +147,26 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2757 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2757 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \row } { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2757 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2757 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2757 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test2allparts.rtf b/tests/testthat/_snaps/tt_to_tblfile/test3allparts.rtf similarity index 91% rename from tests/testthat/_snaps/tt_to_tblfile/test2allparts.rtf rename to tests/testthat/_snaps/tt_to_tblfile/test3allparts.rtf index 3a5e0b2b..1ddba151 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/test2allparts.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/test3allparts.rtf @@ -9,7 +9,7 @@ \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s15 test2allparts:\tab \b0 \cell +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s15 test3allparts:\tab \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell @@ -327,13 +327,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -345,13 +345,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3932 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4983 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -360,6 +360,24 @@ \pard\intbl\qc\fs18 NA \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \page \v\par\v0 { @@ -370,7 +388,7 @@ \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test2allparts:\tab \b0 \cell +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test3allparts:\tab \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell @@ -688,13 +706,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -706,13 +724,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3932 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4983 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -721,6 +739,24 @@ \pard\intbl\qc\fs18 NA \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \page \v\par\v0 { @@ -731,7 +767,7 @@ \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test2allparts:\tab \b0 \cell +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test3allparts:\tab \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell @@ -1049,13 +1085,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -1067,13 +1103,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3932 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4983 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -1082,6 +1118,24 @@ \pard\intbl\qc\fs18 NA \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \page \v\par\v0 { @@ -1092,7 +1146,7 @@ \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test2allparts:\tab \b0 \cell +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test3allparts:\tab \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell @@ -1410,13 +1464,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -1428,13 +1482,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3932 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4983 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -1443,6 +1497,24 @@ \pard\intbl\qc\fs18 NA \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \page \v\par\v0 { @@ -1452,7 +1524,7 @@ \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5404 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6666 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7927 -\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test2allparts:\tab \b0 \cell +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test3allparts:\tab \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell @@ -1735,12 +1807,12 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4142 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5404 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6666 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7927 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4142 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5404 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6666 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7927 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -1751,12 +1823,12 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4142 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5404 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6666 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7927 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4142 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5404 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6666 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7927 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -1764,6 +1836,22 @@ \pard\intbl\qc\fs18 NA \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4142 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5404 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6666 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7927 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \page \v\par\v0 { @@ -1774,7 +1862,7 @@ \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 \clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test2allparts:\tab \b0 \cell +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test3allparts:\tab \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell @@ -2092,13 +2180,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell @@ -2110,13 +2198,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3932 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4983 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6035 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7086 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8138 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3932 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4983 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6035 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7086 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8138 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell @@ -2125,12 +2213,30 @@ \pard\intbl\qc\fs18 NA \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3932 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4983 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6035 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7086 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8138 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \page \v\par\v0 { \trowd \trqc \clmgf\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test2allparts:\tab \b0 \cell +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s16 test3allparts:\tab \b0 \cell \pard\intbl\ql\fs20 \b \b0 \cell \row } @@ -2273,18 +2379,26 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 UNKNOWN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \row } { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2880 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2880 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li267\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2880 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test4iec.rtf b/tests/testthat/_snaps/tt_to_tblfile/test4iec.rtf new file mode 100755 index 00000000..d670428d --- /dev/null +++ b/tests/testthat/_snaps/tt_to_tblfile/test4iec.rtf @@ -0,0 +1,52 @@ +{\rtf1\ansi\deff0\portrait\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\headery1440\footery1440{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang9\langfe3081\loch\f0\hich\af0\dbch\af31505\cgrid\langnp9\langfenp3081 \snext0 \sqformat \spriority0 Normal;}{\s15\ql \fi-1152\li1152\ri0\keepn\widctlpar\tx1152\wrapdefault\faauto\rin0\lin1152\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe1033\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sqformat caption;}{\s16 \ql \fi-1152\li1152\ri0\keepn\widctlpar\tx1152\wrapdefault\faauto\rin0\lin1152\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe1033\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sqformat;}} + + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4786 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6701 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s15 test4iec:\tab \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\row +} + +{ +\trowd +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadr67\clpadfr3\cellx2872 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx4786 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx6701 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx9189 \pard\intbl\ql\fs18 \keepn\trhdr \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM A \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM B \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM C \cell +\row +} + +{ +\trowd +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4786 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6701 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\pard\intbl\qc\fs18 1.86 \cell +\pard\intbl\qc\fs18 2.98 \cell +\pard\intbl\qc\fs18 -0.00 \cell +\row +} + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4786 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6701 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + +} \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test4iecmod.rtf b/tests/testthat/_snaps/tt_to_tblfile/test4iecmod.rtf new file mode 100755 index 00000000..53491421 --- /dev/null +++ b/tests/testthat/_snaps/tt_to_tblfile/test4iecmod.rtf @@ -0,0 +1,52 @@ +{\rtf1\ansi\deff0\portrait\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\headery1440\footery1440{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang9\langfe3081\loch\f0\hich\af0\dbch\af31505\cgrid\langnp9\langfenp3081 \snext0 \sqformat \spriority0 Normal;}{\s15\ql \fi-1152\li1152\ri0\keepn\widctlpar\tx1152\wrapdefault\faauto\rin0\lin1152\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe1033\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sqformat caption;}{\s16 \ql \fi-1152\li1152\ri0\keepn\widctlpar\tx1152\wrapdefault\faauto\rin0\lin1152\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe1033\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sqformat;}} + + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4786 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6701 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s15 test4iecmod:\tab \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\row +} + +{ +\trowd +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadr67\clpadfr3\cellx2872 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx4786 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx6701 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx9189 \pard\intbl\ql\fs18 \keepn\trhdr \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM A \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM B \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM C \cell +\row +} + +{ +\trowd +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4786 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6701 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\pard\intbl\qc\fs18 1.86 \cell +\pard\intbl\qc\fs18 2.98 \cell +\pard\intbl\qc\fs18 0.00 \cell +\row +} + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4786 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6701 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + +} \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/test4sas.rtf b/tests/testthat/_snaps/tt_to_tblfile/test4sas.rtf new file mode 100755 index 00000000..a7c004b2 --- /dev/null +++ b/tests/testthat/_snaps/tt_to_tblfile/test4sas.rtf @@ -0,0 +1,52 @@ +{\rtf1\ansi\deff0\portrait\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\headery1440\footery1440{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20\alang1025 \ltrch\fcs0 \fs20\lang9\langfe3081\loch\f0\hich\af0\dbch\af31505\cgrid\langnp9\langfenp3081 \snext0 \sqformat \spriority0 Normal;}{\s15\ql \fi-1152\li1152\ri0\keepn\widctlpar\tx1152\wrapdefault\faauto\rin0\lin1152\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe1033\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sqformat caption;}{\s16 \ql \fi-1152\li1152\ri0\keepn\widctlpar\tx1152\wrapdefault\faauto\rin0\lin1152\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 \b\fs20\lang1033\langfe1033\loch\f0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \sqformat;}} + + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4786 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6701 +\clmrg\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs20 \b \pnhang\trhdr\fi-1152\li1152\keepn\s15 test4sas:\tab \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\pard\intbl\ql\fs20 \b \b0 \cell +\row +} + +{ +\trowd +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadr67\clpadfr3\cellx2872 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx4786 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx6701 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\clpadt67\clpadft3\clpadr67\clpadfr3\cellx9189 \pard\intbl\ql\fs18 \keepn\trhdr \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM A \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM B \cell +\pard\intbl\qc\fs18 \keepn\trhdr ARM C \cell +\row +} + +{ +\trowd +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4786 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6701 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\pard\intbl\qc\fs18 1.87 \cell +\pard\intbl\qc\fs18 2.99 \cell +\pard\intbl\qc\fs18 0.00 \cell +\row +} + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4786 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6701 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + +} \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/testemptylisting.rtf b/tests/testthat/_snaps/tt_to_tblfile/testemptylisting.rtf index 0dd5a9cb..ad01d65b 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/testemptylisting.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/testemptylisting.rtf @@ -51,16 +51,16 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx3001 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx3751 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx4736 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx5486 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx5861 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx6189 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx6611 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx7314 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx8252 -\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 No data to report \cell +\trqc \clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx3001 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx3751 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx4736 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx5486 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx5861 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx6189 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx6611 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx7314 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx8252 +\clbrdrt\brdrs\brdrw18\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 No data to report \cell \pard\intbl\qc\fs16 \cell \pard\intbl\qc\fs16 \cell \pard\intbl\qc\fs16 \cell @@ -72,5 +72,29 @@ \pard\intbl\qc\fs16 \cell \row } + +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx3001 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx3751 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx4736 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx5486 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx5861 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx6189 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx6611 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx7314 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx8252 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalt\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} \par {\footer\pard\sb240\qr\fs16{\insrsid2691151 Listing Page }{\field{\*\fldinst {\insrsid2691151 PAGE }}{\fldrslt {\insrsid26911511}}}{\insrsid2691151 of }{\field{\*\fldinst {\insrsid2691151 NUMPAGES }} {\fldrslt {\insrsid112265262}}}{\insrsid2691151 \par }} } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart1of6.rtf b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart1of6.rtf index 3003c0a5..74f985b2 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart1of6.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart1of6.rtf @@ -111,13 +111,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6161 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6161 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell \pard\intbl\qc\fs18 5 (23.8%) \cell \pard\intbl\qc\fs18 2 (12.5%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -129,13 +129,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3968 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5065 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6161 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7101 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8197 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5065 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6161 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8197 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 32.60 \cell \pard\intbl\qc\fs18 34.00 \cell \pard\intbl\qc\fs18 NA \cell @@ -145,4 +145,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5065 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6161 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8197 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart2of6.rtf b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart2of6.rtf index 8f237102..d6e3fc8d 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart2of6.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart2of6.rtf @@ -111,13 +111,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2865 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3784 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4757 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5892 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6919 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8054 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2865 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3784 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4757 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5892 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6919 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8054 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell \pard\intbl\qc\fs18 7 (21.2%) \cell @@ -129,13 +129,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2865 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3784 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4757 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5892 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6919 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8054 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2865 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3784 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4757 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5892 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6919 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8054 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 34.86 \cell @@ -145,4 +145,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2865 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3784 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4757 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5892 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6919 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8054 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart3of6.rtf b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart3of6.rtf index ab213e32..195ace39 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart3of6.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart3of6.rtf @@ -111,13 +111,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2865 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4000 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5135 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6054 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7027 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8162 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2865 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4000 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5135 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6054 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7027 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8162 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell \pard\intbl\qc\fs18 5 (20.8%) \cell \pard\intbl\qc\fs18 6 (31.6%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -129,13 +129,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2865 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4000 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5135 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6054 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7027 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8162 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2865 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4000 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5135 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6054 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7027 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8162 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 32.80 \cell \pard\intbl\qc\fs18 37.17 \cell \pard\intbl\qc\fs18 NA \cell @@ -145,4 +145,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2865 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4000 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5135 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6054 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7027 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8162 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart4of6.rtf b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart4of6.rtf index 6c571a94..fd3ccd09 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart4of6.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart4of6.rtf @@ -111,13 +111,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2862 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4017 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5008 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6053 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7208 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8199 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2862 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4017 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5008 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6053 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7208 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8199 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell \pard\intbl\qc\fs18 0 (0.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell \pard\intbl\qc\fs18 8 (30.8%) \cell @@ -129,13 +129,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2862 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4017 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5008 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6053 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7208 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8199 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2862 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4017 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5008 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6053 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7208 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8199 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 37.62 \cell @@ -145,4 +145,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2862 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4017 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5008 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6053 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7208 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8199 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart5of6.rtf b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart5of6.rtf index d0746dc7..22b5ef74 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart5of6.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart5of6.rtf @@ -111,13 +111,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2859 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3931 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4901 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5973 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7045 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8117 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2859 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3931 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4901 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5973 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7045 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8117 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell \pard\intbl\qc\fs18 3 (16.7%) \cell \pard\intbl\qc\fs18 7 (35.0%) \cell \pard\intbl\qc\fs18 0 (0.0%) \cell @@ -129,13 +129,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2859 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3931 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4901 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx5973 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7045 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8117 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2859 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3931 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4901 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx5973 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7045 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8117 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 39.33 \cell \pard\intbl\qc\fs18 30.14 \cell \pard\intbl\qc\fs18 NA \cell @@ -145,4 +145,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2859 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3931 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4901 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx5973 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7045 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8117 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart6of6.rtf b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart6of6.rtf index 652e2baf..32d0d345 100755 --- a/tests/testthat/_snaps/tt_to_tblfile/testpagebypart6of6.rtf +++ b/tests/testthat/_snaps/tt_to_tblfile/testpagebypart6of6.rtf @@ -111,13 +111,13 @@ { \trowd -\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4908 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6005 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8093 -\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4908 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6005 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8093 +\clbrdrt\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 \pagebb BLACK OR AFRICAN AMERICAN \cell \pard\intbl\qc\fs18 1 (100.0%) \cell \pard\intbl\qc\fs18 0 (NA%) \cell \pard\intbl\qc\fs18 7 (25.9%) \cell @@ -129,13 +129,13 @@ { \trowd -\trqc \clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx2872 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx3968 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx4908 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx6005 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx7101 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx8093 -\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\brdrs\brdrw18\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell +\trqc \clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx2872 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx3968 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx4908 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx6005 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx7101 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx8093 +\clbrdrt\clbrdrl\clbrdrb\brdrs\brdrw18\brdrcf1\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs18 \intbl\li87\fi-87 Mean \cell \pard\intbl\qc\fs18 37.00 \cell \pard\intbl\qc\fs18 NA \cell \pard\intbl\qc\fs18 34.00 \cell @@ -145,4 +145,22 @@ \row } +{ +\trowd +\trqc \clmgf\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx2872 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx3968 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx4908 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx6005 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx7101 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx8093 +\clmrg\clbrdrt\brdrs\brdrw18\brdrcf1\clbrdrl\clbrdrb\clbrdrr\clvertalb\cellx9189 \pard\intbl\ql\fs16 \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\pard\intbl\qc \cell +\row +} + } \ No newline at end of file diff --git a/tests/testthat/helper_rbmi.R b/tests/testthat/helper_rbmi.R new file mode 100644 index 00000000..7c99cad9 --- /dev/null +++ b/tests/testthat/helper_rbmi.R @@ -0,0 +1,75 @@ +# Used in test-pool_rbmi.R ---- +rbmi_as_analysis <- function( + results, + method, + delta = NULL, + fun = NULL, + fun_name = NULL +) { + next_class <- switch(class(method)[[2]], + bayes = "rubin", + approxbayes = "rubin", + condmean = ifelse(method$type == "jackknife", "jackknife", "bootstrap"), + bmlmi = "bmlmi" + ) + assert_that( + is.list(results), + length(next_class) == 1, + is.character(next_class), + next_class %in% c("jackknife", "bootstrap", "rubin", "bmlmi") + ) + x <- list( + results = rbmi::as_class(results, c(next_class, "list")), + delta = delta, + fun = fun, + fun_name = fun_name, + method = method + ) + class(x) <- c("analysis", "list") + rbmi::validate(x) + return(x) +} + +# Used in test-rbmi.R ---- + +set_col_names <- function(x, nam) { + colnames(x) <- nam + return(x) +} + +f2n <- function(x) as.numeric(x) - 1 + +get_sim_data <- function(n, sigma, trt = 4) { + nv <- ncol(sigma) + covars <- tibble::tibble( + id = 1:n, + age = rnorm(n), + group = factor( + sample(c("A", "B"), size = n, replace = TRUE), + levels = c("A", "B") + ), + sex = factor( + sample(c("M", "F"), size = n, replace = TRUE), + levels = c("M", "F") + ) + ) + + dat <- mvtnorm::rmvnorm(n, sigma = sigma) |> + set_col_names(paste0("visit_", 1:nv)) |> + dplyr::as_tibble() |> + dplyr::mutate(id = seq_len(dplyr::n())) |> + tidyr::gather("visit", "outcome", -id) |> + dplyr::mutate(visit = factor(.data$visit)) |> + dplyr::arrange(id, .data$visit) |> + dplyr::left_join(covars, by = "id") |> + dplyr::mutate( + outcome = .data$outcome + + 5 + + 3 * .data$age + + 3 * f2n(.data$sex) + + trt * f2n(.data$group) + ) |> + dplyr::mutate(id = as.factor(id)) + + return(dat) +} diff --git a/tests/testthat/sas_comparison/relative_risk.R b/tests/testthat/sas_comparison/relative_risk.R index 90f1a98a..35be3446 100644 --- a/tests/testthat/sas_comparison/relative_risk.R +++ b/tests/testthat/sas_comparison/relative_risk.R @@ -261,7 +261,7 @@ dat <- data.frame( )) ) -lyt <- basic_table() |> +lyt <- basic_table(round_type = "sas") |> split_cols_by("Treatment", ref_group = "B") |> analyze( vars = "Response", diff --git a/tests/testthat/test-a_freq_j.R b/tests/testthat/test-a_freq_j.R new file mode 100644 index 00000000..6493f191 --- /dev/null +++ b/tests/testthat/test-a_freq_j.R @@ -0,0 +1,126 @@ +test_that("a_freq_j with label_map works in a table layout as expected", { + set.seed(12) + dta <- data.frame( + id = 1:100, + rsp = factor(sample(c(TRUE, FALSE), 100, TRUE)), + grp = factor(rep(c("A", "B"), each = 50), levels = c("A", "B")) + ) + label_map <- data.frame( + value = c("TRUE", "FALSE"), + label = c("Response", "No Response") + ) + lyt <- basic_table() |> + split_cols_by("grp") |> + analyze( + "rsp", + afun = a_freq_j, + extra_args = list( + label_map = label_map, + id = "id" + ) + ) + result <- build_table(lyt, dta) + expect_snapshot(result) +}) + +test_that("a_freq_j with label_map restricts the values according to row split and label_map", { + set.seed(12) + dta <- data.frame( + id = 1:100, + visit = factor(rep(c("Baseline", "Week 1"), length.out = 100)), + rsp = factor(sample(c("a", "b", "c", "d"), 100, TRUE)), + grp = factor(rep(c("A", "B"), each = 50), levels = c("A", "B")) + ) + label_map <- data.frame( + visit = rep(c("Baseline", "Week 1"), each = 2), + value = c("a", "b", "c", "d"), + label = c("Response A", "Response B", "Response C", "Response D") + ) + lyt <- basic_table() |> + split_cols_by("grp") |> + split_rows_by("visit") |> + analyze( + "rsp", + afun = a_freq_j, + extra_args = list( + label_map = label_map, + id = "id" + ) + ) + result <- build_table(lyt, dta) + expect_snapshot(result) +}) + +test_that("a_freq_j_with_exclude allows to exclude row split levels from the analysis", { + set.seed(12) + dta <- data.frame( + id = 1:100, + visit = factor(rep(c("Baseline", "Week 1"), length.out = 100)), + rsp = factor(sample(c("a", "b", "c", "d"), 100, TRUE)), + grp = factor(rep(c("A", "B"), each = 50), levels = c("A", "B")) + ) + label_map <- data.frame( + visit = rep(c("Baseline", "Week 1"), each = 2), + value = c("a", "b", "c", "d"), + label = c("Response A", "Response B", "Response C", "Response D") + ) + lyt <- basic_table() |> + split_cols_by("grp") |> + split_rows_by("visit") |> + analyze( + "rsp", + afun = a_freq_j_with_exclude, + extra_args = list( + label_map = label_map, + exclude_levels = list(visit = "Week 1"), + id = "id" + ) + ) + result <- build_table(lyt, dta) |> + safe_prune_table(prune_func = tern::keep_rows(keep_non_null_rows)) + expect_snapshot(result) +}) + +test_that("a_freq_j in specific situation error for not passing alt_counts_df", { + library(dplyr) + trtvar <- "ARM" + ctrl_grp <- "B: Placebo" + + adsl <- ex_adsl |> select(c("USUBJID", "STRATA1", "EOSSTT", all_of(trtvar))) + adsl$colspan_trt <- factor( + ifelse(adsl[[trtvar]] == ctrl_grp, " ", "Active Study Agent"), + levels = c("Active Study Agent", " ") + ) + adsl$rrisk_header <- "Risk Difference (%) (95% CI)" + adsl$rrisk_label <- paste(adsl[[trtvar]], paste("vs", ctrl_grp)) + + colspan_trt_map <- create_colspan_map( + df = adsl, + non_active_grp = ctrl_grp, + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = trtvar + ) + + a_freq_j_args <- list( + .stats = "count_unique_fraction", + ref_path = c("colspan_trt", " ", trtvar, ctrl_grp) + ) + + lyt <- basic_table(show_colcounts = TRUE) |> + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> + split_cols_by(trtvar) |> + split_cols_by("rrisk_header", nested = FALSE) |> + split_cols_by(trtvar, labels_var = "rrisk_label", split_fun = remove_split_levels(ctrl_grp)) |> + split_rows_by("STRATA1") |> + analyze("EOSSTT", afun = a_freq_j, extra_args = a_freq_j_args) + + expect_error( + build_table(lyt, adsl), + "In order to get correct numbers in relative risk column" + ) + + result <- build_table(lyt, adsl, alt_counts_df = adsl) + expect_snapshot(result) +}) diff --git a/tests/testthat/test-a_freq_resp_var_j.R b/tests/testthat/test-a_freq_resp_var_j.R index ee5d3e12..5c7e6754 100644 --- a/tests/testthat/test-a_freq_resp_var_j.R +++ b/tests/testthat/test-a_freq_resp_var_j.R @@ -1,6 +1,6 @@ library(testthat) library(rtables) -library(dplyr) +suppressMessages(library(dplyr)) # Create test datasets based on patterns in other test files test_that("a_freq_resp_var_j works as expected with basic usage", { @@ -16,8 +16,8 @@ test_that("a_freq_resp_var_j works as expected with basic usage", { ) # Create the layout based on patterns seen in test-varia.R - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( "SEX", afun = a_freq_resp_var_j, @@ -54,8 +54,8 @@ test_that("a_freq_resp_var_j works with factor responses", { ) # Create the layout - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( "SEX", afun = a_freq_resp_var_j, @@ -86,8 +86,8 @@ test_that("a_freq_resp_var_j handles missing values correctly", { adrs$SEX[6:10] <- NA # Create the layout - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( "SEX", afun = a_freq_resp_var_j, @@ -117,8 +117,8 @@ test_that("a_freq_resp_var_j errors on invalid responses", { adrs$RSP[1:3] <- "MAYBE" # Create the layout - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( "SEX", afun = a_freq_resp_var_j, @@ -148,8 +148,8 @@ test_that("a_freq_resp_var_j errors when resp_var is null", { ) # Create layout with missing resp_var - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( "SEX", afun = a_freq_resp_var_j @@ -178,8 +178,8 @@ test_that("a_freq_resp_var_j works with drop_levels parameter", { ) # Create layout with drop_levels = TRUE - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( "SEX", afun = a_freq_resp_var_j, @@ -193,3 +193,35 @@ test_that("a_freq_resp_var_j works with drop_levels parameter", { # Should not throw an error expect_no_error(build_table(lyt, adrs)) }) + +test_that("a_freq_resp_var_j works with riskdiff parameter", { + # Create test data with factors + adsl <- ex_adsl + adrs <- data.frame( + USUBJID = rep(adsl$USUBJID[1:20], each = 2), + AVISIT = rep(c("WEEK 1", "WEEK 2"), times = 20), + ARM = rep(adsl$ARM[1:20], each = 2), + COUNTRY = rep(adsl$COUNTRY[1:20], each = 2), + SEX = factor( + rep(adsl$SEX[1:20], each = 2), + levels = c("F", "M", "U", "OTHER") + ), + RSP = sample(c("Y", "N"), size = 40, replace = TRUE, prob = c(0.3, 0.7)) + ) + + # Create layout with drop_levels = TRUE + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> + analyze( + "SEX", + afun = a_freq_resp_var_j, + extra_args = list( + resp_var = "RSP", + drop_levels = TRUE, + ref_path = c("ARM", "B: Placebo") + ) + ) + + # Should not throw an error + expect_no_error(build_table(lyt, adrs)) +}) diff --git a/tests/testthat/test-a_maxlev.R b/tests/testthat/test-a_maxlev.R new file mode 100644 index 00000000..e1e53f8d --- /dev/null +++ b/tests/testthat/test-a_maxlev.R @@ -0,0 +1,198 @@ +aesevall_spf <- make_combo_splitfun( + nm = "AESEV_ALL", + label = "Any AE", + levels = NULL, +) + +# Start of tests ---- + +test_that("a_maxlev produces correct numbers for single treatment per subject", { + my_adsl <- ex_adsl[, c("USUBJID", "ARM", "ACTARM")] + my_adae <- ex_adae[, c("USUBJID", "ARM", "ACTARM", "AESEV")] + + my_adae <- my_adae |> + mutate(AESEV := string_to_title(AESEV)) |> + mutate( + AESEV := ordered(AESEV, levels = c("Missing", "Mild", "Moderate", "Severe")) + ) + + lyt <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + add_overall_col("Total") |> + split_rows_by("AESEV", split_fun = aesevall_spf) |> + summarize_row_groups( + "AESEV", + cfun = a_maxlev, extra_args = list(any_level = TRUE) + ) |> + analyze("AESEV", afun = a_maxlev) + + res <- expect_silent(build_table(lyt, my_adae, alt_counts_df = my_adsl)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "Any AE", "Missing", "Mild", "Moderate", "Severe", + "A: Drug X", "122 (91.0%)", "0", "7 (5.2%)", "24 (17.9%)", "91 (67.9%)", + "B: Placebo", "123 (91.8%)", "0", "9 (6.7%)", "24 (17.9%)", "90 (67.2%)", + "C: Combination", "120 (90.9%)", "0", "4 (3.0%)", "23 (17.4%)", "93 (70.5%)", + "Total", "365 (91.3%)", "0", "20 (5.0%)", "71 (17.8%)", "274 (68.5%)" + ), + dim = 6:5 + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_maxlev produces correct numbers for sequence of treatments (missing values)", { + treatments <- factor(c("a", "b", "c")) + ae_severities <- c("Missing", "Mild", "Moderate", "Severe") + ae_severities <- ordered(ae_severities, levels = ae_severities) + my_adae <- data.frame( + ID = c(1, 1, 1, 2, 2, 3, 3, 3, 3, 4), + TRT = factor(c("a", "b", "b", "b", "c", "c", "a", "c", "b", "b")), + AESEV = ae_severities[c(4L, 1L, 2L, 1L, 2L, 1L, 2L, 3L, 1L, 2L)] + ) + my_adsl <- data.frame( + ID = rep(1:5, each = 3), + TRT = factor(rep(c("a", "b", "c"), times = 5)) + ) + + lyt <- basic_table() |> + split_cols_by("TRT") |> + add_overall_col("Total") |> + split_rows_by("AESEV", split_fun = aesevall_spf) |> + summarize_row_groups( + "AESEV", + cfun = a_maxlev, + extra_args = list(id = "ID", any_level = TRUE) + ) |> + analyze( + "AESEV", + afun = a_maxlev, + extra_args = list(id = "ID") + ) + + res <- expect_silent(build_table(lyt, my_adae, alt_counts_df = my_adsl)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "Any AE", "Missing", "Mild", "Moderate", "Severe", + "a", "2 (40.0%)", "0", "1 (20.0%)", "0", "1 (20.0%)", + "b", "2 (40.0%)", "2 (40.0%)", "2 (40.0%)", "0", "0", + "c", "2 (40.0%)", "0", "1 (20.0%)", "1 (20.0%)", "0", + "Total", "4 (80.0%)", "0", "2 (40.0%)", "1 (20.0%)", "1 (20.0%)" + ), + dim = 6:5 + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_maxlev produces correct numbers for sequence of treatments (all values are missing for one treatement)", { + treatments <- factor(c("a", "b", "c")) + ae_severities <- c("Missing", "Mild", "Moderate", "Severe") + ae_severities <- ordered(ae_severities, levels = ae_severities) + my_adae <- data.frame( + ID = c(rep(1L, 3L), rep(2L, 7L)), + TRT = factor(c("a", "b", "b", rep("c", 7L))), + AESEV = ae_severities[c(2L, 2L, 3L, rep(1L, 7L))] + ) + my_adsl <- data.frame( + ID = rep(1:3, each = 3), + TRT = factor(rep(c("a", "b", "c"), times = 3)) + ) + + lyt <- basic_table() |> + split_cols_by("TRT") |> + add_overall_col("Total") |> + split_rows_by("AESEV", split_fun = aesevall_spf) |> + summarize_row_groups( + "AESEV", + cfun = a_maxlev, + extra_args = list(id = "ID", any_level = TRUE) + ) |> + analyze( + "AESEV", + afun = a_maxlev, + extra_args = list(id = "ID") + ) + + res <- expect_silent(build_table(lyt, my_adae, alt_counts_df = my_adsl)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "Any AE", "Missing", "Mild", "Moderate", "Severe", + "a", "1 (33.3%)", "0", "1 (33.3%)", "0", "0", + "b", "1 (33.3%)", "0", "0", "1 (33.3%)", "0", + "c", "0", "1 (33.3%)", "0", "0", "0", + "Total", "1 (33.3%)", "1 (33.3%)", "0", "1 (33.3%)", "0" + ), + dim = 6:5 + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_maxlev produces correct numbers when any_level is active for custom level excl.)", { + treatments <- factor(c("a", "b", "c")) + ae_severities <- c("Missing", "Mild", "Moderate", "Severe") + ae_severities <- ordered(ae_severities, levels = ae_severities) + my_adae <- data.frame( + ID = c(rep(1L, 3L), rep(2L, 7L)), + TRT = factor(c("a", "b", "b", rep("c", 7L))), + AESEV = ae_severities[c(2L, 2L, 3L, rep(1L, 7L))] + ) + my_adsl <- data.frame( + ID = rep(1:3, each = 3), + TRT = factor(rep(c("a", "b", "c"), times = 3)) + ) + + lyt <- basic_table() |> + split_cols_by("TRT") |> + add_overall_col("Total") |> + split_rows_by("AESEV", split_fun = aesevall_spf) |> + summarize_row_groups( + "AESEV", + cfun = a_maxlev, + extra_args = list(id = "ID", any_level = TRUE, any_level_exclude = "Mild") + ) + + res <- expect_silent(build_table(lyt, my_adae, alt_counts_df = my_adsl)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c("", "Any AE", "a", "0", "b", "1 (33.3%)", "c", "1 (33.3%)", "Total", "2 (66.7%)"), + dim = c(2L, 5L) + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_maxlev throws an error for not ordered variable", { + treatments <- factor(c("a", "b", "c")) + ae_severities <- c("Missing", "MILD", "Moderate", "Severe") + ae_severities <- factor(ae_severities, levels = ae_severities) + my_adae <- data.frame( + ID = c(1, 1, 1, 2, 2), + TRT = factor(c("a", "b", "b", "c", "c")), + AESEV = ae_severities[c(2L, 2L, 3L, 1L, 1)] + ) + my_adsl <- data.frame( + ID = rep(1:5, each = 3), + TRT = factor(rep(c("a", "b", "c"), times = 5)) + ) + + lyt <- basic_table() |> + split_cols_by("TRT") |> + add_overall_col("Total") |> + split_rows_by("AESEV", split_fun = aesevall_spf) |> + summarize_row_groups( + "AESEV", + cfun = a_maxlev, + extra_args = list(id = "ID", any_level = TRUE) + ) |> + analyze( + "AESEV", + afun = a_maxlev, + extra_args = list(id = "ID") + ) + + res <- expect_error( + build_table(lyt, my_adae, alt_counts_df = my_adsl), + regexp = "*.var.*.[Mm]ust be an ordered factor*." + ) +}) diff --git a/tests/testthat/test-a_summarize_aval_chg_diff.R b/tests/testthat/test-a_summarize_aval_chg_diff.R index 7ac3c0d4..e6c36156 100644 --- a/tests/testthat/test-a_summarize_aval_chg_diff.R +++ b/tests/testthat/test-a_summarize_aval_chg_diff.R @@ -5,9 +5,9 @@ library(tern) test_that("a_summarize_aval_chg_diff_j comp_btw_group = FALSE works as expected", { adsl <- ex_adsl - advs <- ex_advs %>% - filter(PARAMCD %in% c("DIABP", "PULSE")) %>% - filter(AVISIT %in% c("BASELINE", "WEEK 1 DAY 8", "WEEK 2 DAY 15")) %>% + advs <- ex_advs |> + filter(PARAMCD %in% c("DIABP", "PULSE")) |> + filter(AVISIT %in% c("BASELINE", "WEEK 1 DAY 8", "WEEK 2 DAY 15")) |> mutate( PARAMCD = droplevels(PARAMCD), AVISIT = droplevels(AVISIT) @@ -23,13 +23,13 @@ test_that("a_summarize_aval_chg_diff_j comp_btw_group = FALSE works as expected" ) - lyt <- basic_table() %>% - split_cols_by("ARM") %>% - split_rows_by("PARAMCD") %>% - split_rows_by("AVISIT", child_labels = "hidden") %>% + lyt <- basic_table() |> + split_cols_by("ARM") |> + split_rows_by("PARAMCD") |> + split_rows_by("AVISIT", child_labels = "hidden") |> split_cols_by_multivar(multivars, varlabels = c("n/N (%)", "Mean (95% CI)", "Mean Change From Baseline (95% CI)") - ) %>% + ) |> analyze("STUDYID", afun = a_summarize_aval_chg_diff_j, extra_args = extra_args_3col) tbl <- expect_silent(build_table(lyt, advs, alt_counts_df = adsl)) @@ -45,13 +45,13 @@ test_that("a_summarize_aval_chg_diff_j comp_btw_group = FALSE works as expected" ) - lyt2 <- basic_table() %>% - split_cols_by("ARM") %>% - split_rows_by("PARAMCD") %>% - split_rows_by("AVISIT", child_labels = "hidden") %>% + lyt2 <- basic_table() |> + split_cols_by("ARM") |> + split_rows_by("PARAMCD") |> + split_rows_by("AVISIT", child_labels = "hidden") |> split_cols_by_multivar(multivars, varlabels = c("n/N (%)", "Mean (95% CI)", "Mean Change From Baseline (95% CI)") - ) %>% + ) |> analyze("STUDYID", afun = a_summarize_aval_chg_diff_j, extra_args = extra_args_3col2) tbl2 <- build_table(lyt2, advs, alt_counts_df = adsl) @@ -63,8 +63,8 @@ test_that("a_summarize_aval_chg_diff_j t-test sparse data works as expected", { ctrl_grp <- "B: Placebo" trtvar <- "ARM" - adsl <- ex_adsl %>% - select(STUDYID, USUBJID, ARM) %>% + adsl <- ex_adsl |> + select(STUDYID, USUBJID, ARM) |> mutate( colspan_trt = factor(ifelse(ARM == ctrl_grp, " ", "Active treatment"), levels = c(" ", "Active treatment") @@ -73,32 +73,32 @@ test_that("a_summarize_aval_chg_diff_j t-test sparse data works as expected", { rrisk_label = paste0(ARM, " vs ", ctrl_grp) ) - advs <- ex_advs %>% - filter(PARAMCD %in% c("DIABP", "PULSE")) %>% - filter(AVISIT %in% c("BASELINE", "WEEK 1 DAY 8", "WEEK 2 DAY 15")) %>% + advs <- ex_advs |> + filter(PARAMCD %in% c("DIABP", "PULSE")) |> + filter(AVISIT %in% c("BASELINE", "WEEK 1 DAY 8", "WEEK 2 DAY 15")) |> mutate( PARAMCD = droplevels(PARAMCD), AVISIT = droplevels(AVISIT) ) - advs <- advs %>% + advs <- advs |> inner_join(adsl) # introduce sparse data for DIABP at WEEK 1 DAY 8 # keep 2 records in A: Drug X, and 2 records in B: Placebo with values c(50, 50) and c(45, 45) - select_sub <- adsl %>% - group_by(ARM) %>% - slice_head(n = 2) %>% - ungroup() %>% + select_sub <- adsl |> + group_by(ARM) |> + slice_head(n = 2) |> + ungroup() |> pull(USUBJID) - advs_2 <- advs %>% + advs_2 <- advs |> mutate(AVAL = case_when( PARAMCD == "DIABP" & AVISIT == "WEEK 1 DAY 8" & !(USUBJID %in% select_sub) ~ NA_real_, PARAMCD == "DIABP" & AVISIT == "WEEK 1 DAY 8" & (USUBJID %in% select_sub) & ARM == "A: Drug X" ~ 50, PARAMCD == "DIABP" & AVISIT == "WEEK 1 DAY 8" & (USUBJID %in% select_sub) & ARM == "B: Placebo" ~ 45, TRUE ~ AVAL - )) %>% + )) |> mutate(CHG = case_when( PARAMCD == "DIABP" & AVISIT == "WEEK 1 DAY 8" & !(USUBJID %in% select_sub) ~ NA_real_, PARAMCD == "DIABP" & AVISIT == "WEEK 1 DAY 8" & (USUBJID %in% select_sub) & ARM == "A: Drug X" ~ -5, @@ -125,21 +125,21 @@ test_that("a_summarize_aval_chg_diff_j t-test sparse data works as expected", { ) - lyt <- basic_table() %>% - split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) %>% - split_cols_by("ARM", show_colcounts = TRUE) %>% - split_rows_by("PARAMCD") %>% - split_rows_by("AVISIT", child_labels = "hidden") %>% + lyt <- basic_table() |> + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> + split_cols_by("ARM", show_colcounts = TRUE) |> + split_rows_by("PARAMCD") |> + split_rows_by("AVISIT", child_labels = "hidden") |> split_cols_by_multivar(multivars, varlabels = c("n/N (%)", "Mean (95% CI)", "Mean Change From Baseline (95% CI)") - ) %>% - split_cols_by("rrisk_header", nested = FALSE) %>% + ) |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by("ARM", split_fun = remove_split_levels(ctrl_grp), labels_var = "rrisk_label", show_colcounts = FALSE - ) %>% + ) |> ### difference columns : just 1 column & analysis needs to be done on change - split_cols_by_multivar(multivars[3], varlabels = c(" ")) %>% + split_cols_by_multivar(multivars[3], varlabels = c(" ")) |> analyze("STUDYID", afun = a_summarize_aval_chg_diff_j, extra_args = extra_args_3col) tbl <- build_table(lyt, advs, alt_counts_df = adsl) @@ -209,7 +209,7 @@ test_that("a_summarize_aval_chg_diff_j works as expected", { CHG = c(2, 3, -1, 9, -2, 0, 6, -2, 5, 2) ) - ADEG <- ADEG %>% + ADEG <- ADEG |> mutate( TRT01A = as.factor(TRT01A), STUDYID = as.factor(STUDYID) @@ -246,40 +246,40 @@ test_that("a_summarize_aval_chg_diff_j works as expected", { ref_path <- c("colspan_trt", " ", "TRT01A", "Placebo") - lyt <- basic_table() %>% + lyt <- basic_table(round_type = "sas") |> ### first columns split_cols_by( "colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map) - ) %>% - split_cols_by("TRT01A") %>% + ) |> + split_cols_by("TRT01A") |> split_rows_by( "PARAM", label_pos = "topleft", split_label = "Blood Pressure", section_div = " ", split_fun = drop_split_levels - ) %>% + ) |> split_rows_by( "AVISIT", label_pos = "topleft", split_label = "Study Visit", split_fun = drop_split_levels, child_labels = "hidden" - ) %>% + ) |> ## set up a 3 column split split_cols_by_multivar( c("AVAL", "AVAL", "CHG"), varlabels = c("n/N (%)", "Mean (CI)", "CFB (CI)") - ) %>% - split_cols_by("rrisk_header", nested = FALSE) %>% + ) |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by( "TRT01A", split_fun = remove_split_levels("Placebo"), labels_var = "rrisk_label" - ) %>% + ) |> ### difference columns : just 1 column & analysis needs to be done on change - split_cols_by_multivar(c("CHG"), varlabels = c(" ")) %>% + split_cols_by_multivar(c("CHG"), varlabels = c(" ")) |> ### the variable passed here in analyze is not used (STUDYID), it is a dummy var passing, ### the function a_summarize_aval_chg_diff_j grabs the required vars from cols_by_multivar calls analyze( @@ -359,7 +359,7 @@ test_that("a_summarize_aval_chg_diff_j works with ancova = TRUE", { CHG = c(2, 3, -1, 9, -2, 0, 6, -2, 5, 2) ) - ADEG <- ADEG %>% + ADEG <- ADEG |> mutate( TRT01A = as.factor(TRT01A), STUDYID = as.factor(STUDYID) @@ -382,40 +382,40 @@ test_that("a_summarize_aval_chg_diff_j works with ancova = TRUE", { ) ref_path <- c("colspan_trt", " ", "TRT01A", "Placebo") - lyt <- basic_table() %>% + lyt <- basic_table(round_type = "sas") |> ### first columns split_cols_by( "colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map) - ) %>% - split_cols_by("TRT01A") %>% + ) |> + split_cols_by("TRT01A") |> split_rows_by( "PARAM", label_pos = "topleft", split_label = "Blood Pressure", section_div = " ", split_fun = drop_split_levels - ) %>% + ) |> split_rows_by( "AVISIT", label_pos = "topleft", split_label = "Study Visit", split_fun = drop_split_levels, child_labels = "hidden" - ) %>% + ) |> ## set up a 3 column split split_cols_by_multivar( c("AVAL", "AVAL", "CHG"), varlabels = c("n/N (%)", "Mean (CI)", "CFB (CI)") - ) %>% - split_cols_by("rrisk_header", nested = FALSE) %>% + ) |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by( "TRT01A", split_fun = remove_split_levels("Placebo"), labels_var = "rrisk_label" - ) %>% + ) |> ### difference columns : just 1 column & analysis needs to be done on change - split_cols_by_multivar(c("CHG"), varlabels = c(" ")) %>% + split_cols_by_multivar(c("CHG"), varlabels = c(" ")) |> ### the variable passed here in analyze is not used (STUDYID), it is a dummy var passing, ### the function a_summarize_aval_chg_diff_j grabs the required vars from cols_by_multivar calls analyze( diff --git a/tests/testthat/test-a_two_tier.R b/tests/testthat/test-a_two_tier.R new file mode 100644 index 00000000..7572b2e4 --- /dev/null +++ b/tests/testthat/test-a_two_tier.R @@ -0,0 +1,232 @@ +n <- 36 +set.seed(1) +data <- data.frame( + trt = factor(sample(c("A", "B", "C"), n, replace = TRUE)), + eostt = factor(sample(c("COMPLETED", "DISCONTINUED", "ONGOING"), n, replace = TRUE)), + dcsreas = factor(sample(c("ADVERSE EVENT", "LACK OF EFFICACY", "PHYSICIAN DECISION"), n, replace = TRUE)) +) + +# Start of tests ---- + +test_that("a_two_tier works silently for ex_adsl data with simple_analysis", { + lyt <- basic_table() |> + split_cols_by("ARM") |> + split_rows_by("EOSSTT", child_labels = "hidden") |> + analyze("EOSSTT", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "DCSREAS", + drill_down_levs = "DISCONTINUED" + ) + ) + + expect_silent(build_table(lyt, ex_adsl)) +}) + +test_that("a_two_tier works in a table layout as expected", { + lyt <- basic_table() |> + split_cols_by("trt") |> + split_rows_by("eostt", child_labels = "hidden") |> + analyze("eostt", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "dcsreas", + drill_down_levs = "DISCONTINUED" + ) + ) + res <- expect_silent(build_table(lyt, data)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "COMPLETED", "DISCONTINUED", "ADVERSE EVENT", "LACK OF EFFICACY", "PHYSICIAN DECISION", "ONGOING", + "A", "3", "9", "3", "4", "2", "3", + "B", "2", "5", "2", "0", "3", "5", + "C", "3", "3", "0", "2", "1", "3" + ), + dim = c(7, 4) + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_two_tier produces the expected table layout when a level has no observations", { + lyt <- basic_table() |> + split_cols_by("trt") |> + split_rows_by("eostt", child_labels = "hidden") |> + analyze("eostt", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "dcsreas", + drill_down_levs = "DISCONTINUED" + ) + ) + + data_subset <- subset(data, dcsreas != "ADVERSE EVENT") + + res <- expect_silent(build_table(lyt, data_subset)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "COMPLETED", "DISCONTINUED", "LACK OF EFFICACY", "PHYSICIAN DECISION", "ONGOING", + "A", "3", "6", "4", "2", "2", + "B", "1", "3", "0", "3", "4", + "C", "1", "3", "2", "1", "2" + ), + dim = c(6, 4) + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_two_tier produces the expected table layout when a level has no observations (use_all_levels)", { + lyt <- basic_table() |> + split_cols_by("trt") |> + split_rows_by("eostt", child_labels = "hidden") |> + analyze("eostt", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "dcsreas", + drill_down_levs = "DISCONTINUED", + use_all_levels = TRUE + ) + ) + + data_subset <- subset(data, dcsreas != "ADVERSE EVENT") + + res <- expect_silent(build_table(lyt, data_subset)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "COMPLETED", "DISCONTINUED", "ADVERSE EVENT", "LACK OF EFFICACY", "PHYSICIAN DECISION", "ONGOING", + "A", "3", "6", "0", "4", "2", "2", + "B", "1", "3", "0", "0", "3", "4", + "C", "1", "3", "0", "2", "1", "2" + ), + dim = c(7, 4) + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_two_tier produces the expected table layout when there are no observations for any level", { + lyt <- basic_table() |> + split_cols_by("trt") |> + split_rows_by("eostt", child_labels = "hidden") |> + analyze("eostt", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "dcsreas", + drill_down_levs = "DISCONTINUED" + ) + ) + + data_subset <- subset(data, eostt != "DISCONTINUED") + + res <- expect_silent(build_table(lyt, data_subset)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "COMPLETED", "DISCONTINUED", "ONGOING", + "A", "3", "0", "3", + "B", "2", "0", "5", + "C", "3", "0", "3" + ), + dim = c(4, 4) + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_two_tier produces the expected table layout - no observations at any level (use_all_levels)", { + lyt <- basic_table() |> + split_cols_by("trt") |> + split_rows_by("eostt", child_labels = "hidden") |> + analyze("eostt", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "dcsreas", + drill_down_levs = "DISCONTINUED", + use_all_levels = TRUE + ) + ) + + data_subset <- subset(data, eostt != "DISCONTINUED") + + res <- expect_silent(build_table(lyt, data_subset)) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "COMPLETED", "DISCONTINUED", "ONGOING", + "A", "3", "0", "3", + "B", "2", "0", "5", + "C", "3", "0", "3" + ), + dim = c(4, 4) + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_two_tier produces the expected table layout when there is no data at all - only levels", { + lyt <- basic_table() |> + split_cols_by("trt") |> + split_rows_by("eostt", child_labels = "hidden") |> + analyze("eostt", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "dcsreas", + drill_down_levs = "DISCONTINUED" + ) + ) + + res <- expect_silent(build_table(lyt, data[0, ])) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "COMPLETED", "DISCONTINUED", "ONGOING", + "A", "0", "0", "0", + "B", "0", "0", "0", + "C", "0", "0", "0" + ), + dim = c(4, 4) + ) + expect_identical(res_act, res_exp) +}) + +test_that("a_two_tier produces the expected table layout when there is no data at all - only levels (use_all_levels)", { + lyt <- basic_table() |> + split_cols_by("trt") |> + split_rows_by("eostt", child_labels = "hidden") |> + analyze("eostt", + afun = a_two_tier, + extra_args = list( + grp_fun = simple_analysis, + detail_fun = simple_analysis, + inner_var = "dcsreas", + drill_down_levs = "DISCONTINUED", + use_all_levels = TRUE + ) + ) + + res <- expect_silent(build_table(lyt, data[0, ])) + res_act <- matrix_form(res)$string + res_exp <- structure( + c( + "", "COMPLETED", "DISCONTINUED", "ONGOING", + "A", "0", "0", "0", + "B", "0", "0", "0", + "C", "0", "0", "0" + ), + dim = c(4, 4) + ) + expect_identical(res_act, res_exp) +}) diff --git a/tests/testthat/test-analyze_values.R b/tests/testthat/test-analyze_values.R index d6232cab..57012b63 100644 --- a/tests/testthat/test-analyze_values.R +++ b/tests/testthat/test-analyze_values.R @@ -2,7 +2,7 @@ library(rtables) test_that("analyze_values correctly modifies layout with proper formats", { # Create a simple layout - lyt <- basic_table() %>% + lyt <- basic_table(round_type = "sas") |> split_cols_by("ARM") # Define variables to analyze diff --git a/tests/testthat/test-ancova.R b/tests/testthat/test-ancova.R index 288c891e..3ca275c3 100644 --- a/tests/testthat/test-ancova.R +++ b/tests/testthat/test-ancova.R @@ -1,4 +1,4 @@ -library(emmeans) +suppressMessages(library(emmeans)) library(mmrm) test_that("fit_ancova works as expected", { diff --git a/tests/testthat/test-ancova_rbmi.R b/tests/testthat/test-ancova_rbmi.R index 8f38866d..5e92228c 100644 --- a/tests/testthat/test-ancova_rbmi.R +++ b/tests/testthat/test-ancova_rbmi.R @@ -1,6 +1,12 @@ library(tibble) library(dplyr) +if (requireNamespace("rbmi", quietly = TRUE)) { + suppressPackageStartupMessages(library(rbmi)) +} else { + skip("rbmi package not available") +} + f2n <- function(x) as.numeric(x) - 1 test_that("rbmi_ancova_single works also with multiple treatment arms", { diff --git a/tests/testthat/test-blank_line.R b/tests/testthat/test-blank_line.R index 190e7ea9..cfa64847 100644 --- a/tests/testthat/test-blank_line.R +++ b/tests/testthat/test-blank_line.R @@ -1,7 +1,7 @@ test_that("insert_blank_line works as expected", { ADSL <- ex_adsl - lyt <- basic_table() |> + lyt <- basic_table(round_type = "sas") |> split_cols_by("ARM") |> split_rows_by("STRATA1") |> analyze(vars = "AGE", afun = function(x) { @@ -34,7 +34,7 @@ test_that("insert_blank_line works as expected", { test_that("insert_blank_line optionally uses custom table names", { ADSL <- ex_adsl - lyt <- basic_table() |> + lyt <- basic_table(round_type = "sas") |> split_cols_by("ARM") |> split_rows_by("STRATA1") |> analyze(vars = "AGE", afun = function(x) { @@ -64,7 +64,7 @@ test_that("insert_blank_line optionally uses custom table names", { tbl_string <- mf_strings(matrix_form(tbl)) tbl_row_paths <- row_paths(tbl) for (row in c(5, 8, 14, 17, 23, 26)) { - expect_identical(tbl_string[row, ], rep("", length = 4)) + expect_identical(tbl_string[row, ], rep("", length.out = 4)) } for (row in c(4, 13, 22)) { checkmate::expect_subset("Gap1", tbl_row_paths[[row]]) diff --git a/tests/testthat/test-cmhrms.R b/tests/testthat/test-cmhrms.R new file mode 100644 index 00000000..b44ef684 --- /dev/null +++ b/tests/testthat/test-cmhrms.R @@ -0,0 +1,111 @@ + +test_that("s_cmhrms_j works as expected with and without strata", { + set.seed(12) + nobs <- 100 + dta <- data.frame( + rsp = c(rep(FALSE, nobs / 2), rep(TRUE, nobs / 2)), + grp = factor(sample(c("A", "B"), nobs, TRUE), levels = c("A", "B")), + strata = factor(sample(c("C", "D"), nobs, TRUE)) + ) + + result_strata <- s_cmhrms_j( + df = subset(dta, grp == "B"), + .df_row = dta, + .var = "rsp", + .ref_group = subset(dta, grp == "A"), + .in_ref_col = FALSE, + variables = list(arm = "grp", strata = "strata") + ) + expected_strata <- list(pval = formatters::with_label(0.5241419, "p-value")) + expect_equal(result_strata, expected_strata, tolerance = 1e-6) + + result_no_strata <- expect_silent(s_cmhrms_j( + df = subset(dta, grp == "B"), + .df_row = dta, + .var = "rsp", + .ref_group = subset(dta, grp == "A"), + .in_ref_col = FALSE, + variables = list(arm = "grp") + )) + expected_no_strata <- list(pval = formatters::with_label(0.686809, "p-value")) + expect_equal(result_no_strata, expected_no_strata, tolerance = 1e-6) +}) + +test_that("s_cmhrms_j works as expected with empty data set or in reference column", { + dta <- data.frame( + rsp = logical(0), + grp = factor(character(0), levels = c("A", "B")) + ) + + result <- expect_silent(s_cmhrms_j( + df = subset(dta, grp == "B"), + .df_row = dta, + .var = "rsp", + .ref_group = subset(dta, grp == "A"), + .in_ref_col = FALSE, + variables = list(arm = "grp") + )) + expected <- list(pval = formatters::with_label(numeric(0), "p-value")) + expect_equal(result, expected) + + result_refcol <- expect_silent(s_cmhrms_j( + df = subset(dta, grp == "B"), + .df_row = dta, + .var = "rsp", + .ref_group = subset(dta, grp == "A"), + .in_ref_col = TRUE, + variables = list(arm = "grp") + )) + expected_refcol <- list(pval = formatters::with_label(numeric(0), "p-value")) + expect_equal(result_refcol, expected_refcol) +}) + +test_that("a_cmhrms_j works in a table layout as expected", { + set.seed(12) + dta <- data.frame( + rsp = sample(c(TRUE, FALSE), 100, TRUE), + grp = factor(rep(c("A", "B"), each = 50), levels = c("A", "B")), + strata = factor(sample(c("C", "D"), 100, TRUE)) + ) + + lyt <- basic_table() |> + split_cols_by(var = "grp") |> + analyze( + "rsp", + afun = a_cmhrms_j, + show_labels = "hidden", + extra_args = list( + variables = list(arm = "grp", strata = "strata"), + ref_path = c("grp", "A") + ) + ) + res <- expect_silent(build_table(lyt, df = dta)) + expect_snapshot(res) +}) + +test_that("a_cmhrms_j_with_exclude works in a table layout as expected", { + set.seed(12) + dta <- data.frame( + visit = factor(rep(c("Baseline", "Week 1"), length.out = 100)), + rsp = sample(c(TRUE, FALSE), 100, TRUE), + grp = factor(rep(c("A", "B"), each = 50), levels = c("A", "B")), + strata = factor(sample(c("C", "D"), 100, TRUE)) + ) + + lyt <- basic_table() |> + split_cols_by(var = "grp") |> + split_rows_by(var = "visit") |> + analyze( + "rsp", + afun = a_cmhrms_j_with_exclude, + show_labels = "hidden", + extra_args = list( + variables = list(arm = "grp", strata = "strata"), + ref_path = c("grp", "A"), + exclude_levels = list(visit = "Baseline") + ) + ) + res <- expect_silent(build_table(lyt, df = dta)) |> + safe_prune_table(prune_func = tern::keep_rows(keep_non_null_rows)) + expect_snapshot(res) +}) diff --git a/tests/testthat/test-cmp_functions.R b/tests/testthat/test-cmp_functions.R index d553add9..e7fdd9ec 100644 --- a/tests/testthat/test-cmp_functions.R +++ b/tests/testthat/test-cmp_functions.R @@ -1,5 +1,5 @@ test_that("cmp_split_fun works as expected", { - result <- basic_table() %>% + result <- basic_table(round_type = "sas") |> split_cols_by("ID", split_fun = cmp_split_fun) |> build_table(formatters::DM) expect_snapshot(result) diff --git a/tests/testthat/test-column_stats.R b/tests/testthat/test-column_stats.R index 082c6fd3..557a59de 100644 --- a/tests/testthat/test-column_stats.R +++ b/tests/testthat/test-column_stats.R @@ -70,6 +70,22 @@ test_that("column_stats calculates SD statistic correctly", { expect_equal(week1_sd, "7.071") }) +test_that("column_stats calculates mean_sd statistic correctly", { + # Create sample data + df <- data.frame( + AVISIT = c("Baseline (DB)", "Week 1", "Week 1", "Week 2", "Week 2"), + AVAL = c(10, 20, 30, 40, 50), + dp = c(1, 1, 1, 1, 1) + ) + # Create context for AVAL mean_sd + ctx <- mk_context(c("AVAL", "mean_sd")) + fun <- column_stats() + rows <- fun(df, "AVISIT", ctx) + + week1_mean_sd <- as.character(rows[["Week 1"]]) + expect_equal(week1_mean_sd, "25.00 (7.071)") +}) + test_that("column_stats calculates SE statistic correctly", { # Create sample data df <- data.frame( @@ -148,7 +164,7 @@ test_that("column_stats handles BASE variable correctly", { expect_equal(week1_base_mean, "20.00") }) -test_that("column_stats handles iec roundmethod correctly", { +test_that("column_stats handles iec round_type correctly", { # Create sample data df <- data.frame( AVISIT = c("Baseline (DB)", "Week 1", "Week 1", "Week 2", "Week 2"), @@ -164,7 +180,7 @@ test_that("column_stats handles iec roundmethod correctly", { statnm, visit, varnm, - roundmethod = "iec", + round_type = "iec", exclude_visits = "Baseline (DB)" ) } @@ -180,118 +196,110 @@ test_that("column_stats handles iec roundmethod correctly", { expect_equal(result_R, "25.34") - # Compare to SAS rounding - result_SAS <- calc_one_visit( + result_R <- calc_one_visit_R( df$AVAL[df$AVISIT == "Week 1"], 1, - "Mean", + "N", "Week 1", - "AVAL", - roundmethod = "sas", - exclude_visits = "Baseline (DB)" - ) - expect_equal(result_SAS, "25.35") -}) - -test_that("column_N function works correctly", { - # Create sample data - df <- data.frame( - TRT = c("Drug A", "Drug A", "Drug B", "Drug B", "Drug B"), - USUBJID = c("001", "002", "003", "004", "004"), # Note 004 is duplicated - AVAL = c(10, 20, 30, 40, 50) + "AVAL" ) - # Create context for AVAL N - ctx <- mk_context(c("AVAL", "N")) - - # Call column_N - rows <- suppressWarnings(column_N(df, "TRT", ctx)) - - # Should have counts of subjects by TRT group - expect_equal(as.numeric(rows[["Drug A"]]), 2) # 2 unique subjects - expect_equal(as.numeric(rows[["Drug B"]]), 2) # 2 unique subjects (one duplicate) -}) - -test_that("postfun_cog works correctly", { - # Create a basic return value and context - ret <- list() - fulldf <- data.frame(AVAL = c(10, 20, 30)) + expect_equal(result_R, 2) - # Create spl_context for AVAL - spl_context <- data.frame( - value = I(list("AVAL")), - stringsAsFactors = FALSE + result_R <- calc_one_visit_R( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "SE", + "Week 1", + "AVAL" ) - # Call postfun_cog - result <- postfun_cog(ret, NULL, fulldf, spl_context) + expect_equal(result_R, "5.000") - # Check structure of result - expect_type(result, "list") - expect_equal( - names(result$values), - c("N", "Mean", "SD", "SE", "Med", "Min", "Max") + result_R <- calc_one_visit_R( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "SD", + "Week 1", + "AVAL" ) - expect_equal(length(result$datasplit), 7) -}) -test_that("postfun_eq5d works correctly", { - # Create a basic return value and context - ret <- list() - fulldf <- data.frame(AVAL = c(10, 20, 30)) + expect_equal(result_R, "7.071") - # Create spl_context for AVAL - spl_context <- data.frame( - value = I(list("AVAL")), - stringsAsFactors = FALSE + result_R <- calc_one_visit_R( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "mean_sd", + "Week 1", + "AVAL" ) - # Call postfun_eq5d - result <- postfun_eq5d(ret, NULL, fulldf, spl_context) + expect_equal(result_R, "25.34 (7.071)") - # Check structure of result - expect_type(result, "list") - expect_equal(names(result$values), c("N", "Mean", "SD", "Med", "Min", "Max")) - expect_equal(length(result$datasplit), 6) + # Compare to SAS rounding + result_SAS <- calc_one_visit( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "Mean", + "Week 1", + "AVAL", + round_type = "sas", + exclude_visits = "Baseline (DB)" + ) + expect_equal(result_SAS, "25.35") - # Test for CHG - spl_context$value <- list("CHG") - result_chg <- postfun_eq5d(ret, NULL, fulldf, spl_context) - expect_equal( - names(result_chg$values), - c("N", "Mean", "SE", "SD", "Med", "Min", "Max") + # Compare to SAS rounding + result_R_mod <- calc_one_visit( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "Mean", + "Week 1", + "AVAL", + round_type = "iec_mod", + exclude_visits = "Baseline (DB)" ) - expect_equal(length(result_chg$datasplit), 7) + expect_equal(result_R_mod, "25.34") - # Test for BASE - spl_context$value <- list("BASE") - result_base <- postfun_eq5d(ret, NULL, fulldf, spl_context) - expect_equal(names(result_base$values), c("mean_sd")) - expect_equal(length(result_base$datasplit), 1) -}) -test_that("postfun_cog and postfun_eq5d handle error cases", { - # Create a basic return value and context - ret <- list() - fulldf <- data.frame(AVAL = c(10, 20, 30)) + df <- data.frame( + AVISIT = c( + "Baseline (DB)", + "Week 1", + "Week 1", + "Week 1", + "Week 2", + "Week 2" + ), + AVAL = c(10, 20, 30, 40, 50, 60), + dp = c(0, 0, 0, 0, 0, 0) + ) - # Create spl_context with invalid value - spl_context <- data.frame( - value = I(list("INVALID")), - stringsAsFactors = FALSE + result_R <- calc_one_visit_R( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "Med", + "Week 1", + "AVAL" ) + expect_equal(result_R, "30.00") - # Expect error for postfun_cog - expect_error( - postfun_cog(ret, NULL, fulldf, spl_context), - "something bad happened" + result_R <- calc_one_visit_R( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "Min", + "Week 1", + "AVAL" ) + expect_equal(result_R, "20.0") - # Expect error for postfun_eq5d - expect_error( - postfun_eq5d(ret, NULL, fulldf, spl_context), - "something bad happened" + result_R <- calc_one_visit_R( + df$AVAL[df$AVISIT == "Week 1"], + 1, + "Max", + "Week 1", + "AVAL" ) + expect_equal(result_R, "40.0") }) test_that("calc_N returns NULL for non-AVAL variables", { diff --git a/tests/testthat/test-colwidths.R b/tests/testthat/test-colwidths.R new file mode 100644 index 00000000..e08f9354 --- /dev/null +++ b/tests/testthat/test-colwidths.R @@ -0,0 +1,143 @@ +fontspec <- font_spec("Times", 9L, 1) +ADSL <- data.frame( + USUBJID = c( + "XXXXX01", "XXXXX02", "XXXXX03", "XXXXX04", "XXXXX05", + "XXXXX06", "XXXXX07", "XXXXX08", "XXXXX09", "XXXXX10" + ), + TRT01P = factor( + c( + "ARMA", "ARMB", "ARMA", "ARMB", "ARMB", + "Placebo", "Placebo", "Placebo", "ARMA", "ARMB" + ) + ), + FASFL = c("Y", "Y", "Y", "Y", "N", "Y", "Y", "Y", "Y", "Y"), + SAFFL = c("N", "N", "N", "N", "N", "N", "N", "N", "N", "N"), + PKFL = c("N", "N", "N", "N", "N", "N", "N", "N", "N", "N") +) + +lyt <- basic_table(round_type = "sas") |> + split_cols_by("TRT01P") |> + add_overall_col("Total") |> + analyze("FASFL", + var_labels = "Analysis set:", + afun = a_freq_j, + extra_args = list(label = "Full", val = "Y"), + show_labels = "visible" + ) |> + analyze("SAFFL", + var_labels = "Analysis set:", + afun = a_freq_j, + extra_args = list(label = "Safety", val = "Y"), + show_labels = "visible" + ) |> + analyze("PKFL", + var_labels = "Analysis set:", + afun = a_freq_j, + extra_args = list(label = "PK", val = "Y"), + show_labels = "visible" + ) + +tt <- build_table(lyt, ADSL) + +test_that("ttype_wrap_vec works as expected", { + result <- ttype_wrap_vec(vec = c(1, 2, 3, 4) |> as.character(), fontspec = fontspec, width = 2) + # TODO: how do I guess expected_result + expected_result <- list( + c("1"), + c("2"), + c("3"), + c("4") + ) + testthat::expect_equal(result, expected_result) +}) + +test_that("check_wrap_nobreak works as expected", { + # TODO: how do I guess argument colwidths = rep(20, 5) + result <- check_wrap_nobreak(tt = tt, colwidths = rep(20, 5), fontspec = fontspec) + testthat::expect_true(result) + + # TODO: how do I guess argument colwidths = rep(1, 5) + result <- check_wrap_nobreak(tt = tt, colwidths = rep(1, 5), fontspec = fontspec) + testthat::expect_false(result) +}) + + +test_that("def_colwidths works as expected", { + anl <- ex_adsl + anl <- anl[1:10, c("USUBJID", "ARM", "BMRKR1")] + anl <- var_relabel(anl, + USUBJID = "Unique\nSubject\nIdentifier", + ARM = "Description\nOf\nPlanned Arm" + ) + # nolint start + suppressMessages(tt2 <- as_listing(anl, key_cols = c("USUBJID")) |> + add_listing_col("ARM")) + # nolint end + + result <- def_colwidths(tt = tt2, fontspec = fontspec) + # TODO: how do I guess this expected result? + expected_result <- c(67, 72, 84) + testthat::expect_equal(result, expected_result) +}) + +test_that("listing_column_widths works as expected", { + anl <- ex_adsl + anl <- anl[1:10, c("USUBJID", "ARM", "BMRKR1")] + anl <- var_relabel(anl, + USUBJID = "Unique\nSubject\nIdentifier", + ARM = "Description\nOf\nPlanned Arm" + ) + # nolint start + suppressMessages(tt3 <- as_listing(anl, key_cols = c("USUBJID")) |> + add_listing_col("ARM")) + # nolint end + mpf <- rlistings::matrix_form(tt3) + suppressMessages(testthat::expect_message(result <- listing_column_widths(mpf, verbose = TRUE))) + # TODO: how do I guess this expected result? + expected_result <- c(67, 72, 84) + testthat::expect_equal(result, expected_result) +}) + +test_that("find_free_colspc works as expected", { + anl <- ex_adsl + anl <- anl[1:10, c("USUBJID", "ARM", "BMRKR1")] + anl <- var_relabel(anl, + USUBJID = "Unique\nSubject\nIdentifier", + ARM = "Description\nOf\nPlanned Arm" + ) + # nolint start + suppressMessages(tt4 <- as_listing(anl, key_cols = c("USUBJID")) |> + add_listing_col("ARM")) + # nolint end + mpf <- rlistings::matrix_form(tt4) + + possdf <- make_poss_wdf(mpf) + + odf <- order(possdf$col_num, possdf$colwidth) + possdf <- possdf[odf, ] + full_possdf <- possdf + ## already ordered by colnum then width so this the first of each colwidth is the min width for that col + dups <- duplicated(possdf$col_num) + curdf <- possdf[!dups, ] + possdf <- possdf[dups, ] ## without rows for ones in curdf + + suppressWarnings(result <- find_free_colspc(curposs = curdf, fullposs = full_possdf)) + + expect_snapshot(result) +}) + +test_that("smart_colwidths_1page works as expected", { + result <- smart_colwidths_1page(tt = tt, fontspec = fontspec) + # TODO: how do I guess this expected result? + expected_result <- c(58, 29, 29, 29, 29) + testthat::expect_equal(result, expected_result) + testthat::expect_equal(length(result), ncol(tt) + 1) + + result2 <- smart_colwidths_1page(tt = tt, fontspec = fontspec, col_gap = 0) + result3 <- smart_colwidths_1page(tt = tt, fontspec = fontspec, col_gap = 2) + testthat::expect_equal(result2 - 2, result3) +}) + +test_that("spaces_to_inches works as expected", { + testthat::expect_equal(spaces_to_inches(spcs = 2, fontspec = fontspec), 2) +}) diff --git a/tests/testthat/test-count_pct.R b/tests/testthat/test-count_pct.R index 4e316b38..975e20d3 100644 --- a/tests/testthat/test-count_pct.R +++ b/tests/testthat/test-count_pct.R @@ -12,8 +12,8 @@ test_that("a_freq_j with val = NA and denom option", { extra_args_1 <- list( .stats = c("count_unique_denom_fraction") ) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -33,8 +33,8 @@ test_that("a_freq_j with val = NA and denom option", { denom = "N_col", .stats = c("count_unique_denom_fraction") ) - lyt1c <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1c <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -51,8 +51,8 @@ test_that("a_freq_j with specific val (CHN) and denom option", { .stats = c("count_unique_denom_fraction"), val = "CHN" ) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -73,8 +73,8 @@ test_that("a_freq_j with specific val (CHN) and denom option", { .stats = c("count_unique_denom_fraction"), val = "CHN" ) - lyt1c <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1c <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -91,8 +91,8 @@ test_that("a_freq_j with N_only", { extra_args_1 <- list( .stats = c("count_unique") ) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -115,9 +115,9 @@ test_that("a_freq_j with TotCol_only", { .stats = c("count_unique"), restr_columns = "Total" ) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% - add_overall_col("Total") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> + add_overall_col("Total") |> analyze(vars = "COUNTRY", afun = a_freq_j, extra_args = extra_args_1) # apply to adsl @@ -135,21 +135,21 @@ test_that("a_freq_j as cfun", { Ncol <- length(unique(adsl_col[["USUBJID"]])) adae_col <- adae[adae$ARM == "A: Drug X", ] - adae_col_bs <- unique(adae_col %>% select(USUBJID, AEBODSYS)) + adae_col_bs <- unique(adae_col |> select(USUBJID, AEBODSYS)) # scenario 1 : extra_args_1 <- list( denom = "N_col", .stats = c("count_unique_denom_fraction") ) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% - split_rows_by("AEBODSYS") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> + split_rows_by("AEBODSYS") |> summarize_row_groups( "AEBODSYS", cfun = a_freq_j, extra_args = extra_args_1 - ) %>% + ) |> analyze( vars = "AEDECOD", afun = a_freq_j, @@ -163,14 +163,14 @@ test_that("a_freq_j as cfun", { # scenario 2 : label using label_fstr method works extra_args_2 <- append(extra_args_1, list(label_fstr = "Bodysystem %s")) - lyt2 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% - split_rows_by("AEBODSYS") %>% + lyt2 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> + split_rows_by("AEBODSYS") |> summarize_row_groups( "AEBODSYS", cfun = a_freq_j, extra_args = extra_args_2 - ) %>% + ) |> analyze( vars = "AEDECOD", afun = a_freq_j, @@ -187,7 +187,7 @@ test_that("a_freq_j with label map", { Ncol <- length(unique(adsl_col[["USUBJID"]])) adae_col <- adae[adae$ARM == "A: Drug X", ] - adae_col_sub <- unique(adae_col %>% select(USUBJID)) + adae_col_sub <- unique(adae_col |> select(USUBJID)) Subjs_with_AEs <- tibble::tribble( ~value, @@ -198,8 +198,8 @@ test_that("a_freq_j with label map", { # scenario 1 : with label_map extra_args_1 <- list(label_map = Subjs_with_AEs) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "TRTEMFL", afun = a_freq_j, @@ -212,8 +212,8 @@ test_that("a_freq_j with label map", { # scenario 2 : set row label using label parameter extra_args_2 <- list(label = "Subjects with >= 1 AE") - lyt2 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt2 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "TRTEMFL", afun = a_freq_j, @@ -230,8 +230,8 @@ test_that("a_freq_j (old count_pats case)", { extra_args_1 <- list( .stats = c("count_unique_denom_fraction") ) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -251,8 +251,8 @@ test_that("a_freq_j (old count_pats case)", { denom = "N_col", .stats = c("count_unique_denom_fraction") ) - lyt1c <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1c <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -268,9 +268,9 @@ test_that("a_freq_j with N_subgroup as denom", { # scenario 1: denom = N_subgroup, all values extra_args_1 <- list(denom = "n_df") - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% - split_rows_by("SEX") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> + split_rows_by("SEX") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -294,9 +294,9 @@ test_that("a_freq_j with N_subgroup as denom", { .stats = c("count_unique_denom_fraction") ) - lyt1c <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% - split_rows_by("SEX") %>% + lyt1c <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> + split_rows_by("SEX") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -316,14 +316,14 @@ test_that("a_freq_j with N_trt as denom - special situation", { ### spanning header for severity - adsl_ <- ex_adsl %>% select(USUBJID, ARM) - adae_ <- ex_adae %>% select(USUBJID, ARM, AEBODSYS, AEDECOD, AESEV) + adsl_ <- ex_adsl |> select(USUBJID, ARM) + adae_ <- ex_adae |> select(USUBJID, ARM, AEBODSYS, AEDECOD, AESEV) adae_$TRTEMFL <- "Y" trtvar <- "ARM" ## Total column on adsl - adsl_ <- adsl_ %>% + adsl_ <- adsl_ |> mutate(ASEV = factor("Total", levels = c("Total", levels(adae$AESEV)))) adsl_$spanheader <- factor( ifelse(adsl_$ASEV == "Total", " ", "Severity"), @@ -331,34 +331,34 @@ test_that("a_freq_j with N_trt as denom - special situation", { ) ## ae : max severity per subject per SOC - adaetot <- adae_ %>% + adaetot <- adae_ |> mutate( AESEV = "Total", AEBODSYSx = AEBODSYS - ) %>% - arrange(USUBJID, AEBODSYS, AEDECOD) %>% - group_by(USUBJID, AEBODSYS, AEDECOD) %>% - slice(1) %>% + ) |> + arrange(USUBJID, AEBODSYS, AEDECOD) |> + group_by(USUBJID, AEBODSYS, AEDECOD) |> + slice(1) |> ungroup() # Take maximum severity - per PT - adaemaxpt <- adae_ %>% - filter(toupper(AESEV) %in% toupper(c("Mild", "Moderate", "Severe"))) %>% + adaemaxpt <- adae_ |> + filter(toupper(AESEV) %in% toupper(c("Mild", "Moderate", "Severe"))) |> mutate( AESEVN = case_when( toupper(AESEV) == "MILD" ~ 3, toupper(AESEV) == "MODERATE" ~ 2, toupper(AESEV) == "SEVERE" ~ 1 ) - ) %>% - arrange(USUBJID, AEBODSYS, AEDECOD, AESEVN) %>% - group_by(USUBJID, AEBODSYS, AEDECOD) %>% - slice(1) %>% + ) |> + arrange(USUBJID, AEBODSYS, AEDECOD, AESEVN) |> + group_by(USUBJID, AEBODSYS, AEDECOD) |> + slice(1) |> ungroup() # Take maximum severity - per SOC - adaemaxsoc <- adae_ %>% - filter(toupper(AESEV) %in% toupper(c("Mild", "Moderate", "Severe"))) %>% + adaemaxsoc <- adae_ |> + filter(toupper(AESEV) %in% toupper(c("Mild", "Moderate", "Severe"))) |> mutate( AESEVN = case_when( toupper(AESEV) == "MILD" ~ 3, @@ -366,11 +366,11 @@ test_that("a_freq_j with N_trt as denom - special situation", { toupper(AESEV) == "SEVERE" ~ 1 ), AEBODSYSx = AEBODSYS - ) %>% - arrange(USUBJID, AEBODSYS, AESEVN) %>% - group_by(USUBJID, AEBODSYS) %>% - slice(1) %>% - ungroup() %>% + ) |> + arrange(USUBJID, AEBODSYS, AESEVN) |> + group_by(USUBJID, AEBODSYS) |> + slice(1) |> + ungroup() |> select(USUBJID, AEBODSYS, AESEV, AEBODSYSx) # Merge back in an create a new SOC variable that is only populated @@ -382,28 +382,28 @@ test_that("a_freq_j with N_trt as denom - special situation", { ) # Add total - adaetot <- adae_ %>% + adaetot <- adae_ |> mutate( AESEV = "Total", AEBODSYSx = AEBODSYS - ) %>% - arrange(USUBJID, AEBODSYS, AEDECOD) %>% - group_by(USUBJID, AEBODSYS, AEDECOD) %>% - slice(1) %>% + ) |> + arrange(USUBJID, AEBODSYS, AEDECOD) |> + group_by(USUBJID, AEBODSYS, AEDECOD) |> + slice(1) |> ungroup() # Set data together - adaeall <- bind_rows(adaemax, adaetot) %>% + adaeall <- bind_rows(adaemax, adaetot) |> mutate( ASEV = factor( as.character(AESEV), levels = c("Total", levels(ex_adae$AESEV)) ) - ) %>% + ) |> select(USUBJID, TRTEMFL, ASEV, AEBODSYS, AEBODSYSx, AEDECOD) - adaeall <- adaeall %>% - inner_join(., adsl_ %>% select(USUBJID, ARM), by = c("USUBJID")) + adaeall <- adaeall |> + inner_join(adsl_ |> select(USUBJID, ARM), by = c("USUBJID"), relationship = "many-to-many") adaeall$spanheader <- factor( ifelse(adaeall$ASEV == "Total", " ", "Severity"), @@ -417,17 +417,17 @@ test_that("a_freq_j with N_trt as denom - special situation", { colgroup = "ARM", riskdiff = FALSE ) - lyt <- basic_table() %>% - split_cols_by(trtvar, show_colcounts = TRUE) %>% - split_cols_by("spanheader", split_fun = trim_levels_in_group("ASEV")) %>% - split_cols_by("ASEV", show_colcounts = TRUE) %>% + lyt <- basic_table(round_type = "sas") |> + split_cols_by(trtvar, show_colcounts = TRUE) |> + split_cols_by("spanheader", split_fun = trim_levels_in_group("ASEV")) |> + split_cols_by("ASEV", show_colcounts = TRUE) |> split_rows_by( "AEBODSYS", split_label = "System Organ Class", split_fun = trim_levels_in_group("AEDECOD"), label_pos = "topleft", section_div = c(" ") - ) %>% + ) |> summarize_row_groups( "AEBODSYSx", cfun = a_freq_j, @@ -456,8 +456,8 @@ test_that("a_freq_j with keep_levels (CHN, NGA) ", { denom = "N_col", val = c("CHN", "NGA") ) - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt1 <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze(vars = "COUNTRY", afun = a_freq_j, extra_args = extra_args_1) # apply to adsl diff --git a/tests/testthat/test-count_pct_relrisk.R b/tests/testthat/test-count_pct_relrisk.R index a3696bc0..47a8d9a6 100644 --- a/tests/testthat/test-count_pct_relrisk.R +++ b/tests/testthat/test-count_pct_relrisk.R @@ -2,8 +2,8 @@ library(rtables) library(dplyr) suppressPackageStartupMessages(library(tern)) -adsl <- ex_adsl %>% select(USUBJID, ARM, COUNTRY, STRATA1, SEX) -adae <- ex_adae %>% select(USUBJID, AEDECOD, AEBODSYS, ARM) +adsl <- ex_adsl |> select(USUBJID, ARM, COUNTRY, STRATA1, SEX) +adae <- ex_adae |> select(USUBJID, AEDECOD, AEBODSYS, ARM) adae$TRTEMFL <- "Y" trtvar <- "ARM" @@ -21,10 +21,10 @@ adsl$rrisk_label <- paste(adsl[["ARM"]], "vs Placebo") adae <- left_join(adae, adsl, by = join_by(USUBJID, ARM)) -core_lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("rrisk_header", nested = FALSE) %>% +core_lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by( "ARM", labels_var = "rrisk_label", @@ -57,10 +57,11 @@ wald_diff <- function(inputs) { } count_unique_subjects <- function( - df, - id = "USUBJID", - sub_set = NULL, - var = NULL) { + df, + id = "USUBJID", + sub_set = NULL, + var = NULL +) { if (!is.null(sub_set)) { df <- subset(df, sub_set) } @@ -95,7 +96,7 @@ test_that("a_freq_j with val = NA and denom option", { method = "wald" ) - lyt1 <- core_lyt %>% + lyt1 <- core_lyt |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -106,7 +107,7 @@ test_that("a_freq_j with val = NA and denom option", { tbl1 <- build_table(lyt1, adsl) res1 <- cell_values(tbl1["CHN", "A: Drug X"]) res1_val <- unlist(unname(res1[[DrugX_column_val]])) - res1_rr <- res1[[DrugX_column_rr]] %>% as.numeric() + res1_rr <- res1[[DrugX_column_rr]] |> as.numeric() Ncol <- count_unique_subjects(adsl_col) N <- count_unique_subjects(adsl_col) @@ -147,7 +148,7 @@ test_that("a_freq_j with val = NA and denom option", { method = "wald" ) - lyt1b <- core_lyt %>% + lyt1b <- core_lyt |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -156,7 +157,7 @@ test_that("a_freq_j with val = NA and denom option", { tbl1b <- build_table(lyt1b, adae, adsl) res1b <- cell_values(tbl1b["CHN", "A: Drug X"]) res1b_val <- unlist(unname(res1b[[DrugX_column_val]])) - res1b_rr <- res1b[[DrugX_column_rr]] %>% as.numeric() + res1b_rr <- res1b[[DrugX_column_rr]] |> as.numeric() ### comparison of main columns (similar to tests in test-count_pct.R ) Ncol <- count_unique_subjects(adsl_col) @@ -196,7 +197,7 @@ test_that("a_freq_j with val = NA and denom option", { method = "wald" ) - lyt1c <- core_lyt %>% + lyt1c <- core_lyt |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -206,7 +207,7 @@ test_that("a_freq_j with val = NA and denom option", { res1c <- cell_values(tbl1c["CHN", "A: Drug X"]) res1c_val <- unlist(unname(res1c[[DrugX_column_val]])) - res1c_rr <- res1c[[DrugX_column_rr]] %>% as.numeric() + res1c_rr <- res1c[[DrugX_column_rr]] |> as.numeric() ### comparison of main columns (similar to tests in test-count_pct.R ) Ncol <- count_unique_subjects(adsl_col) @@ -237,10 +238,6 @@ test_that("a_freq_j with val = NA and denom option", { }) - - - - test_that("a_freq_j with risk difference method cmh", { adsl_col <- adsl[adsl$ARM == "A: Drug X", ] adae_col <- adae[adae$ARM == "A: Drug X", ] @@ -264,7 +261,7 @@ test_that("a_freq_j with risk difference method cmh", { ref_path = ref_path, variables = list(strata = "STRATA1") ) - lyt1d <- core_lyt %>% + lyt1d <- core_lyt |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -275,7 +272,7 @@ test_that("a_freq_j with risk difference method cmh", { res1d <- cell_values(tbl1d["CHN", "A: Drug X"]) res1d_val <- unlist(unname(res1d[[DrugX_column_val]])) - res1d_rr <- res1d[[DrugX_column_rr]] %>% as.numeric() + res1d_rr <- res1d[[DrugX_column_rr]] |> as.numeric() ### comparison of main columns (similar to tests in test-count_pct.R ) Ncol <- count_unique_subjects(adsl_col) @@ -300,25 +297,25 @@ test_that("a_freq_j with risk difference method cmh", { N_PBO <- count_unique_subjects(adae_colPBO_x) ### construct input vectors to utilize tern::prop_diff_cmh - adae_col_chn <- adae %>% + adae_col_chn <- adae |> filter(ARM == "A: Drug X" & COUNTRY == "CHN") - adae_colPBO_chn <- adae %>% + adae_colPBO_chn <- adae |> filter(ARM == ctrl_grp & COUNTRY == "CHN") subj_col <- adsl_col[["USUBJID"]] subj_ae <- unique(adae_col_chn[["USUBJID"]]) - rsp_col <- rep(FALSE, length = length(subj_col)) + rsp_col <- rep(FALSE, length.out = length(subj_col)) rsp_col[subj_col %in% subj_ae] <- TRUE - grp_col <- rep("A: Drug X", length = length(subj_col)) + grp_col <- rep("A: Drug X", length.out = length(subj_col)) strata_col <- adsl_col[["STRATA1"]] subj_ctrl <- adsl_colPBO[["USUBJID"]] subj_ae_ctrl <- unique(adae_colPBO_chn[["USUBJID"]]) - rsp_ctrl <- rep(FALSE, length = length(subj_ctrl)) + rsp_ctrl <- rep(FALSE, length.out = length(subj_ctrl)) rsp_ctrl[subj_ctrl %in% subj_ae_ctrl] <- TRUE - grp_ctrl <- rep(ctrl_grp, length = length(subj_ctrl)) + grp_ctrl <- rep(ctrl_grp, length.out = length(subj_ctrl)) strata_ctrl <- adsl_colPBO[["STRATA1"]] # for prop_diff_cmh diff is second group - first group @@ -364,8 +361,8 @@ test_that("a_freq_j with N_subgroup as denom", { ctrl_grp = ctrl_grp, ref_path = ref_path ) - lyt1 <- core_lyt %>% - split_rows_by("SEX") %>% + lyt1 <- core_lyt |> + split_rows_by("SEX") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -386,7 +383,7 @@ test_that("a_freq_j with N_subgroup as denom", { ] ) res1_val <- unlist(unname(res1[[DrugX_column_val]])) - res1_rr <- res1[[DrugX_column_rr]] %>% as.numeric() + res1_rr <- res1[[DrugX_column_rr]] |> as.numeric() Ncol <- length(unique(adsl_col[["USUBJID"]])) Nsubgroup <- length(unique(adsl_col_subgroup[["USUBJID"]])) @@ -434,7 +431,7 @@ test_that("a_freq_j with N_subgroup as denom", { ] ) res1b_val <- unlist(unname(res1b[[DrugX_column_val]])) - res1b_rr <- res1b[[DrugX_column_rr]] %>% as.numeric() + res1b_rr <- res1b[[DrugX_column_rr]] |> as.numeric() Ncol <- length(unique(adsl_col[["USUBJID"]])) Nsubgroup <- length(unique(adsl_col_subgroup[["USUBJID"]])) @@ -482,8 +479,8 @@ test_that("a_freq_j with N_subgroup as denom", { ref_path = ref_path ) - lyt1c <- core_lyt %>% - split_rows_by("SEX") %>% + lyt1c <- core_lyt |> + split_rows_by("SEX") |> analyze( vars = "COUNTRY", afun = a_freq_j, @@ -503,7 +500,7 @@ test_that("a_freq_j with N_subgroup as denom", { ] ) res1c_val <- unlist(unname(res1c[[DrugX_column_val]])) - res1c_rr <- res1c[[DrugX_column_rr]] %>% as.numeric() + res1c_rr <- res1c[[DrugX_column_rr]] |> as.numeric() Ncol <- length(unique(adsl_col[["USUBJID"]])) Nsubgroup <- length(unique(adsl_col_subgroup[["USUBJID"]])) diff --git a/tests/testthat/test-coxph_hr.R b/tests/testthat/test-coxph_hr.R index 51399010..3c071250 100644 --- a/tests/testthat/test-coxph_hr.R +++ b/tests/testthat/test-coxph_hr.R @@ -3,11 +3,11 @@ library(survival) test_that("s_coxph_hr works with default arguments and no stratification factors", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate(is_event = CNSR == 0) - df <- adtte_f %>% dplyr::filter(ARMCD == "ARM A") - df_ref <- adtte_f %>% dplyr::filter(ARMCD == "ARM B") + df <- adtte_f |> dplyr::filter(ARMCD == "ARM A") + df_ref <- adtte_f |> dplyr::filter(ARMCD == "ARM B") result <- s_coxph_hr( df = df, @@ -46,12 +46,12 @@ test_that("s_coxph_hr works with default arguments and no stratification factors }) test_that("a_coxph_hr works with custom arguments and stratification factors", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate(is_event = CNSR == 0) - result <- basic_table() %>% - split_cols_by(var = "ARMCD") %>% + result <- basic_table(round_type = "sas") |> + split_cols_by(var = "ARMCD") |> analyze( vars = "AVAL", afun = a_coxph_hr, @@ -69,7 +69,7 @@ test_that("a_coxph_hr works with custom arguments and stratification factors", { ref_path = c("ARMCD", "ARM A"), .stats = c("hr_ci_3d", "pvalue") ) - ) %>% + ) |> build_table(df = adtte_f) res <- expect_silent(result) @@ -77,12 +77,12 @@ test_that("a_coxph_hr works with custom arguments and stratification factors", { }) test_that("a_coxph_hr works with stratification factors for Log-Rank test", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate(is_event = CNSR == 0) - result <- basic_table() %>% - split_cols_by(var = "ARMCD") %>% + result <- basic_table(round_type = "sas") |> + split_cols_by(var = "ARMCD") |> analyze( vars = "AVAL", afun = a_coxph_hr, @@ -100,7 +100,7 @@ test_that("a_coxph_hr works with stratification factors for Log-Rank test", { ref_path = c("ARMCD", "ARM A"), .stats = c("hr_ci_3d", "pvalue") ) - ) %>% + ) |> build_table(df = adtte_f) res <- expect_silent(result) diff --git a/tests/testthat/test-coxreg_multivar.R b/tests/testthat/test-coxreg_multivar.R index 2def990d..7958e1c7 100644 --- a/tests/testthat/test-coxreg_multivar.R +++ b/tests/testthat/test-coxreg_multivar.R @@ -27,7 +27,7 @@ test_that("h_extract_coxreg_multivar works as expected", { }) test_that("tefos03_first_split_fun works as expected", { - lyt <- basic_table() %>% + lyt <- basic_table() |> split_cols_by("ID", split_fun = tefos03_first_split_fun) result <- expect_silent(build_table(lyt, DM)) expect_snapshot(col_info(result)) @@ -36,7 +36,7 @@ test_that("tefos03_first_split_fun works as expected", { test_that("tefos03_second_split_fun_fct works as expected", { split_fun <- tefos03_second_split_fun_fct(conf_level = 0.92) - lyt <- basic_table() %>% + lyt <- basic_table() |> split_cols_by("ID", split_fun = tefos03_first_split_fun) |> split_cols_by("ID", split_fun = split_fun) result <- expect_silent(build_table(lyt, DM)) @@ -100,7 +100,7 @@ test_that("summarize_coxreg_multivar works as expected with custom options", { arm = "ARM", covariates = c("SEX", "AGE") ) - lyt <- basic_table() |> + lyt <- basic_table(round_type = "sas") |> summarize_coxreg_multivar( var = "STUDYID", variables = variables, @@ -110,7 +110,7 @@ test_that("summarize_coxreg_multivar works as expected with custom options", { ties = "breslow" ), formats = list( - coef_se = jjcsformat_xx("xx. (xx.)"), + coef_se = jjcsformat_xx("xx.x (xx.x)"), hr_est = jjcsformat_xx("xx.xxxx"), hr_ci = jjcsformat_xx("(xx.x, xx.x)"), pval = jjcsformat_pval_fct(0.1) diff --git a/tests/testthat/test-docx_exporter_functions.R b/tests/testthat/test-docx_exporter_functions.R new file mode 100644 index 00000000..11516f1c --- /dev/null +++ b/tests/testthat/test-docx_exporter_functions.R @@ -0,0 +1,823 @@ +library(dplyr) +library(tern) +library(rtables) +library(ggplot2) + + + +skip_on_cran() + +adsl <- ex_adsl +adae <- ex_adae +extra_args_1 <- list( + .stats = c("count_unique_denom_fraction") +) +lyt1 <- basic_table(show_colcounts = TRUE) |> + split_cols_by("ARM") |> + analyze( + vars = "COUNTRY", + afun = a_freq_j, + extra_args = extra_args_1 + ) + +tbl1 <- build_table(lyt1, adsl) + +tab_titles <- list( + "title" = "This is the main Title", + "subtitles" = NULL, + "main_footer" = c( + "footer 1", + "footer 2" + ), + "prov_footer" = NULL +) +tbl1b <- set_titles(tbl1, tab_titles) + +tbl1c <- tbl1 +tab_titles <- list( + "title" = "This is the main Title", + "subtitles" = NULL, + "main_footer" = c( + "~{super a}Canada", + "This ~{optional text should} stay the same" + ), + "prov_footer" = NULL +) +tbl1c <- set_titles(tbl1c, tab_titles) + +rtables::label_at_path(tbl1c, c("COUNTRY", "count_unique_denom_fraction.CAN")) <- + "CAN~[super a]" +rtables::label_at_path(tbl1c, c("COUNTRY", "count_unique_denom_fraction.JPN")) <- + "JPN >=" + +snapshot_test_docx <- function(doc) { + if (Sys.info()[["sysname"]] == "Windows") { + testthat::expect_snapshot(doc$doc_obj$get() |> xml2::xml_child(1) |> as.character()) + } +} + +snapshot_test_flextable <- function(res) { + testthat::expect_true(inherits(res, "flextable")) + if (Sys.info()[["sysname"]] == "Windows") { + testthat::expect_snapshot(res$header) + testthat::expect_snapshot(res$body) + testthat::expect_snapshot(res$footer) + testthat::expect_snapshot(res$col_keys) + testthat::expect_snapshot(res$caption) + testthat::expect_snapshot(res$blanks) + testthat::expect_snapshot(res$properties) + + doc <- officer::read_docx() + doc <- flextable::body_add_flextable(doc, res, align = "center") + snapshot_test_docx(doc) + } +} + + +testthat::test_that("tt_to_flextable_j() works fine with Tables", { + testthat::expect_error( + tt_to_flextable_j(tt = adsl, tblid = "output ID"), + "Input object is not an rtables' or rlistings' object." + ) + + # basic example + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = tbl1, tblid = "output ID") + ) + options(docx.add_datetime = TRUE) + snapshot_test_flextable(res) + + + # example with titles and footers + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = tbl1b, tblid = "output ID") + ) + options(docx.add_datetime = TRUE) + snapshot_test_flextable(res) + + + # example with superscript and >= + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = tbl1c, tblid = "output ID") + ) + options(docx.add_datetime = TRUE) + snapshot_test_flextable(res) + + + # example with alignments + alignments <- list( + list(row = 2, col = 2:4, value = "right"), + list(row = 6:7, col = 2, value = "left"), + list(row = 8, col = 1, value = "right") + ) + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = tbl1, tblid = "output ID", alignments = alignments) + ) + options(docx.add_datetime = TRUE) + snapshot_test_flextable(res) +}) + +testthat::test_that("tt_to_flextable_j() works fine with border_mat", { + adsl2 <- adsl |> dplyr::mutate(colspan_trt = ifelse(ARM == "B: Placebo", " ", "Active Study Agent")) + + colspan_trt_map <- create_colspan_map( + adsl2, + non_active_grp = "B: Placebo", + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = "ARM" + ) + + lyt2 <- basic_table( + top_level_section_div = " ", + show_colcounts = TRUE, + colcount_format = "N=xx" + ) |> + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> + split_cols_by("ARM") |> + analyze( + vars = "COUNTRY", + afun = a_freq_j, + extra_args = extra_args_1 + ) + + tbl2 <- build_table(lyt2, adsl2) + + border_mat <- make_header_bordmat(tbl2) + border_mat[2, 4] <- 1 + + options(docx.add_datetime = FALSE) + flx1 <- tt_to_flextable_j(tt = tbl2, tblid = "output ID") + flx2 <- tt_to_flextable_j(tt = tbl2, tblid = "output ID", border_mat = border_mat) + options(docx.add_datetime = TRUE) + + testthat::expect_equal(flx1$header$styles$cells$border.width.bottom$data[2, 4], c(V4 = 0)) + testthat::expect_equal(flx2$header$styles$cells$border.width.bottom$data[2, 4], c(V4 = 0.75)) + + snapshot_test_flextable(flx2) +}) + +testthat::test_that("tt_to_flextable_j() works fine with round_type", { + lsting <- adae |> + dplyr::select(USUBJID, AGE, SEX, RACE, ARM, BMRKR1) |> + dplyr::distinct() |> + dplyr::group_by(ARM) |> + dplyr::slice_head(n = 2) |> + dplyr::ungroup() + + lsting[1, "BMRKR1"] <- 1.865 + lsting[2, "BMRKR1"] <- 2.985 + lsting[3, "BMRKR1"] <- -0.001 + + lsting <- lsting |> + dplyr::mutate( + AGE = tern::explicit_na(as.character(AGE), ""), + SEX = tern::explicit_na(SEX, ""), + RACE = explicit_na(RACE, ""), + COL0 = explicit_na(.data[["ARM"]], ""), + COL1 = explicit_na(USUBJID, ""), + COL2 = paste(AGE, SEX, RACE, sep = " / "), + COL3 = BMRKR1 + ) |> + arrange(COL0, COL1) + + lsting <- formatters::var_relabel( + lsting, + COL0 = "Treatment Group", + COL1 = "Subject ID", + COL2 = paste("Age (years)", "Sex", "Race", sep = " / "), + COL3 = "Biomarker 1" + ) + + ls1 <- rlistings::as_listing( + df = lsting, + key_cols = c("COL0", "COL1"), + disp_cols = c("COL0", "COL1", "COL2", "COL3"), + col_formatting = list(COL3 = formatters::fmt_config(format = "xx.xx")) + ) + + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = ls1, tblid = "output ID", orientation = "landscape", round_type = "iec") + ) + testthat::expect_equal(res$body$dataset[1, "COL3"], "1.86") + testthat::expect_equal(res$body$dataset[2, "COL3"], "2.98") + testthat::expect_equal(res$body$dataset[3, "COL3"], "-0.00") + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = ls1, tblid = "output ID", orientation = "landscape", round_type = "sas") + ) + testthat::expect_equal(res$body$dataset[1, "COL3"], "1.87") + testthat::expect_equal(res$body$dataset[2, "COL3"], "2.99") + testthat::expect_equal(res$body$dataset[3, "COL3"], "0.00") + options(docx.add_datetime = TRUE) +}) + +testthat::test_that("tt_to_flextable_j() works fine with Listings", { + lsting <- adae |> + dplyr::select(USUBJID, AGE, SEX, RACE, ARM) |> + dplyr::distinct() |> + dplyr::group_by(ARM) |> + dplyr::slice_head(n = 10) |> + dplyr::ungroup() + + + lsting <- lsting |> + dplyr::mutate( + AGE = tern::explicit_na(as.character(AGE), ""), + SEX = tern::explicit_na(SEX, ""), + RACE = explicit_na(RACE, ""), + COL0 = explicit_na(.data[["ARM"]], ""), + COL1 = explicit_na(USUBJID, ""), + COL2 = paste(AGE, SEX, RACE, sep = " / ") + ) |> + arrange(COL0, COL1) + + lsting <- formatters::var_relabel(lsting, + COL0 = "Treatment Group", + COL1 = "Subject ID", + COL2 = paste("Age (years)", "Sex", "Race", sep = " / ") + ) + + ls1 <- rlistings::as_listing( + df = lsting, + key_cols = c("COL0", "COL1"), + disp_cols = c("COL0", "COL1", "COL2") + ) + + # basic example + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = ls1, tblid = "output ID", orientation = "landscape") + ) + options(docx.add_datetime = TRUE) + snapshot_test_flextable(res) + + # example with titles and footers + tab_titles <- list( + "title" = "This is the main Title", + "subtitles" = NULL, + "main_footer" = c( + "footer 1", + "footer 2" + ), + "prov_footer" = NULL + ) + ls1b <- set_titles(ls1, tab_titles) + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = ls1b, tblid = "output ID", orientation = "landscape") + ) + options(docx.add_datetime = TRUE) + snapshot_test_flextable(res) + + # example with superscript and >= + lsting <- adae |> + dplyr::select(USUBJID, AGE, SEX, RACE, ARM) |> + dplyr::distinct() |> + dplyr::group_by(ARM) |> + dplyr::slice_head(n = 10) |> + dplyr::ungroup() + + lsting$ARM <- sub(pattern = "Drug X", replacement = "Drug X~[super b]", x = lsting$ARM) + + lsting <- lsting |> + dplyr::mutate( + AGE = tern::explicit_na(as.character(AGE), ""), + SEX = tern::explicit_na(SEX, ""), + RACE = explicit_na(RACE, ""), + COL0 = explicit_na(.data[["ARM"]], ""), + COL1 = explicit_na(USUBJID, ""), + COL2 = paste(AGE, SEX, RACE, sep = " / ") + ) |> + arrange(COL0, COL1) + + lsting <- formatters::var_relabel(lsting, + COL0 = "Treatment Group", + COL1 = "Subject ID", + COL2 = paste("Age~[super a]", "Sex", "Race", sep = " / ") + ) + + ls1c <- rlistings::as_listing( + df = lsting, + key_cols = c("COL0", "COL1"), + disp_cols = c("COL0", "COL1", "COL2") + ) + + tab_titles <- list( + "title" = "This is the main Title", + "subtitles" = NULL, + "main_footer" = c( + "~{super a}Age in years", + "~{super b}Xanomeline with dose >= 20mg", + "This ~{optional text should} stay the same" + ), + "prov_footer" = NULL + ) + ls1c <- set_titles(ls1c, tab_titles) + + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + res <- tt_to_flextable_j(tt = ls1c, tblid = "output ID", orientation = "landscape") + ) + options(docx.add_datetime = TRUE) + snapshot_test_flextable(res) +}) + +# to compare 2 docx +# - open the docx in R and get the XML +# - treat the XML content as string +# - use snapshot testing against the string +testthat::test_that("remove_security_popup_page_numbers() removes dirty='true'", { + doc <- officer::read_docx() + section_properties <- officer::prop_section( + page_size = officer::page_size(width = 11, height = 8.5, orient = "landscape"), + page_margins = officer::page_mar(bottom = 1, top = 1, right = 1, left = 1, gutter = 0, footer = 1, header = 1) + ) + + # add the page numbers + formatted_par <- + officer::fpar("Listing Page ", + officer::run_word_field("Page", + prop = officer::fp_text(font.size = 8, font.family = "Times New Roman") + ), + " of ", + officer::run_word_field("NumPages", + prop = officer::fp_text(font.size = 8, font.family = "Times New Roman") + ), + fp_p = officer::fp_par(text.align = "right", padding.top = 12), + fp_t = officer::fp_text(font.size = 8, font.family = "Times New Roman") + ) + footer_default <- officer::block_list(formatted_par) + section_properties$footer_default <- footer_default + doc <- officer::body_set_default_section(doc, section_properties) + + l_1 <- xml2::xml_find_all(doc$doc_obj$get(), ".//w:instrText[@w:dirty='true'] | .//w:fldChar[@w:dirty='true']") + + junco:::remove_security_popup_page_numbers(doc = doc, tlgtype = "something different than Listing") + l_2 <- xml2::xml_find_all(doc$doc_obj$get(), ".//w:instrText[@w:dirty='true'] | .//w:fldChar[@w:dirty='true']") + + junco:::remove_security_popup_page_numbers(doc = doc, tlgtype = "Listing") + l_3 <- xml2::xml_find_all(doc$doc_obj$get(), ".//w:instrText[@w:dirty='true'] | .//w:fldChar[@w:dirty='true']") + + testthat::expect_equal(length(l_1), 6) + testthat::expect_equal(length(l_2), 6) + testthat::expect_equal(length(l_3), 0) +}) + +testthat::test_that("add_title_style_caption() adds a new XML node w:pStyle w:val='Caption'", { + options(docx.add_datetime = FALSE) + flx <- tt_to_flextable_j(tt = tbl1, tblid = "output ID") + options(docx.add_datetime = TRUE) + + # nolint start + flx <- junco:::insert_title_hanging_indent_v3(flx, "output id:this is a veeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeery long title") + # nolint end + flx <- flx |> flextable::set_table_properties(layout = "autofit") + doc <- officer::read_docx(system.file("template_file.docx", package = "junco")) + doc <- flextable::body_add_flextable(doc, flx, align = "center") + + l_x_before <- xml2::xml_find_all(doc$doc_obj$get(), ".//w:pStyle[@w:val='Caption']") + + string_to_look_for <- sub(pattern = ":\t.*", replacement = ":", flx$header$dataset[1, 1]) + add_title_style_caption(doc, string_to_look_for) + + # this print() is needed to update the XML and be able to retrieve the newly inserted node + # with style Caption + temp_file <- tempfile(fileext = ".docx") + print(doc, target = temp_file) + + + # w:pStyle w:val="Caption" + l_x_after <- xml2::xml_find_all(doc$doc_obj$get(), ".//w:pStyle[@w:val='Caption']") + + testthat::expect_equal(length(l_x_before), 0) + testthat::expect_equal(length(l_x_after), 1) +}) + +testthat::test_that("my_pg_width_by_orient() returns what it should", { + res <- junco:::my_pg_width_by_orient(orientation = "portrait") + testthat::expect_equal(res, 6.38) + res <- junco:::my_pg_width_by_orient(orientation = "landscape") + testthat::expect_equal(res, 8.88) +}) + +testthat::test_that("insert_footer_text() adds a footer line to a flextable", { + options(docx.add_datetime = FALSE) + flx <- tt_to_flextable_j(tt = tbl1c, tblid = "output ID") + options(docx.add_datetime = TRUE) + n_footer_lines_1 <- flx |> flextable::nrow_part(part = "footer") + footer_lines_1 <- flx$footer$dataset + + options(docx.add_datetime = FALSE) + flx <- insert_footer_text(flx, "output ID") + options(docx.add_datetime = TRUE) + n_footer_lines_2 <- flx |> flextable::nrow_part(part = "footer") + footer_lines_2 <- flx$footer$dataset + + flx <- insert_footer_text(flx, "output ID") + n_footer_lines_3 <- flx |> flextable::nrow_part(part = "footer") + footer_lines_3 <- flx$footer$dataset + + testthat::expect_equal(n_footer_lines_1, n_footer_lines_2) + testthat::expect_true(all.equal(footer_lines_1, footer_lines_2)) + + testthat::expect_equal(n_footer_lines_1 + 1, n_footer_lines_3) + testthat::expect_true(all.equal(footer_lines_1, footer_lines_3 |> head(n_footer_lines_1))) +}) + +testthat::test_that("interpret_cell_content() returns what it should", { + res <- junco:::interpret_cell_content("Any AE~[super a]~[sub bds]") + expected_res <- "flextable::as_paragraph('Any AE', flextable::as_sup('a'), '', flextable::as_sub('bds'))" + testthat::expect_equal(res, expected_res) + + res <- junco:::interpret_cell_content("Any AE~{super a}~[sub bds]other ~{super b}b") + # nolint start + expected_res <- "flextable::as_paragraph('Any AE', flextable::as_sup('a'), '', flextable::as_sub('bds'), 'other ', flextable::as_sup('b'), 'b')" + # nolint end + testthat::expect_equal(res, expected_res) + + res <- + junco:::interpret_cell_content("~{super a} The event experienced by the subject with the worst severity is used.") + # nolint start + expected_res <- "flextable::as_paragraph('', flextable::as_sup('a'), ' The event experienced by the subject with the worst severity is used.')" + # nolint end + testthat::expect_equal(res, expected_res) + + # nolint start + res <- junco:::interpret_cell_content("Note: Adverse events are coded using MedDRA version 26.0.~{optional ; toxicity grade is evaluated according to NCI-CTCAE version &ctcae.}.") + expected_res <- "flextable::as_paragraph('Note: Adverse events are coded using MedDRA version 26.0.', '; toxicity grade is evaluated according to NCI-CTCAE version &ctcae.', '.')" + # nolint end + testthat::expect_equal(res, expected_res) +}) + +testthat::test_that("interpret_all_cell_content() is interpreting markups correctly", { + options(docx.add_datetime = FALSE) + flx <- tt_to_flextable_j(tt = tbl1, tblid = "output ID") + options(docx.add_datetime = TRUE) + + flx <- insert_title_hanging_indent_v3(flx, + title = "This is the main Ttl~[super a]" + ) + + flx <- flx |> + flextable::append_chunks(part = "header", i = 2, j = 2, flextable::as_chunk("~[super b]")) |> + flextable::append_chunks(part = "body", i = 2, j = 1, flextable::as_chunk("~[sub c]")) + + flx <- flx |> + flextable::add_footer_lines("~[super a]Title") |> + flextable::add_footer_lines("~{super b}Drug = Xanomeline") |> + flextable::add_footer_lines("~[super c]United States of America") + + flx <- flx |> + flextable::align(part = "footer", align = "left") |> + flextable::fontsize(part = "footer", size = 8) |> + flextable::padding(part = "footer", padding = 0) + + res <- interpret_all_cell_content(flx) + + snapshot_test_flextable(res) +}) + +testthat::test_that("insert_title_hanging_indent_v3() adds the title correctly", { + options(docx.add_datetime = FALSE) + flx <- tt_to_flextable_j(tt = tbl1, tblid = "output ID") + options(docx.add_datetime = TRUE) + + res <- insert_title_hanging_indent_v3(flx, "output id:this is a test title") + snapshot_test_flextable(res) +}) + + +testthat::test_that("add_hanging_indent_first_column() works correctly", { + options(docx.add_datetime = FALSE) + flx <- tt_to_flextable_j(tt = tbl1, tblid = "output ID") + options(docx.add_datetime = TRUE) + + flx$body$dataset[1, 1] <- "Republic of China" + flx$body$dataset[2, 1] <- "United States of America" + + res <- add_hanging_indent_first_column(flx, 0.7) + snapshot_test_flextable(res) +}) + +testthat::test_that("wrap_string_with_indent() works correctly", { + res <- junco:::wrap_string_with_indent("this is a veeeeeeeeeeeeeeery long string", max_width_inch = 1) + expected_res <- "this is a\n\tveeeeeeeeeeeeeeery\n\tlong string" + testthat::expect_equal(res, expected_res) + + res <- junco:::wrap_string_with_indent("Study agent permanently discontinued", + max_width_inch = 1.99 - 0.375, dpi = 78 + ) + expected_res <- "Study agent permanently\n\tdiscontinued" + testthat::expect_equal(res, expected_res) + + res <- junco:::wrap_string_with_indent("Resulting in persistent or significant disability/incapacity", + max_width_inch = 1.98 - 0.125, dpi = 78 + ) + expected_res <- "Resulting in persistent or significant\n\tdisability/incapacity" + testthat::expect_equal(res, expected_res) +}) + + +testthat::test_that("add_little_gap_bottom_borders_spanning_headers() works correctly", { + options(docx.add_datetime = FALSE) + flx <- tt_to_flextable_j(tt = tbl1, tblid = "output ID") + options(docx.add_datetime = TRUE) + + + flx <- flx |> + flextable::add_header_row( + values = c("spanning header 1", "spanning header 2"), + colwidths = c(2, 2) + ) + flx <- flx |> flextable::align(part = "header", i = 1, align = "center") + + testthat::expect_no_error( + res <- add_little_gap_bottom_borders_spanning_headers(flx) + ) + snapshot_test_flextable(res) +}) + + +testthat::test_that("export_as_docx_j() works with pagination", { + # create a TableTree with a few pages + colspan_trt_map <- data.frame( + colspan_trt = c("Active Study Agent", "Active Study Agent", " "), + ARM = c("A: Drug X", "C: Combination", "B: Placebo") + ) + df <- ex_adlb |> dplyr::mutate(colspan_trt = ifelse(ARM == "B: Placebo", " ", "Active Study Agent")) + df$colspan_trt <- factor(df$colspan_trt, levels = c("Active Study Agent", " ")) + .trtvar <- "ARM" + df <- df |> dplyr::mutate(AGEGRP = ifelse(AGE >= 35, ">= 35", "< 35")) + df$AGEGRP <- factor(df$AGEGRP, levels = c("< 35", ">= 35")) + .subgrpvar <- "AGEGRP" + .subgrplbl <- "Age: %s years" + multivars <- c("AVAL", "AVAL", "CHG") + .ctrl_grp <- "B: Placebo" + .ref_path <- c("colspan_trt", " ", .trtvar, .ctrl_grp) + extra_args_3col <- list( + format_na_str = rep("NA", 3), + d = "decimal", + ref_path = .ref_path, + ancova = FALSE, + comp_btw_group = TRUE, + indatavar = "inlbdata", + multivars = multivars + ) + df$rrisk_header <- "Difference in Mean Change (95% CI)" + df$rrisk_label <- paste(df[[.trtvar]], paste("vs", .ctrl_grp)) + df$STUDYID <- df$STUDYID |> as.factor() + df <- df |> filter(!is.na(CHG), LBCAT == "CHEMISTRY") + df$inlbdata <- "Y" + + df_alt <- ex_adsl |> dplyr::mutate(colspan_trt = ifelse(ARM == "B: Placebo", " ", "Active Study Agent")) + df_alt$colspan_trt <- factor(df_alt$colspan_trt, levels = c("Active Study Agent", " ")) + df_alt$rrisk_header <- "Difference in Mean Change (95% CI)" + df_alt$STUDYID <- df_alt$STUDYID |> as.factor() + + lyt <- basic_table(show_colcounts = FALSE, colcount_format = "N=xx") |> + ### first columns + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) |> + split_cols_by(.trtvar, show_colcounts = TRUE, colcount_format = "N=xx") |> + split_rows_by(.subgrpvar, + label_pos = "hidden", section_div = " ", + split_fun = drop_split_levels, page_by = TRUE + ) |> + ### just show number of subjects in current level of subgrpvar + ### only show this number in the first AVAL column + summarize_row_groups( + var = .subgrpvar, cfun = a_freq_j, + extra_args = list( + label_fstr = .subgrplbl, + extrablankline = TRUE, + restr_columns = "AVAL", + .stats = c("n_altdf"), + riskdiff = FALSE, denom_by = .subgrpvar + ) + ) |> + split_rows_by("PARAM", + label_pos = "topleft", split_label = "Laboratory Test", + section_div = " ", split_fun = drop_split_levels + ) |> + ## note the child_labels = hidden for AVISIT, these labels will be taken care off by + ## applying function summarize_aval_chg_diff further in the layout + split_rows_by("AVISIT", + label_pos = "topleft", split_label = "Study Visit", + split_fun = drop_split_levels, child_labels = "hidden" + ) |> + ## set up a 3 column split + split_cols_by_multivar(multivars, + varlabels = c("n/N (%)", "Mean (95% CI)", "Mean Change From Baseline (95% CI)") + ) |> + ### restart for the rrisk_header columns - note the nested = FALSE option + ### also note the child_labels = "hidden" in both PARAM and AVISIT + split_cols_by("rrisk_header", nested = FALSE) |> + split_cols_by( + .trtvar, + split_fun = remove_split_levels(.ctrl_grp), + labels_var = "rrisk_label", + show_colcounts = TRUE, + colcount_format = "N=xx" + ) |> + ### difference columns : just 1 column & analysis needs to be done on change + split_cols_by_multivar(multivars[3], varlabels = c(" ")) |> + ### the variable passed here in analyze is not used (STUDYID), it is a dummy var passing, + ### the function summarize_aval_chg_diff grabs the required vars from cols_by_multivar calls + analyze("STUDYID", afun = a_summarize_aval_chg_diff_j, extra_args = extra_args_3col) + suppressMessages( + result <- build_table(lyt, df, alt_counts_df = df_alt) + ) + tab_titles <- list( + "title" = "This is the main Title", + "subtitles" = NULL, + "main_footer" = c( + "footer 1", + "footer 2" + ), + "prov_footer" = NULL + ) + result <- set_titles(result, tab_titles) + + + # export it as docx + output_dir <- tempdir() + options(docx.add_datetime = FALSE) + export_as_docx_j( + result, + output_dir = output_dir, + orientation = "landscape", + tblid = "test1234", + nosplitin = list(cols = c(.trtvar, "rrisk_header")), + paginate = TRUE, + add_page_break = TRUE, + combined_docx = TRUE + ) + options(docx.add_datetime = TRUE) + + # check that the files exist, including the allparts + testthat::expect_true(file.exists(paste0(output_dir, "/test1234part1of2.docx"))) + testthat::expect_true(file.exists(paste0(output_dir, "/test1234part2of2.docx"))) + testthat::expect_true(file.exists(paste0(output_dir, "/test1234allparts.docx"))) + + # open the files and check the XML + doc <- officer::read_docx(paste0(output_dir, "/test1234part1of2.docx")) + snapshot_test_docx(doc) + + doc <- officer::read_docx(paste0(output_dir, "/test1234part2of2.docx")) + snapshot_test_docx(doc) + + doc <- officer::read_docx(paste0(output_dir, "/test1234allparts.docx")) + snapshot_test_docx(doc) + + file.remove(c( + paste0(output_dir, "/test1234part1of2.docx"), + paste0(output_dir, "/test1234part2of2.docx"), + paste0(output_dir, "/test1234allparts.docx") + )) +}) + + +testthat::test_that("export_graph_as_docx() works with basic example", { + # create a few ggplots + cbbPalette <- c("#000000", "#E69F00", "#0072B2") + + g_facet <- function(df) { + # bar plot in facet ------------------------------------- + plot1 <- df |> + ggplot(aes(x = .data$trt_abb, y = .data$pern, fill = .data$TRT01A)) + + geom_col(position = position_dodge(0.5)) + + geom_text(aes(label = perc), position = position_dodge(0.5), vjust = -0.5) + + facet_wrap(~ .data$cat, nrow = 1, strip.position = "bottom") + + + # assign colorblind friendly palette + scale_fill_manual(values = cbbPalette) + + labs(x = " ", y = "Percentage of Subjects") + + theme_bw() + + theme( + text = element_text(size = 9, color = "black"), + strip.background = element_rect(fill = NA, color = "black"), + strip.placement = "outside", + strip.text = element_text(size = 9), + legend.position = "bottom", + legend.title = element_blank(), + legend.key.size = unit(5, "mm"), + legend.box.background = element_rect(colour = "black", linewidth = 0.5), + legend.text = element_text(size = 9), + panel.spacing.x = unit(0, "line"), + panel.grid.major.x = element_blank(), + panel.border = element_blank(), + axis.line = element_line(), + axis.text.x = element_text(angle = 320, vjust = -1), + axis.text = element_text(size = 9), + axis.title = element_text(size = 9) + ) + } + + df1 <- data.frame( + cat = factor(c( + rep("0 to <3 months", 3), + rep("3 to <6 months", 3), + rep("6 to <9 months", 3), + rep("9 to <12 months", 3), + rep("12 to <15 months", 3), + rep("15 to <18 months", 3), + rep("18 to <21 months", 3) + ), levels = c( + "0 to <3 months", "3 to <6 months", "6 to <9 months", + "9 to <12 months", "12 to <15 months", "15 to <18 months", "18 to <21 months" + )), + TRT01A = factor(c("Xanomeline (High)", "Xanomeline (Low)", "Placebo (PBO)"), + levels = c("Xanomeline (High)", "Xanomeline (Low)", "Placebo (PBO)") + ), + trt_abb = c("Xan Low", "Xan High", "PBO"), + n = c(7, 4, 2, 5, 5, 5, 3, 3, 7, 4, 2, 7, 6, 8, 5, 3, 10, 3, 5, 4, 5), + total = c( + 53, 73, 59, 53, 73, 59, 53, 73, 59, 53, 73, 59, 53, 73, 59, 53, + 73, 59, 53, 73, 59 + ), + pern = c( + 13.2, 5.5, 3.4, 9.4, 6.8, 8.5, 5.7, 4.1, 11.9, 7.5, 2.7, + 11.9, 11.3, 11.0, 8.5, 5.7, 13.7, 5.1, 9.4, 5.5, 8.5 + ) + ) + df1$perc <- sprintf("%.1f", df1$pern) + + df2 <- data.frame( + cat = factor(c( + rep("21 to <24 months", 3), + rep("24 to <27 months", 3), + rep("27 to <30 months", 3), + rep("30 to <33 months", 3), + rep("33 to <36 months", 3), + rep("36 to <39 months", 3) + ), levels = c( + "21 to <24 months", "24 to <27 months", "27 to <30 months", + "30 to <33 months", "33 to <36 months", "36 to <39 months" + )), + TRT01A = factor(c("Xanomeline (High)", "Xanomeline (Low)", "Placebo (PBO)"), + levels = c("Xanomeline (High)", "Xanomeline (Low)", "Placebo (PBO)") + ), + trt_abb = c("Xan Low", "Xan High", "PBO"), + n = c(1, 7, 5, 3, 6, 6, 6, 9, 2, 5, 4, 3, 5, 9, 5, 0, 2, 4), + total = c(53, 73, 59, 53, 73, 59, 53, 73, 59, 53, 73, 59, 53, 73, 59, 53, 73, 59), + pern = c(1.9, 9.6, 8.5, 5.7, 8.2, 10.2, 11.3, 12.3, 3.4, 9.4, 5.5, 5.1, 9.4, 12.3, 8.5, 0.0, 2.7, 6.8) + ) + df2$perc <- sprintf("%.1f", df2$pern) + + p1 <- g_facet(df1) + p2 <- g_facet(df2) + + # save the ggplots as png + output_dir <- tempdir() + pn1 <- paste0(output_dir, "/", "temp_1.png") + png(pn1, + width = 22, + height = 14, + units = "cm", + res = 300, + type = "cairo" + ) + print(p1) + dev.off() + + pn2 <- paste0(output_dir, "/", "temp_2.png") + png(pn2, + width = 22, + height = 14, + units = "cm", + res = 300, + type = "cairo" + ) + print(p2) + dev.off() + + + # export them as docx + options(docx.add_datetime = FALSE) + testthat::expect_no_error( + export_graph_as_docx( + plotnames = list(pn1, pn2), + tblid = "testgraph1234", + output_dir = output_dir, + orientation = "landscape", + title = "Duration of Treatment; Safety Analysis Set (Study jjcs - core)", + footers = NULL + ) + ) + options(docx.add_datetime = TRUE) + output_docx <- paste0(output_dir, "/testgraph1234.docx") + + # check that the file exist + testthat::expect_true(file.exists(output_docx)) + + # open the file and check the XML + doc <- officer::read_docx(output_docx) + snapshot_test_docx(doc) + + file.remove(c(pn1, pn2, output_docx)) +}) diff --git a/tests/testthat/test-event_free.R b/tests/testthat/test-event_free.R index cbc36fc0..aa3fd105 100644 --- a/tests/testthat/test-event_free.R +++ b/tests/testthat/test-event_free.R @@ -1,6 +1,6 @@ test_that("s_event_free works with default arguments", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 @@ -19,8 +19,8 @@ test_that("s_event_free works with default arguments", { }) test_that("s_event_free works with percent format", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 @@ -40,14 +40,14 @@ test_that("s_event_free works with percent format", { }) test_that("a_event_free works with default arguments in a table layout", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 ) - lyt <- basic_table() %>% + lyt <- basic_table(round_type = "sas") |> split_cols_by(var = "ARMCD") for (time_point in c(3, 4, 5)) { lyt <- lyt |> @@ -72,14 +72,14 @@ test_that("a_event_free works with default arguments in a table layout", { }) test_that("a_event_free works with customized arguments in a table layout", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 ) - lyt <- basic_table() %>% + lyt <- basic_table(round_type = "sas") |> split_cols_by(var = "ARMCD") for (time_point in c(5, 1, 7)) { lyt <- lyt |> diff --git a/tests/testthat/test-get_ref_info.R b/tests/testthat/test-get_ref_info.R index 05cb494e..a53cee44 100644 --- a/tests/testthat/test-get_ref_info.R +++ b/tests/testthat/test-get_ref_info.R @@ -47,7 +47,7 @@ test_that("get_ref_info works with a df analysis function", { # Define the global reference group. ref_path <- c("colspan_trt", " ", "ARM", "B: Placebo") - lyt <- basic_table() |> + lyt <- basic_table(round_type = "sas") |> split_cols_by( "colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map) @@ -62,7 +62,7 @@ test_that("get_ref_info works with a df analysis function", { expect_snapshot(result) # Compare with non-hierarchical layout. - std_lyt <- basic_table() |> + std_lyt <- basic_table(round_type = "sas") |> split_cols_by("ARM", ref_group = "B: Placebo") |> analyze( "AGE", @@ -109,7 +109,7 @@ test_that("get_ref_info works with a vector analysis function", { # Define the global reference group. ref_path <- c("colspan_trt", " ", "ARM", "B: Placebo") - lyt <- basic_table() |> + lyt <- basic_table(round_type = "sas") |> split_cols_by( "colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map) @@ -124,7 +124,7 @@ test_that("get_ref_info works with a vector analysis function", { expect_snapshot(result) # Compare with non-hierarchical layout. - std_lyt <- basic_table() |> + std_lyt <- basic_table(round_type = "sas") |> split_cols_by("ARM", ref_group = "B: Placebo") |> analyze( c("AGE", "BMRKR1"), diff --git a/tests/testthat/test-h_freq_funs.R b/tests/testthat/test-h_freq_funs.R index 725a37b2..82e0f2c0 100644 --- a/tests/testthat/test-h_freq_funs.R +++ b/tests/testthat/test-h_freq_funs.R @@ -199,3 +199,78 @@ test_that("h_subset_combo works correctly", { }) # TODO: fix this test_that("h_create_altdf works correctly") + +test_that("h_restrict_val works if there are more values in df_row than in map", { + df_row <- data.frame( + Group = c("A", "A", "B", "B"), + Value = c(1, 2, 1, 2) + ) + label_map <- data.frame( + value = c("A", "C"), + label = c("Label A", "Label C") + ) + result <- h_restrict_val( + df_row, + .var = "Group", + label_map = label_map, + split_info = list(split = "root", value = "root") + ) + expected <- NULL + expect_identical(result, expected) + # TODO: Is it correct that we want NULL here as result? +}) + +test_that("h_restrict_val works if there are less values in df_row than in map", { + df_row <- data.frame( + Group = c("A", "A", "B", "B"), + Value = c(1, 2, 1, 2) + ) + label_map <- data.frame( + value = c("A", "B", "C"), + label = c("Label A", "Label B", "Label C") + ) + result <- h_restrict_val( + df_row, + .var = "Group", + label_map = label_map, + split_info = list(split = "root", value = "root") + ) + expected <- c("A", "B", "C") + expect_identical(result, expected) +}) + +test_that("h_restrict_val works with row split", { + df_row <- data.frame( + Visit = c("Baseline", "Week 1", "Baseline", "Week 1"), + Group = c("A", "A", "B", "B"), + Value = c(1, 2, 1, 2) + ) + label_map <- data.frame( + Visit = rep(c("Baseline", "Week 1"), each = 3), + value = c("A", "B", "C", "D", "E", "F"), + label = c("Label A", "Label B", "Label C", "Label D", "Label E", "Label F") + ) + result <- h_restrict_val( + df_row, + .var = "Group", + label_map = label_map, + split_info = data.frame( + split = c("root", "Visit"), + value = c("root", "Baseline") + ) + ) + expected <- c("A", "B", "C") + expect_identical(result, expected) + + result2 <- h_restrict_val( + df_row, + .var = "Group", + label_map = label_map, + split_info = data.frame( + split = c("root", "Visit"), + value = c("root", "Week 1") + ) + ) + expected2 <- c("D", "E", "F") + expect_identical(result2, expected2) +}) diff --git a/tests/testthat/test-jjcs_num_formats.R b/tests/testthat/test-jjcs_num_formats.R index d68273cd..0f7213a8 100644 --- a/tests/testthat/test-jjcs_num_formats.R +++ b/tests/testthat/test-jjcs_num_formats.R @@ -29,90 +29,94 @@ test_that("jjcs_num_formats works", { # jjcsformat_xx_SAS/R format tests expect_snapshot({ - format_value(values, format = jjcsformat_xx_SAS("xx.x (xx.xx)")) - format_value(values, format = jjcsformat_xx_R("xx.x (xx.xx)")) - format_value(c(5.05, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.xx)")) - format_value(c(5.05, values[2]), format = jjcsformat_xx_R("xx.x (xx.xx)")) - format_value(c(5.15, values[2]), format = jjcsformat_xx_R("xx.x (xx.xx)")) + format_value(values, format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "iec") + format_value(c(5.05, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "sas") + format_value(c(5.05, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "iec") + format_value(c(5.15, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "iec") format_value(c(5.15, values[2]), format = "xx.x (xx.x)") - format_value(c(4.15, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.xx)")) - format_value(c(4.15, values[2]), format = jjcsformat_xx_R("xx.x (xx.xx)")) + format_value(c(4.15, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "sas") + format_value(c(4.15, values[2]), format = jjcsformat_xx("xx.x (xx.xx)"), round_type = "iec") format_value(c(4.15, values[2]), format = "xx.x (xx.x)") - format_value(c(4.15, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.x)")) + format_value(c(4.15, values[2]), format = jjcsformat_xx("xx.x (xx.x)"), round_type = "sas") format_value(c(3.15, values[2]), format = "xx.x (xx.x)") - format_value(c(3.15, values[2]), format = jjcsformat_xx_SAS("xx.x (xx.x)")) - format_value(c(3.15, values[2]), format = jjcsformat_xx_R("xx.x (xx.x)")) + format_value(c(3.15, values[2]), format = jjcsformat_xx("xx.x (xx.x)"), round_type = "sas") + format_value(c(3.15, values[2]), format = jjcsformat_xx("xx.x (xx.x)"), round_type = "iec") }) # jjcsformat_xx_SAS format tests expect_snapshot({ - format_value(values, format = jjcsformat_xx_SAS("xx / xx")) - format_value(values, format = jjcsformat_xx_SAS("xx. / xx.")) - format_value(values, format = jjcsformat_xx_SAS("xx.x / xx.x")) - format_value(values, format = jjcsformat_xx_SAS("xx.xx / xx.xx")) - format_value(values, format = jjcsformat_xx_SAS("xx.xxx / xx.xxx")) - format_value(values, format = jjcsformat_xx_SAS("(xx, xx)")) - format_value(values, format = jjcsformat_xx_SAS("(xx., xx.)")) - format_value(values, format = jjcsformat_xx_SAS("(xx.x, xx.x)")) - format_value(values, format = jjcsformat_xx_SAS("(xx.xx, xx.xx)")) - format_value(values, format = jjcsformat_xx_SAS("(xx.xxx, xx.xxx)")) - format_value(values, format = jjcsformat_xx_SAS("(xx.xxxx, xx.xxxx)")) - format_value(values, format = jjcsformat_xx_SAS("xx - xx")) - format_value(values, format = jjcsformat_xx_SAS("xx.x - xx.x")) - format_value(values, format = jjcsformat_xx_SAS("xx.xx - xx.xx")) - format_value(values, format = jjcsformat_xx_SAS("xx (xx)")) - format_value(values, format = jjcsformat_xx_SAS("xx (xx.)")) - format_value(values, format = jjcsformat_xx_SAS("xx (xx.x)")) - format_value(values, format = jjcsformat_xx_SAS("xx (xx.xx)")) - format_value(values, format = jjcsformat_xx_SAS("xx. (xx.)")) - format_value(values, format = jjcsformat_xx_SAS("xx.x (xx.x)")) - format_value(values, format = jjcsformat_xx_SAS("xx.xx (xx.xx)")) - format_value(values, format = jjcsformat_xx_SAS("xx.x, xx.x")) - format_value(values, format = jjcsformat_xx_SAS("xx.x to xx.x")) + format_value(values, format = jjcsformat_xx("xx / xx"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx. / xx."), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.x / xx.x"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.xx / xx.xx"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.xxx / xx.xxx"), round_type = "sas") + format_value(values, format = jjcsformat_xx("(xx, xx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("(xx., xx.)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("(xx.x, xx.x)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("(xx.xx, xx.xx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("(xx.xxx, xx.xxx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("(xx.xxxx, xx.xxxx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx - xx"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.x - xx.x"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.xx - xx.xx"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx (xx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx (xx.)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx (xx.x)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx (xx.xx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx. (xx.)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.x (xx.x)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.xx (xx.xx)"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.x, xx.x"), round_type = "sas") + format_value(values, format = jjcsformat_xx("xx.x to xx.x"), round_type = "sas") format_value( c(values, 10.1235), - format = jjcsformat_xx_SAS("xx. (xx. - xx.)") + format = jjcsformat_xx("xx. (xx. - xx.)"), + round_type = "sas" ) format_value( c(values, 10.1235), - format = jjcsformat_xx_SAS("xx.x (xx.x - xx.x)") + format = jjcsformat_xx("xx.x (xx.x - xx.x)"), + round_type = "sas" ) format_value( c(values, 10.1235), - format = jjcsformat_xx_SAS("xx.xx (xx.xx - xx.xx)") + format = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), + round_type = "sas" ) format_value( c(values, 10.1235), - format = jjcsformat_xx_SAS("xx.xxx (xx.xxx - xx.xxx)") + format = jjcsformat_xx("xx.xxx (xx.xxx - xx.xxx)"), + round_type = "sas" ) - format_value(NULL, jjcsformat_xx_SAS("xx")) - format_value(c(500), jjcsformat_xx_SAS("N=xx")) - format_value(c(500), jjcsformat_xx_SAS("(N=xx)")) + format_value(NULL, jjcsformat_xx("xx"), round_type = "sas") + format_value(c(500), jjcsformat_xx("N=xx"), round_type = "sas") + format_value(c(500), jjcsformat_xx("(N=xx)"), round_type = "sas") }) ## errors expect_error( - format_value(5.1, jjcsformat_xx_SAS("abcd")), + format_value(5.1, jjcsformat_xx("abcd")), "input str must contain xx" ) expect_error( - format_value(5.1, jjcsformat_xx_SAS("xx - xx")), - "jjcs_format_xx must contain same number of xx as the number of stats" + format_value(5.1, jjcsformat_xx("xx + xx")), + "jjcsformat_xx must contain same number of xx as the number of stats" ) expect_error( - format_value(c(5.1, 2, 3), jjcsformat_xx_SAS("xx - xx")), - "jjcs_format_xx must contain same number of xx as the number of stats" + format_value(c(5.1, 2, 3), jjcsformat_xx("xx + xx")), + "jjcsformat_xx must contain same number of xx as the number of stats" ) ## trailing 0s are correct expect_snapshot({ - format_value(0, jjcsformat_xx_SAS("xx.")) - format_value(0, jjcsformat_xx_SAS("xx.x")) - format_value(0, jjcsformat_xx_SAS("xx.xx")) - format_value(0, jjcsformat_xx_SAS("xx.xxx")) - format_value(0, jjcsformat_xx_SAS("xx.xxxx")) + format_value(0, jjcsformat_xx("xx."), round_type = "sas") + format_value(0, jjcsformat_xx("xx.x"), round_type = "sas") + format_value(0, jjcsformat_xx("xx.xx"), round_type = "sas") + format_value(0, jjcsformat_xx("xx.xxx"), round_type = "sas") + format_value(0, jjcsformat_xx("xx.xxxx"), round_type = "sas") }) }) @@ -121,29 +125,32 @@ test_that("jjcsformats NA works", { ## handling NAs expect_snapshot({ - format_value(NA, jjcsformat_xx_SAS("xx."), na_str = "-") - format_value(NA, jjcsformat_xx_SAS("xx"), na_str = "-") + format_value(NA, jjcsformat_xx("xx."), round_type = "sas", na_str = "-") + format_value(NA, jjcsformat_xx("xx"), round_type = "sas", na_str = "-") }) expect_error( - format_value(c(1, NA), jjcsformat_xx_SAS("xx")), - "jjcs_format_xx must contain same number of xx as the number of stats" + format_value(c(1, NA), format = jjcsformat_xx("xx.x (xx.x - xx.x"), round_type = "sas"), + "jjcsformat_xx must contain same number of xx as the number of stats" ) expect_snapshot({ format_value( c(1.2, NA, NA), - jjcsformat_xx_SAS("xx.x (xx.x - xx.x)"), - na_str = "NA" + jjcsformat_xx("xx.x (xx.x - xx.x)"), + round_type = "sas", + na_str = "NE" ) format_value( c(1.2, NA, NA), - jjcsformat_xx_SAS("xx.x (xx.x - xx.x)"), + jjcsformat_xx("xx.x (xx.x - xx.x)"), + round_type = "sas", na_str = "x" ) format_value( c(NA, NA, NA), - jjcsformat_xx_SAS("xx.x (xx.x - xx.x)"), + jjcsformat_xx("xx.x (xx.x - xx.x)"), + round_type = "sas", na_str = "x" ) }) @@ -151,51 +158,59 @@ test_that("jjcsformats NA works", { expect_snapshot({ format_value( c(NA, NA), - format = jjcsformat_xx_SAS("xx.x - xx.x"), + format = jjcsformat_xx("xx.x - xx.x"), + round_type = "sas", na_str = c("hi", "lo") ) format_value( c(NA, 5.2), - format = jjcsformat_xx_SAS("xx.x - xx.x"), + format = jjcsformat_xx("xx.x - xx.x"), + round_type = "sas", na_str = "what" ) format_value( c(NA, 5.2), - format = jjcsformat_xx_SAS("xx.x - xx.x"), + format = jjcsformat_xx("xx.x - xx.x"), + round_type = "sas", na_str = c("hi", "lo") ) format_value( c(NA, NA), - format = jjcsformat_xx_SAS("xx.x - xx.x"), + format = jjcsformat_xx("xx.x - xx.x"), + round_type = "sas", na_str = "what" ) }) expect_snapshot({ - format_value(NA, format = jjcsformat_xx_SAS("xx.x"), na_str = character()) - format_value(NA, format = jjcsformat_xx_SAS("xx.x"), na_str = NA_character_) + format_value(NA, format = jjcsformat_xx("xx.x"), round_type = "sas", na_str = character()) + format_value(NA, format = jjcsformat_xx("xx.x"), round_type = "sas", na_str = NA_character_) }) # 3 d formats expect_snapshot({ format_value( c(6.23, NA, NA), - format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), + format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = "-" ) format_value( c(NA, NA, NA), - format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), + format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = "-" ) format_value( c(6.23, NA, NA), - format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), + format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = c("-", "x", "x") ) format_value( c(6.23, NA, NA), - format = jjcsformat_xx_SAS("xx.x (xx.xx, xx.xx)"), + format = jjcsformat_xx("xx.x (xx.xx, xx.xx)"), + round_type = "sas", na_str = c("-", "x", "y") ) }) @@ -203,33 +218,42 @@ test_that("jjcsformats NA works", { test_that("jjcsformats count_fraction works", { expect_snapshot({ - format_value(cdf, format = jjcsformat_count_denom_fraction) - format_value(cf, format = jjcsformat_count_fraction) - format_value(cf, format = "xx (xx.x%)") + format_value(cdf, format = jjcsformat_count_denom_fraction, round_type = "sas") + format_value(cf, format = jjcsformat_count_fraction, round_type = "sas") + format_value(cf, format = "xx (xx.x%)", round_type = "iec") format_value( c(2000, 2001, 2000 / 2001), - format = jjcsformat_count_denom_fraction + format = jjcsformat_count_denom_fraction, + round_type = "sas" ) - format_value(c(2000, 2000 / 2001), format = "xx (xx.x%)") - format_value(c(1, 2001, 1 / 2001), format = jjcsformat_count_denom_fraction) - format_value(c(1, 1 / 2001), format = "xx (xx.x%)") - format_value(c(3, 3, 3 / 3), format = jjcsformat_count_denom_fraction) - format_value(c(3, 3 / 3), format = "xx (xx.x%)") + format_value(c(2000, 2000 / 2001), format = "xx (xx.x%)", round_type = "iec") + format_value(c(1, 2001, 1 / 2001), format = jjcsformat_count_denom_fraction, round_type = "sas") + format_value(c(1, 1 / 2001), format = "xx (xx.x%)", round_type = "iec") + format_value(c(3, 3, 3 / 3), format = jjcsformat_count_denom_fraction, round_type = "sas") + format_value(c(3, 3 / 3), format = "xx (xx.x%)", round_type = "iec") format_value( rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), - na_str = rep("NA", 10) + round_type = "sas", + na_str = rep("NE", 10) ) format_value( rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), + round_type = "sas", na_str = rep("NA", 1) ) - format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)")) - format_value(c(1, rep(NA, 2)), format = jjcsformat_xx("xx.x (xx.x, xx.x)")) + format_value(rep(NA, 3), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), round_type = "sas", na_str = "NA") format_value( c(1, rep(NA, 2)), format = jjcsformat_xx("xx.x (xx.x, xx.x)"), + round_type = "sas", + na_str = rep("NE", 10) + ) + format_value( + c(1, rep(NA, 2)), + format = jjcsformat_xx("xx.x (xx.x, xx.x)"), + round_type = "sas", na_str = c("ne1", "ne2", "ne3") ) }) diff --git a/tests/testthat/test-jjcsformats.R b/tests/testthat/test-jjcsformats.R index a4c77138..2095ae46 100644 --- a/tests/testthat/test-jjcsformats.R +++ b/tests/testthat/test-jjcsformats.R @@ -108,27 +108,27 @@ test_that("jjjcs formats work", { ## round type works -test_that("roundmethod support works", { +test_that("round_type support works", { val <- 7.05 ## differs for xx.x between round types expect_equal( - format_value(val, format = jjcsformat_xx("xx.x")), + format_value(val, format = jjcsformat_xx("xx.x"), round_type = "sas"), format_value(val, format = "xx.x", round_type = "sas") ) # nolint start - expect_false(format_value(val, format = jjcsformat_xx("xx.x")) == + expect_false(format_value(val, format = jjcsformat_xx("xx.x"), round_type = "sas") == format_value(val, format = "xx.x", round_type = "iec")) # nolint end val2 <- c(5, 0.9945) expect_equal( format_value(val2, format = "xx (xx.x%)", round_type = "sas"), - jjcsformat_count_fraction(val2, roundmethod = "sas") + jjcsformat_count_fraction(val2, round_type = "sas") ) expect_equal( format_value(val2, format = "xx (xx.x%)", round_type = "iec"), - jjcsformat_count_fraction(val2, roundmethod = "iec") + jjcsformat_count_fraction(val2, round_type = "iec") ) # nolint start - expect_false(jjcsformat_count_fraction(val2, roundmethod = "sas") == + expect_false(jjcsformat_count_fraction(val2, round_type = "sas") == format_value(val2, "xx (xx.x%)", round_type = "iec")) # nolint end val3 <- c(5, 10, 0.9945) @@ -137,28 +137,30 @@ test_that("roundmethod support works", { add_spcs_fmt <- function(str) gsub("/", " / ", str, fixed = TRUE) expect_equal( format_value(val3, format = "xx / xx (xx.x%)", round_type = "sas"), - add_spcs_fmt(jjcsformat_count_denom_fraction(val3, roundmethod = "sas")) + add_spcs_fmt(jjcsformat_count_denom_fraction(val3, round_type = "sas")) ) expect_equal( format_value(val3, format = "xx / xx (xx.x%)", round_type = "iec"), - add_spcs_fmt(jjcsformat_count_denom_fraction(val3, roundmethod = "iec")) + add_spcs_fmt(jjcsformat_count_denom_fraction(val3, round_type = "iec")) ) # nolint start - expect_false(add_spcs_fmt(jjcsformat_count_denom_fraction(val3, roundmethod = "sas")) == + expect_false(add_spcs_fmt(jjcsformat_count_denom_fraction(val3, round_type = "sas")) == format_value(val3, "xx / xx (xx.x%)", round_type = "iec")) - expect_false(jjcsformat_fraction_count_denom(val3, roundmethod = "sas") == - jjcsformat_fraction_count_denom(val3, roundmethod = "iec")) + expect_false(jjcsformat_fraction_count_denom(val3, round_type = "sas") == + jjcsformat_fraction_count_denom(val3, round_type = "iec")) # nolint end }) test_that("jjcsformat_range_fct is formatting ranges as expected", { my_range_format <- jjcsformat_range_fct("xx.xx") + my_range_format2 <- jjcsformat_range_fct("xx.xx", censor_char = "*") expect_snapshot({ my_range_format(c(0.35235, 99.2342, 1, 0)) my_range_format(c(0.35235, 99.2342, 0, 1)) my_range_format(c(0.35235, 99.2342, 0, 0)) my_range_format(c(0.35235, 99.2342, 1, 1)) + my_range_format2(c(0.35235, 99.2342, 0, 1)) }) }) @@ -166,6 +168,7 @@ test_that("jjcsformat_pval_fct works", { expect_snapshot({ jjcsformat_pval_fct(0.005)(0.0048) jjcsformat_pval_fct(0.005)(0.00499) + jjcsformat_pval_fct(0.005)(0.000499) jjcsformat_pval_fct(0)(0.0048) jjcsformat_pval_fct(0.05)(0.0048) jjcsformat_pval_fct(0.005)(0.0051) @@ -175,9 +178,29 @@ test_that("jjcsformat_pval_fct works", { jjcsformat_pval_fct(0)(0.9999) jjcsformat_pval_fct(0)(0.999) jjcsformat_pval_fct(0)(0.9990000001) + jjcsformat_pval_fct(0)(NA_real_, na_str = "ne") + jjcsformat_pval_fct(0.0005)(NA_real_, na_str = "ne") + jjcsformat_pval_fct(0.005)(0.004999999) + jjcsformat_pval_fct(0.005)(0.0049999999) + jjcsformat_pval_fct(0.005)(0.00499999999) }) }) +test_that("some special cases for jjcsformat_pval_fct", { + expect_identical( + format_value(NA_real_, format = jjcsformat_pval_fct(0), na_str = "NE"), + "NE" + ) + expect_identical( + format_value(NA_real_, format = jjcsformat_pval_fct(0.0005), na_str = "NE"), + "NE" + ) + expect_error( + format_value(0.00000123, format = jjcsformat_pval_fct(0.0005), na_str = "NE"), + "jjcsformat_pval_fct: argument alpha should be 0 or at least 0.001." + ) +}) + test_that("jjcsformat_xx works also for empty cells", { expect_silent(in_rows( .list = list( diff --git a/tests/testthat/test-junco_utils_default_stats_formats_labels.R b/tests/testthat/test-junco_utils_default_stats_formats_labels.R index 0d5a657f..7470ed24 100644 --- a/tests/testthat/test-junco_utils_default_stats_formats_labels.R +++ b/tests/testthat/test-junco_utils_default_stats_formats_labels.R @@ -3,19 +3,24 @@ # Note that these tests are minimal, given that the junco functions are merely wrappers # of the tern functions, pointing to junco defaults. +normalize_fun <- function(fun) { + stopifnot(is.function(fun)) + txt <- paste(deparse(body(fun)), collapse = "") + gsub("\\s+", "", txt) +} + test_that("get_stats works as expected", { res <- junco_get_stats("kaplan_meier") expect_snapshot(res) }) + test_that("get_formats_from_stats works as expected", { sts <- c("quantiles_upper", "range_with_cens_info") res <- junco_get_formats_from_stats(sts) - environment(res[["quantiles_upper"]]) <- baseenv() - environment(res[["range_with_cens_info"]]) <- baseenv() - - expect_snapshot(res) + expect_snapshot(normalize_fun(res$quantiles_upper)) + expect_snapshot(normalize_fun(res$range_with_cens_info)) }) test_that("get_labels_from_stats works as expected", { diff --git a/tests/testthat/test-kaplan_meier.R b/tests/testthat/test-kaplan_meier.R index f9336606..7891ef9b 100644 --- a/tests/testthat/test-kaplan_meier.R +++ b/tests/testthat/test-kaplan_meier.R @@ -1,15 +1,15 @@ library(tern) test_that("s_kaplan_meier works with default arguments", { - adtte_f <- tern::tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern::tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 ) result <- expect_silent(s_kaplan_meier( - df = adtte_f %>% dplyr::filter(ARMCD == "ARM B"), + df = adtte_f |> dplyr::filter(ARMCD == "ARM B"), .var = "AVAL", is_event = "is_event" )) @@ -18,8 +18,8 @@ test_that("s_kaplan_meier works with default arguments", { }) test_that("s_kaplan_meier works with customized arguments", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 @@ -42,8 +42,8 @@ test_that("s_kaplan_meier works with customized arguments", { }) test_that("a_kaplan_meier works with default arguments", { - adtte_f <- tern::tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern::tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 @@ -61,8 +61,8 @@ test_that("a_kaplan_meier works with default arguments", { }) test_that("a_kaplan_meier works with customized arguments", { - adtte_f <- tern::tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern::tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 @@ -85,8 +85,8 @@ test_that("a_kaplan_meier works with customized arguments", { }) test_that("a_kaplan_meier works inside analyze in table", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 @@ -95,10 +95,10 @@ test_that("a_kaplan_meier works inside analyze in table", { adtte_f$AVAL == max(adtte_f$AVAL[adtte_f$ARMCD == "ARM A"]) ] <- FALSE - result <- basic_table() %>% + result <- basic_table(round_type = "sas") |> split_cols_by( var = "ARMCD" - ) %>% + ) |> analyze( vars = "AVAL", afun = a_kaplan_meier, @@ -107,7 +107,7 @@ test_that("a_kaplan_meier works inside analyze in table", { extra_args = list( is_event = "is_event" ) - ) %>% + ) |> build_table(df = adtte_f) res <- expect_silent(result) @@ -115,8 +115,8 @@ test_that("a_kaplan_meier works inside analyze in table", { }) test_that("a_kaplan_meier works inside analyze in table with custom arguments", { - adtte_f <- tern_ex_adtte %>% - dplyr::filter(PARAMCD == "OS") %>% + adtte_f <- tern_ex_adtte |> + dplyr::filter(PARAMCD == "OS") |> dplyr::mutate( AVAL = tern::day2month(AVAL), is_event = CNSR == 0 @@ -125,10 +125,10 @@ test_that("a_kaplan_meier works inside analyze in table with custom arguments", adtte_f$AVAL == max(adtte_f$AVAL[adtte_f$ARMCD == "ARM A"]) ] <- FALSE - result <- basic_table() %>% + result <- basic_table(round_type = "sas") |> split_cols_by( var = "ARMCD" - ) %>% + ) |> analyze( vars = "AVAL", afun = a_kaplan_meier, @@ -144,7 +144,7 @@ test_that("a_kaplan_meier works inside analyze in table with custom arguments", .labels = c(range_with_cens_info = "Min and Max"), .indent_mods = c(median_ci_3d = 3L) ) - ) %>% + ) |> build_table(df = adtte_f) res <- expect_silent(result) diff --git a/tests/testthat/test_markup_unicodify.R b/tests/testthat/test-markup_unicodify.R similarity index 100% rename from tests/testthat/test_markup_unicodify.R rename to tests/testthat/test-markup_unicodify.R diff --git a/tests/testthat/test-mmrm_rbmi.R b/tests/testthat/test-mmrm_rbmi.R index e7daf11d..e221ad21 100644 --- a/tests/testthat/test-mmrm_rbmi.R +++ b/tests/testthat/test-mmrm_rbmi.R @@ -1,3 +1,9 @@ +if (requireNamespace("rbmi", quietly = TRUE)) { + suppressPackageStartupMessages(library(rbmi)) +} else { + skip("rbmi package not available") +} + suppressPackageStartupMessages(library(rbmi)) f2n <- function(x) as.numeric(x) - 1 diff --git a/tests/testthat/test-patyrs-eair100.R b/tests/testthat/test-patyrs-eair100.R index 70632323..feaa6088 100644 --- a/tests/testthat/test-patyrs-eair100.R +++ b/tests/testthat/test-patyrs-eair100.R @@ -4,26 +4,26 @@ library(dplyr) ref_path <- c("ARM", "B: Placebo") -adsl <- ex_adsl %>% - mutate(TRTDURY = substring(USUBJID, nchar(USUBJID) - 3 + 1), "-", "") %>% - mutate(TRTDURY = sub("-", "", TRTDURY)) %>% - mutate(TRTDURY = sub("d", "", TRTDURY)) %>% - mutate(TRTDURY = as.numeric(TRTDURY)) %>% - mutate(TRTDURY2 = TRTDURY + 25) %>% +adsl <- ex_adsl |> + mutate(TRTDURY = substring(USUBJID, nchar(USUBJID) - 3 + 1), "-", "") |> + mutate(TRTDURY = sub("-", "", TRTDURY)) |> + mutate(TRTDURY = sub("d", "", TRTDURY)) |> + mutate(TRTDURY = as.numeric(TRTDURY)) |> + mutate(TRTDURY2 = TRTDURY + 25) |> select(USUBJID, ARM, COUNTRY, STRATA1, TRTDURY, TRTDURY2, SEX) -adae <- ex_adae %>% +adae <- ex_adae |> select(USUBJID, AEDECOD, AEBODSYS, ASTDY) adae$TRTEMFL <- "Y" # set up occurrence flag for first occurrence of event -adaefirst <- adae %>% - arrange(USUBJID, AEBODSYS, AEDECOD, ASTDY) %>% - group_by(USUBJID, AEBODSYS, AEDECOD) %>% - slice(1) %>% - ungroup() %>% - mutate(AOCCPFL = "Y") %>% +adaefirst <- adae |> + arrange(USUBJID, AEBODSYS, AEDECOD, ASTDY) |> + group_by(USUBJID, AEBODSYS, AEDECOD) |> + slice(1) |> + ungroup() |> + mutate(AOCCPFL = "Y") |> select(USUBJID, AEBODSYS, AEDECOD, ASTDY, AOCCPFL) adae <- left_join( @@ -44,13 +44,13 @@ adsl$colspan_trt <- factor( adsl$rrisk_header <- "Risk Difference (%) (95% CI)" adsl$rrisk_label <- paste(adsl[["ARM"]], "vs Placebo") -adae <- left_join(adsl, adae, by = "USUBJID") %>% +adae <- left_join(adsl, adae, by = "USUBJID") |> mutate(ASTDY2 = ASTDY + 10) -core_lyt <- basic_table(show_colcounts = FALSE) %>% - split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("rrisk_header", nested = FALSE) %>% +core_lyt <- basic_table(show_colcounts = FALSE, round_type = "sas") |> + split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by( "ARM", labels_var = "rrisk_label", @@ -65,7 +65,7 @@ test_that("Check patient years numbers are giving expected result", { label = c("Subject years\u1D43") ) - lyt1 <- core_lyt %>% + lyt1 <- core_lyt |> analyze( "TRTDURY", nested = FALSE, @@ -77,10 +77,10 @@ test_that("Check patient years numbers are giving expected result", { res1 <- cell_values(tbl1[c("TRTDURY", "patyrs"), "A: Drug X"]) result <- as.numeric(unlist(unname(res1))[[1]]) - adae_sub <- adae %>% - filter(ARM == "A: Drug X") %>% - group_by(USUBJID) %>% - slice(1) %>% + adae_sub <- adae |> + filter(ARM == "A: Drug X") |> + group_by(USUBJID) |> + slice(1) |> ungroup() expected <- sum(adae_sub$TRTDURY) @@ -92,7 +92,7 @@ test_that("Check patient years numbers are giving expected result", { }) test_that("Check aeir100 numbers are giving expected result", { - lyt1 <- core_lyt %>% + lyt1 <- core_lyt |> analyze( "AEDECOD", nested = FALSE, @@ -110,28 +110,28 @@ test_that("Check aeir100 numbers are giving expected result", { res1 <- cell_values(tbl1["dcd A.1.1.1.1", "A: Drug X"]) result <- as.numeric(unlist(unname(res1))[[1]]) - adae_onecode <- adae %>% - filter(AEDECOD == "dcd A.1.1.1.1" & !is.na(AOCCPFL)) %>% + adae_onecode <- adae |> + filter(AEDECOD == "dcd A.1.1.1.1" & !is.na(AOCCPFL)) |> select(USUBJID, AEDECOD, AEBODSYS, ASTDY, TRTEMFL, AOCCPFL) adae_sub <- left_join(adsl, adae_onecode, by = "USUBJID") - adae_sub <- adae_sub %>% - filter(ARM == "A: Drug X") %>% - arrange(USUBJID, AEDECOD, ASTDY) %>% - group_by(USUBJID) %>% - slice(1) %>% - ungroup() %>% + adae_sub <- adae_sub |> + filter(ARM == "A: Drug X") |> + arrange(USUBJID, AEDECOD, ASTDY) |> + group_by(USUBJID) |> + slice(1) |> + ungroup() |> mutate(EXP_TIME = if_else(!is.na(ASTDY), (ASTDY / 365.25), TRTDURY)) total_exp_years <- sum(adae_sub$EXP_TIME) - adae_sub2 <- adae %>% + adae_sub2 <- adae |> filter( AEDECOD == "dcd A.1.1.1.1" & ARM == "A: Drug X" & !is.na(AOCCPFL) - ) %>% - group_by(USUBJID) %>% - slice(1) %>% + ) |> + group_by(USUBJID) |> + slice(1) |> ungroup() number_with_event <- nrow(adae_sub2) @@ -145,7 +145,7 @@ test_that("Check aeir100 numbers are giving expected result", { }) test_that("Check aeir100 numbers are giving expected result when fup_var argument is changed", { - lyt1 <- core_lyt %>% + lyt1 <- core_lyt |> analyze( "AEDECOD", nested = FALSE, @@ -163,28 +163,28 @@ test_that("Check aeir100 numbers are giving expected result when fup_var argumen res1 <- cell_values(tbl1["dcd A.1.1.1.1", "A: Drug X"]) result <- as.numeric(unlist(unname(res1))[[1]]) - adae_onecode <- adae %>% - filter(AEDECOD == "dcd A.1.1.1.1" & !is.na(AOCCPFL)) %>% + adae_onecode <- adae |> + filter(AEDECOD == "dcd A.1.1.1.1" & !is.na(AOCCPFL)) |> select(USUBJID, AEDECOD, AEBODSYS, ASTDY, TRTEMFL, AOCCPFL) adae_sub <- left_join(adsl, adae_onecode, by = "USUBJID") - adae_sub <- adae_sub %>% - filter(ARM == "A: Drug X") %>% - arrange(USUBJID, AEDECOD, ASTDY) %>% - group_by(USUBJID) %>% - slice(1) %>% - ungroup() %>% + adae_sub <- adae_sub |> + filter(ARM == "A: Drug X") |> + arrange(USUBJID, AEDECOD, ASTDY) |> + group_by(USUBJID) |> + slice(1) |> + ungroup() |> mutate(EXP_TIME = if_else(!is.na(ASTDY), (ASTDY / 365.25), TRTDURY2)) total_exp_years <- sum(adae_sub$EXP_TIME) - adae_sub2 <- adae %>% + adae_sub2 <- adae |> filter( AEDECOD == "dcd A.1.1.1.1" & ARM == "A: Drug X" & !is.na(AOCCPFL) - ) %>% - group_by(USUBJID) %>% - slice(1) %>% + ) |> + group_by(USUBJID) |> + slice(1) |> ungroup() number_with_event <- nrow(adae_sub2) @@ -198,7 +198,7 @@ test_that("Check aeir100 numbers are giving expected result when fup_var argumen }) test_that("Check aeir100 numbers are giving expected result when occ_dy argument is changed", { - lyt1 <- core_lyt %>% + lyt1 <- core_lyt |> analyze( "AEDECOD", nested = FALSE, @@ -216,28 +216,28 @@ test_that("Check aeir100 numbers are giving expected result when occ_dy argument res1 <- cell_values(tbl1["dcd A.1.1.1.1", "A: Drug X"]) result <- as.numeric(unlist(unname(res1))[[1]]) - adae_onecode <- adae %>% - filter(AEDECOD == "dcd A.1.1.1.1" & !is.na(AOCCPFL)) %>% + adae_onecode <- adae |> + filter(AEDECOD == "dcd A.1.1.1.1" & !is.na(AOCCPFL)) |> select(USUBJID, AEDECOD, AEBODSYS, ASTDY2, TRTEMFL, AOCCPFL) adae_sub <- left_join(adsl, adae_onecode, by = "USUBJID") - adae_sub <- adae_sub %>% - filter(ARM == "A: Drug X") %>% - arrange(USUBJID, AEDECOD, ASTDY2) %>% - group_by(USUBJID) %>% - slice(1) %>% - ungroup() %>% + adae_sub <- adae_sub |> + filter(ARM == "A: Drug X") |> + arrange(USUBJID, AEDECOD, ASTDY2) |> + group_by(USUBJID) |> + slice(1) |> + ungroup() |> mutate(EXP_TIME = if_else(!is.na(ASTDY2), (ASTDY2 / 365.25), TRTDURY2)) total_exp_years <- sum(adae_sub$EXP_TIME) - adae_sub2 <- adae %>% + adae_sub2 <- adae |> filter( AEDECOD == "dcd A.1.1.1.1" & ARM == "A: Drug X" & !is.na(AOCCPFL) - ) %>% - group_by(USUBJID) %>% - slice(1) %>% + ) |> + group_by(USUBJID) |> + slice(1) |> ungroup() number_with_event <- nrow(adae_sub2) diff --git a/tests/testthat/test-pool_rbmi.R b/tests/testthat/test-pool_rbmi.R index 0138f38f..6821f479 100644 --- a/tests/testthat/test-pool_rbmi.R +++ b/tests/testthat/test-pool_rbmi.R @@ -1,5 +1,13 @@ +if (requireNamespace("rbmi", quietly = TRUE)) { + suppressPackageStartupMessages(library(rbmi)) +} else { + skip("rbmi package not available") +} + library(rbmi) -require(mockery) +suppressMessages(require(mockery)) + +as_analysis <- getFromNamespace("as_analysis", "rbmi") test_that("mod_pool_internal_rubin combines results correctly", { @@ -20,13 +28,14 @@ test_that("mod_pool_internal_rubin combines results correctly", { } mock_parametric_ci <- function( - point, - se, - alpha, - alternative, - qfun, - pfun, - df) { + point, + se, + alpha, + alternative, + qfun, + pfun, + df + ) { q_val <- qfun(1 - alpha / 2, df = df) ci <- switch(alternative, "two.sided" = c(point - q_val * se, point + q_val * se), @@ -142,10 +151,11 @@ test_that("pool function processes and returns combined results", { ) pool_no_validate <- function( - results, - conf.level = 0.95, - alternative = c("two.sided", "less", "greater"), - type = c("percentile", "normal")) { + results, + conf.level = 0.95, + alternative = c("two.sided", "less", "greater"), + type = c("percentile", "normal") + ) { # Skip validation step rbmi::validate(results) alternative <- match.arg(alternative) @@ -235,3 +245,115 @@ test_that("pool function processes and returns combined results", { expect_equal(res$pars$param2$pvalue, 0.02) expect_equal(res$pars$param2$df, median(mock_results$param2$df)) }) + +test_that("Pool (Rubin) works as expected when se = NA in analysis model", { + set.seed(101) + + mu <- 0 + sd <- 1 + n <- 2000 + vals <- rnorm(n, mu, sd) + real_mu <- mean(vals) + + runanalysis <- function(x) { + list("p1" = list(est = mean(x), se = NA, df = NA)) + } + + results_bayes <- rbmi_as_analysis( + method = rbmi::method_bayes(n_samples = 5000), + results = lapply( + seq_len(5000), + function(x) runanalysis(sample(vals, size = n, replace = TRUE)) + ) + ) + bayes <- rbmi_pool(results_bayes) + bayes2 <- rbmi_pool(results_bayes, conf.level = 0.8) + bayes3 <- rbmi_pool(results_bayes, alternative = "greater") + + expect_equal( + bayes$pars$p1, + list( + est = real_mu, + ci = as.numeric(c(NA, NA)), + se = as.numeric(NA), + pvalue = as.numeric(NA), + df = NA + ), + tolerance = 1e-2 + ) + + expect_equal( + bayes2$pars$p1, + list( + est = real_mu, + ci = as.numeric(c(NA, NA)), + se = as.numeric(NA), + pvalue = as.numeric(NA), + df = NA + ), + tolerance = 1e-2 + ) + + expect_equal( + bayes3$pars$p1, + list( + est = real_mu, + ci = as.numeric(c(NA, NA)), + se = as.numeric(NA), + pvalue = as.numeric(NA), + df = NA + ), + tolerance = 1e-2 + ) + + runanalysis <- function(x) { + list("p1" = list(est = mean(x), se = NA, df = Inf)) + } + + results_bayes <- rbmi_as_analysis( + method = rbmi::method_bayes(n_samples = 5000), + results = lapply( + seq_len(5000), + function(x) runanalysis(sample(vals, size = n, replace = TRUE)) + ) + ) + bayes <- rbmi_pool(results_bayes) + bayes2 <- rbmi_pool(results_bayes, conf.level = 0.8) + bayes3 <- rbmi_pool(results_bayes, alternative = "greater") + + expect_equal( + bayes$pars$p1, + list( + est = real_mu, + ci = as.numeric(c(NA, NA)), + se = as.numeric(NA), + pvalue = as.numeric(NA), + df = NA + ), + tolerance = 1e-2 + ) + + expect_equal( + bayes2$pars$p1, + list( + est = real_mu, + ci = as.numeric(c(NA, NA)), + se = as.numeric(NA), + pvalue = as.numeric(NA), + df = NA + ), + tolerance = 1e-2 + ) + + expect_equal( + bayes3$pars$p1, + list( + est = real_mu, + ci = as.numeric(c(NA, NA)), + se = as.numeric(NA), + pvalue = as.numeric(NA), + df = NA + ), + tolerance = 1e-2 + ) +}) diff --git a/tests/testthat/test-proportions.R b/tests/testthat/test-proportions.R index eaff4e39..f5897d17 100644 --- a/tests/testthat/test-proportions.R +++ b/tests/testthat/test-proportions.R @@ -103,7 +103,7 @@ test_that("a_proportion_ci_factor works as expected", { }) test_that("prop_split_fun works as expected", { - result <- basic_table() %>% + result <- basic_table(round_type = "sas") |> split_cols_by("ID", split_fun = prop_split_fun) |> build_table(formatters::DM) expect_snapshot(result) diff --git a/tests/testthat/test-pruning_functions.R b/tests/testthat/test-pruning_functions.R index e7149818..ba8271ed 100644 --- a/tests/testthat/test-pruning_functions.R +++ b/tests/testthat/test-pruning_functions.R @@ -2,12 +2,12 @@ library(dplyr) library(tern) # Pre-processing the table -tab <- basic_table() %>% - split_cols_by("ARM") %>% - split_rows_by("RACE") %>% - split_rows_by("STRATA1") %>% - summarize_row_groups() %>% - analyze_vars("COUNTRY", .stats = "count_fraction") %>% +tab <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + split_rows_by("RACE") |> + split_rows_by("STRATA1") |> + summarize_row_groups() |> + analyze_vars("COUNTRY", .stats = "count_fraction") |> build_table(formatters::DM) trtvar <- "ARM" @@ -16,7 +16,7 @@ ref_path <- c("colspan_trt", " ", trtvar, "B: Placebo") #### Tests for count_pruner function#### testthat::test_that("count_pruner is identical to standard pruning in cases where we have all 0's", { - pruning_fun <- count_pruner(col = "ARM") + pruning_fun <- count_pruner(cols = "ARM") testthat::expect_type(pruning_fun, "closure") result <- prune_table(tab, pruning_fun) expected <- prune_table(tab) @@ -25,21 +25,21 @@ testthat::test_that("count_pruner is identical to standard pruning in cases wher testthat::test_that("count_pruner keeps everything if 0 condition is not met", { sub_tab <- prune_table(tab) - result <- prune_table(sub_tab, count_pruner(col = "ARM")) + result <- prune_table(sub_tab, count_pruner(cols = "ARM")) expected <- sub_tab testthat::expect_identical(result, expected) }) testthat::test_that("count_pruner with cat_include removes text correctly", { sub_tab <- tab[32, ] - result <- prune_table(sub_tab, count_pruner(cat_include = "GBR", col = "ARM")) + result <- prune_table(sub_tab, count_pruner(cat_include = "GBR", cols = "ARM")) expected <- NULL testthat::expect_identical(result, expected) }) testthat::test_that("count_pruner with cat_include does nothing if text is supplied and it is not text that is in the table", { # nolint start - result <- prune_table(tab, count_pruner(cat_include = "XXX", col = "ARM")) + result <- prune_table(tab, count_pruner(cat_include = "XXX", cols = "ARM")) expected <- tab testthat::expect_identical(result, expected) }) # nolint end @@ -51,7 +51,7 @@ testthat::test_that("count_pruner does remove if text is supplied and all column ) result <- prune_table( sub_tab2, - count_pruner(cat_include = c("USA", "RU", "XXX"), col = "ARM") + count_pruner(cat_include = c("USA", "RU", "XXX"), cols = "ARM") ) rps_label <- make_row_df(sub_tab2)$label @@ -125,19 +125,19 @@ testthat::test_that("test keep_non_null_rows", { rcell(NULL, label = "") } - tabsx <- basic_table() %>% - split_cols_by("ARM") %>% - split_rows_by("ARM") %>% - analyze("ARM", afun = xnull_cell_fn, show_labels = "hidden") %>% - analyze("STRATA1", show_labels = "hidden") %>% + tabsx <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + split_rows_by("ARM") |> + analyze("ARM", afun = xnull_cell_fn, show_labels = "hidden") |> + analyze("STRATA1", show_labels = "hidden") |> build_table(formatters::DM) result <- prune_table(tabsx, keep_rows(keep_non_null_rows)) - tabsx2 <- basic_table() %>% - split_cols_by("ARM") %>% - split_rows_by("ARM") %>% - analyze("STRATA1") %>% + tabsx2 <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + split_rows_by("ARM") |> + analyze("STRATA1") |> build_table(formatters::DM) expected <- tabsx2 @@ -174,9 +174,9 @@ testthat::test_that("bspt_pruner both fraction and diff_from_control are NULL", }) testthat::test_that("bspt_pruner with fraction", { - tab_bspt_pruner <- basic_table() %>% - split_cols_by("ARM") %>% - analyze_vars("COUNTRY", .stats = "count_fraction") %>% + tab_bspt_pruner <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + analyze_vars("COUNTRY", .stats = "count_fraction") |> build_table(formatters::DM) result <- prune_table( @@ -194,9 +194,9 @@ testthat::test_that("bspt_pruner with fraction", { }) testthat::test_that("bspt_pruner with fraction and diff_from_control", { - tab_bspt_pruner <- basic_table() %>% - split_cols_by("ARM") %>% - analyze_vars("COUNTRY", .stats = "count_fraction") %>% + tab_bspt_pruner <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + analyze_vars("COUNTRY", .stats = "count_fraction") |> build_table(formatters::DM) result <- prune_table( @@ -216,9 +216,9 @@ testthat::test_that("bspt_pruner with fraction and diff_from_control", { }) testthat::test_that("bspt_pruner with fraction and diff_from_control and keeprowtext", { - tab_bspt_pruner <- basic_table() %>% - split_cols_by("ARM") %>% - analyze_vars("COUNTRY", .stats = "count_fraction") %>% + tab_bspt_pruner <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + analyze_vars("COUNTRY", .stats = "count_fraction") |> build_table(formatters::DM) result1 <- prune_table( @@ -253,8 +253,8 @@ testthat::test_that("bspt_pruner with fraction and diff_from_control and keeprow }) testthat::test_that("count_pruner in small groups", { - DM_sub <- subset(DM, COUNTRY %in% c("USA", "CAN")) %>% - mutate(COUNTRY = factor(as.character(COUNTRY))) %>% + DM_sub <- subset(DM, COUNTRY %in% c("USA", "CAN")) |> + mutate(COUNTRY = factor(as.character(COUNTRY))) |> mutate( colspan_trt = factor( ifelse(ARM == "B: Placebo", " ", "Active Study Agent"), @@ -270,16 +270,16 @@ testthat::test_that("count_pruner in small groups", { ref_path = ref_path ) - tab_bspt_pruner <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("rrisk_header", nested = FALSE) %>% + tab_bspt_pruner <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by( "ARM", labels_var = "rrisk_label", split_fun = remove_split_levels("B: Placebo") - ) %>% - analyze("COUNTRY", afun = a_freq_j, extra_args = extra_args) %>% + ) |> + analyze("COUNTRY", afun = a_freq_j, extra_args = extra_args) |> build_table(DM_sub) result <- prune_table( @@ -298,7 +298,7 @@ testthat::test_that("bspt_pruner in AE like tables", { my_adsl <- bind_rows( as_tibble(cbind(ARM = rep("Group A", 100), USUBJID = paste0("A", 1:100))), as_tibble(cbind(ARM = rep("Group B", 100), USUBJID = paste0("B", 1:100))) - ) %>% + ) |> mutate(ARM = factor(ARM)) my_adsl$colspan <- factor( @@ -316,51 +316,51 @@ testthat::test_that("bspt_pruner in AE like tables", { my_adae <- bind_rows( - my_adsl %>% - filter(USUBJID %in% c(paste0("A", 1:4), paste0("B", 1:2))) %>% + my_adsl |> + filter(USUBJID %in% c(paste0("A", 1:4), paste0("B", 1:2))) |> mutate( AEBODSYS = "BODSYS1", AEDECOD = "Decod 1" ), - my_adsl %>% - filter(USUBJID %in% c(paste0("A", 5:6), paste0("B", 3:6))) %>% + my_adsl |> + filter(USUBJID %in% c(paste0("A", 5:6), paste0("B", 3:6))) |> mutate( AEBODSYS = "BODSYS1", AEDECOD = "Decod 2" ), - my_adsl %>% - filter(USUBJID %in% c(paste0("A", 1:6), paste0("B", 1:4))) %>% + my_adsl |> + filter(USUBJID %in% c(paste0("A", 1:6), paste0("B", 1:4))) |> mutate( AEBODSYS = "BODSYS2", AEDECOD = "Decod 3" ), - my_adsl %>% - filter(USUBJID %in% c(paste0("A", 1:6), paste0("B", 1:4))) %>% + my_adsl |> + filter(USUBJID %in% c(paste0("A", 1:6), paste0("B", 1:4))) |> mutate( AEBODSYS = "BODSYS2", AEDECOD = "Decod 4" ), - my_adsl %>% - filter(USUBJID %in% c(paste0("A", 1:6), paste0("B", 1:2))) %>% + my_adsl |> + filter(USUBJID %in% c(paste0("A", 1:6), paste0("B", 1:2))) |> mutate( AEBODSYS = "BODSYS3", AEDECOD = "Decod 5" ), - my_adsl %>% - filter(USUBJID %in% c(paste0("A", 1:2), paste0("B", 1:6))) %>% + my_adsl |> + filter(USUBJID %in% c(paste0("A", 1:2), paste0("B", 1:6))) |> mutate( AEBODSYS = "BODSYS3", AEDECOD = "Decod 6" ), - my_adsl %>% - filter(USUBJID %in% c(paste0("A", 1:8), paste0("B", 1:8))) %>% + my_adsl |> + filter(USUBJID %in% c(paste0("A", 1:8), paste0("B", 1:8))) |> mutate( AEBODSYS = "BODSYS3", AEDECOD = "Decod 7" ) - ) %>% - mutate(AEBODSYS = factor(AEBODSYS)) %>% - mutate(AEDECOD = factor(AEDECOD)) %>% + ) |> + mutate(AEBODSYS = factor(AEBODSYS)) |> + mutate(AEDECOD = factor(AEDECOD)) |> mutate(TRTEMFL = "Y") extra_args_rr <- list( @@ -369,39 +369,39 @@ testthat::test_that("bspt_pruner in AE like tables", { .stats = "count_unique_fraction" ) - tbl1 <- basic_table(show_colcounts = TRUE, top_level_section_div = " ") %>% - split_cols_by("colspan", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("rrisk_header", nested = FALSE) %>% + tbl1 <- basic_table(show_colcounts = TRUE, top_level_section_div = " ", round_type = "sas") |> + split_cols_by("colspan", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by( "ARM", labels_var = "rrisk_label", split_fun = remove_split_levels("Group B") - ) %>% + ) |> analyze( "TRTEMFL", afun = a_freq_j, show_labels = "hidden", extra_args = append(extra_args_rr, list(label = "Subjects with >=1 AE")) - ) %>% + ) |> split_rows_by( "AEBODSYS", split_fun = trim_levels_in_group("AEDECOD"), section_div = c(" "), nested = FALSE - ) %>% + ) |> summarize_row_groups( "AEBODSYS", cfun = a_freq_j, extra_args = extra_args_rr - ) %>% + ) |> analyze( vars = "AEDECOD", afun = a_freq_j, indent_mod = 1L, show_labels = "hidden", extra_args = extra_args_rr - ) %>% + ) |> build_table(my_adae, my_adsl) result1 <- safe_prune_table( @@ -453,14 +453,14 @@ testthat::test_that("bspt_pruner in AE like tables", { testthat::test_that("bspt_pruner with less obvious control specifications", { - DM_sub <- formatters::DM %>% - mutate(COUNTRY = factor(as.character(COUNTRY))) %>% + DM_sub <- formatters::DM |> + mutate(COUNTRY = factor(as.character(COUNTRY))) |> mutate(SEX = factor(as.character(SEX))) - tab_bspt_pruner <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% - split_cols_by("SEX") %>% - analyze_vars("COUNTRY", .stats = "count_fraction") %>% + tab_bspt_pruner <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> + split_cols_by("SEX") |> + analyze_vars("COUNTRY", .stats = "count_fraction") |> build_table(DM_sub) rps_label <- make_row_df(tab_bspt_pruner)$label @@ -510,12 +510,12 @@ testthat::test_that("bspt_pruner with less obvious control specifications", { }) #### Tests for safe_prune_table function#### -my_DM <- formatters::DM %>% +my_DM <- formatters::DM |> filter(RACE == "THIS LEAVES EMPTY DF") -my_tab <- basic_table() %>% - split_cols_by("ARM") %>% - analyze("AGE") %>% +my_tab <- basic_table(round_type = "sas") |> + split_cols_by("ARM") |> + analyze("AGE") |> build_table(my_DM) testthat::test_that("check that if all data is pruned leaving no rows, the outcome is the message", { @@ -547,7 +547,7 @@ testthat::test_that("check that when spancols=TRUE is used then we have expected result <- safe_prune_table( my_tab, prune_func = prune_empty_level, - spancol = TRUE + spancols = TRUE ) rps_label <- make_row_df(my_tab)$label diff --git a/tests/testthat/test-rbmi.R b/tests/testthat/test-rbmi.R index 52e13ffa..dab46ac5 100644 --- a/tests/testthat/test-rbmi.R +++ b/tests/testthat/test-rbmi.R @@ -1,9 +1,14 @@ suppressPackageStartupMessages({ library(testthat) - library(rbmi) library(dplyr) }) +if (requireNamespace("rbmi", quietly = TRUE)) { + suppressPackageStartupMessages(library(rbmi)) +} else { + skip("rbmi package not available") +} + test_that("find_missing_chg_after_avisit works as expected", { df <- data.frame( @@ -185,7 +190,7 @@ test_that("make_rbmi_cluster loads rbmi namespaces correctly", { { cluster_has_rbmi <- all(unlist(parallel::clusterEvalQ( cl, - requireNamesapce("rbmi") + requireNamespace("rbmi") ))) }, error = function(e) { @@ -207,3 +212,159 @@ test_that("make_rbmi_cluster loads rbmi namespaces correctly", { parallel::stopCluster(cl) } }) + +test_that("Parallelisation works with rbmi_analyse and produces identical results", { + set.seed(4642) + sigma <- as_vcov( + c(2, 1, 0.7, 1.5), + c(0.5, 0.3, 0.2, 0.3, 0.5, 0.4) + ) + dat <- get_sim_data(200, sigma, trt = 8) |> + dplyr::mutate( + outcome = dplyr::if_else( + rbinom(dplyr::n(), 1, 0.3) == 1 & group == "A", + NA_real_, + outcome + ) + ) + + dat_ice <- dat |> + dplyr::group_by(id) |> + dplyr::arrange(id, visit) |> + dplyr::filter(is.na(outcome)) |> + dplyr::slice(1) |> + dplyr::ungroup() |> + dplyr::select(id, visit) |> + dplyr::mutate(strategy = "JR") + + vars <- rbmi::set_vars( + outcome = "outcome", + group = "group", + strategy = "strategy", + subjid = "id", + visit = "visit", + covariates = c("age", "sex", "visit * group") + ) + + set.seed(984) + drawobj <- rbmi::draws( + data = dat, + data_ice = dat_ice, + vars = vars, + method = rbmi::method_condmean(n_samples = 6, type = "bootstrap"), + quiet = TRUE + ) + + imputeobj <- rbmi::impute( + draws = drawobj, + references = c("A" = "B", "B" = "B") + ) + + # + # Here we set up a bunch of different analysis objects using different + # of parallelisation methods and different dat_delta objects + # + + ### Delta 1 + + dat_delta_1 <- rbmi::delta_template(imputations = imputeobj) |> + dplyr::mutate(delta = is_missing * 5) + + vars2 <- vars + vars2$covariates <- c("age", "sex") + + anaobj_d1_t1 <- rbmi_analyse( + imputeobj, + fun = rbmi_ancova, + vars = vars2, + delta = dat_delta_1 + ) + + anaobj_d1_t2 <- rbmi_analyse( + imputeobj, + fun = rbmi_ancova, + vars = vars2, + delta = dat_delta_1, + cluster_or_cores = 2 + ) + + var <- 20 + inner_fun <- function(...) { + x <- as_factor(var) # forcats::as_factor + rbmi_ancova(...) + } + outer_fun <- function(...) { + inner_fun(...) + } + + cl <- make_rbmi_cluster( + 2, + objects = list(var = var, inner_fun = inner_fun), + "forcats" + ) + anaobj_d1_t3 <- rbmi_analyse( + imputeobj, + fun = rbmi_ancova, + vars = vars2, + delta = dat_delta_1, + cluster_or_cores = cl + ) + + ### Delta 2 + + dat_delta_2 <- rbmi::delta_template(imputations = imputeobj) |> + dplyr::mutate(delta = is_missing * 50) + + anaobj_d2_t1 <- rbmi_analyse( + imputeobj, + fun = rbmi_ancova, + vars = vars2, + delta = dat_delta_2 + ) + anaobj_d2_t3 <- rbmi_analyse( + imputeobj, + fun = rbmi_ancova, + vars = vars2, + delta = dat_delta_2, + cluster_or_cores = cl + ) + + ### Delta 3 (no delta) + + anaobj_d3_t1 <- rbmi_analyse( + imputeobj, + fun = rbmi_ancova, + vars = vars2 + ) + anaobj_d3_t3 <- rbmi_analyse( + imputeobj, + fun = rbmi_ancova, + vars = vars2, + cluster_or_cores = cl + ) + + ## Check for internal consistency + expect_equal(anaobj_d1_t1, anaobj_d1_t2) + expect_equal(anaobj_d1_t1, anaobj_d1_t3) + expect_equal(anaobj_d1_t2, anaobj_d1_t3) + + expect_equal(anaobj_d2_t1, anaobj_d2_t3) + + expect_equal(anaobj_d3_t1, anaobj_d3_t3) + + ## Check that they differ (as different deltas have been used) + ## Main thing is sanity checking that the embedded delta + ## in the parallel processes hasn't lingered and impacted + ## future results + + # First assert consistency + expect_true(identical(anaobj_d1_t1$results, anaobj_d1_t3$results)) + expect_true(identical(anaobj_d2_t1$results, anaobj_d2_t3$results)) + expect_true(identical(anaobj_d3_t1$results, anaobj_d3_t3$results)) + + # The ensure they are different + expect_false(identical(anaobj_d1_t1$results, anaobj_d2_t1$results)) + expect_false(identical(anaobj_d1_t1$results, anaobj_d3_t1$results)) + expect_false(identical(anaobj_d2_t1$results, anaobj_d3_t1$results)) + parallel::stopCluster(cl) +}) diff --git a/tests/testthat/test-relative_risk.R b/tests/testthat/test-relative_risk.R index 86aa27bb..9760a696 100644 --- a/tests/testthat/test-relative_risk.R +++ b/tests/testthat/test-relative_risk.R @@ -341,7 +341,7 @@ test_that("a_relative_risk in table layout gives same results as with SAS", { )) ) - lyt <- basic_table() |> + lyt <- basic_table(round_type = "sas") |> split_cols_by("Treatment") |> analyze( vars = "Response", diff --git a/tests/testthat/test-remove_col_count.R b/tests/testthat/test-remove_col_count.R index a6fd6c0d..9cea9dce 100644 --- a/tests/testthat/test-remove_col_count.R +++ b/tests/testthat/test-remove_col_count.R @@ -12,11 +12,12 @@ testthat::test_that("remove_col_count works", { lyt <- basic_table( top_level_section_div = " ", show_colcounts = TRUE, - colcount_format = "N=xx" - ) %>% - split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("set2", nested = FALSE) %>% + colcount_format = "N=xx", + round_type = "sas" + ) |> + split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("set2", nested = FALSE) |> split_cols_by("ARM", split_fun = remove_split_levels("B: Placebo")) tbl <- build_table(lyt, adsl) diff --git a/tests/testthat/test-resp01_functions.R b/tests/testthat/test-resp01_functions.R index 3191493f..c38473e2 100644 --- a/tests/testthat/test-resp01_functions.R +++ b/tests/testthat/test-resp01_functions.R @@ -1,28 +1,30 @@ library(rtables) -test_that("resp01_split_fun_fct works as expected", { +test_that("resp01_split_fun_fct 1 works as expected", { split_fun <- resp01_split_fun_fct( method = "or_cmh", conf_level = 0.95 ) - result <- basic_table() %>% - split_cols_by("ARM", split_fun = add_overall_level("Overall")) %>% + result <- basic_table(round_type = "sas") |> + split_cols_by("ARM", split_fun = add_overall_level("Overall")) |> split_cols_by("ID", split_fun = split_fun) |> build_table(formatters::DM) expect_snapshot(result) +}) +test_that("resp01_split_fun_fct 2 works as expected", { split_fun <- resp01_split_fun_fct( method = "rr", conf_level = 0.92 ) - result <- basic_table() %>% - split_cols_by("ARM", split_fun = add_overall_level("Overall")) %>% + result <- basic_table(round_type = "sas") |> + split_cols_by("ARM", split_fun = add_overall_level("Overall")) |> split_cols_by("ID", split_fun = split_fun) |> build_table(formatters::DM) expect_snapshot(col_info(result)) }) -test_that("resp01_counts_cfun works as expected", { +test_that("resp01_counts_cfun 1 works as expected", { fake_spl_context <- data.frame( cur_col_split_val = I(list(c(ARM = "A: Drug X", count_prop = "count_prop"))) ) @@ -34,7 +36,9 @@ test_that("resp01_counts_cfun works as expected", { label_fstr = "Color: %s" ) expect_snapshot(result) +}) +test_that("resp01_counts_cfun 2 works as expected", { fake_spl_context <- data.frame( cur_col_split_val = I(list(c(ARM = "Overall", count_prop = "count_prop"))) ) @@ -46,7 +50,9 @@ test_that("resp01_counts_cfun works as expected", { label_fstr = "Color: %s" ) expect_null(result) +}) +test_that("resp01_counts_cfun 3 works as expected", { fake_spl_context <- data.frame( cur_col_split_val = I(list(c(ARM = "A: Drug X", count_prop = "bla"))) ) @@ -60,7 +66,8 @@ test_that("resp01_counts_cfun works as expected", { expect_null(result) }) -test_that("resp01_a_comp_stat_logical works as expected", { + +test_that("resp01_a_comp_stat_logical or_cmh works as expected", { dm <- droplevels(subset(DM, SEX %in% c("F", "M"))) set.seed(123) dm$RESP <- as.logical(sample( @@ -86,7 +93,16 @@ test_that("resp01_a_comp_stat_logical works as expected", { ) ) expect_snapshot(result) +}) +test_that("resp01_a_comp_stat_logical or_logistic works as expected", { + dm <- droplevels(subset(DM, SEX %in% c("F", "M"))) + set.seed(123) + dm$RESP <- as.logical(sample( + c(TRUE, FALSE), + size = nrow(formatters::DM), + replace = TRUE + )) result <- resp01_a_comp_stat_logical( dm, .var = "RESP", @@ -107,7 +123,36 @@ test_that("resp01_a_comp_stat_logical works as expected", { expect_snapshot(result) }) -test_that("resp01_a_comp_stat_factor works as expected", { +test_that("resp01_a_comp_stat_logical rr works as expected", { + dm <- droplevels(subset(DM, SEX %in% c("F", "M"))) + set.seed(123) + dm$RESP <- as.logical(sample( + c(TRUE, FALSE), + size = nrow(formatters::DM), + replace = TRUE + )) + result <- resp01_a_comp_stat_logical( + dm, + .var = "RESP", + conf_level = 0.9, + include = TRUE, + arm = "SEX", + strata = "RACE", + stat = "comp_stat_ci", + methods = list( + comp_stat_ci = "rr", + pval = "" + ), + formats = list( + comp_stat_ci = jjcsformat_xx("xx.xx (xx.xx - xx.xx)"), + pval = jjcsformat_pval_fct(0.05) + ) + ) + expect_snapshot(result) +}) + + +test_that("resp01_a_comp_stat_factor or_cmh works as expected", { dm <- droplevels(subset(DM, SEX %in% c("F", "M"))) result <- resp01_a_comp_stat_factor( dm, @@ -127,6 +172,10 @@ test_that("resp01_a_comp_stat_factor works as expected", { ) ) expect_snapshot(result) +}) + +test_that("resp01_a_comp_stat_factor or_logistic works as expected", { + dm <- droplevels(subset(DM, SEX %in% c("F", "M"))) result <- resp01_a_comp_stat_factor( dm, @@ -170,6 +219,10 @@ test_that("resp01_acfun works as expected", { ) ) expect_snapshot(result) +}) + +test_that("resp01_acfun works 2 as expected", { + dm <- droplevels(subset(DM, SEX %in% c("F", "M"))) fake_spl_context <- data.frame( cur_col_split_val = I(list(c( @@ -198,7 +251,10 @@ test_that("resp01_acfun works as expected", { ) ) expect_snapshot(result) +}) +test_that("resp01_acfun 3 works as expected", { + dm <- droplevels(subset(DM, SEX %in% c("F", "M"))) dm$AGEOVER50 <- dm$AGE > 50 fake_spl_context <- data.frame( cur_col_split_val = I(list(c( diff --git a/tests/testthat/test-response_by_var.R b/tests/testthat/test-response_by_var.R index d3c618e8..4682664c 100644 --- a/tests/testthat/test-response_by_var.R +++ b/tests/testthat/test-response_by_var.R @@ -6,18 +6,18 @@ adsl <- ex_adsl adae <- ex_adae adae$TRTEMFL <- "Y" -had_ae <- adae %>% - filter(TRTEMFL == "Y") %>% - select(USUBJID, TRTEMFL) %>% +had_ae <- adae |> + filter(TRTEMFL == "Y") |> + select(USUBJID, TRTEMFL) |> distinct(USUBJID, .keep_all = TRUE) -adsl <- adsl %>% - left_join(had_ae, by = "USUBJID") %>% +adsl <- adsl |> + left_join(had_ae, by = "USUBJID") |> mutate(TRTEMFL = ifelse(is.na(TRTEMFL), "N", "Y")) test_that("response_by_var various scenarios", { - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE, round_type = "sas") |> + split_cols_by("ARM") |> analyze( vars = "SEX", var_labels = "Sex, n/Ns (%)", @@ -51,7 +51,7 @@ test_that("response_by_var various scenarios", { expect_snapshot(tbl2) ## Scenario 3: TRTEMFL has missing values and Y only, and analysis variable has missing values - adsl3 <- adsl %>% select(USUBJID, ARM, SEX, TRTEMFL) + adsl3 <- adsl |> select(USUBJID, ARM, SEX, TRTEMFL) adsl3$TRTEMFL <- ifelse(adsl3$TRTEMFL == "Y", "Y", NA) adsl3$TRTEMFL <- factor(adsl3$TRTEMFL, levels = "Y") adsl3$SEX[1:10] <- NA_character_ @@ -71,7 +71,7 @@ test_that("response_by_var various scenarios", { expect_snapshot(tbl3) ## Scenario 4: TRTEMFL has missing values and Y/N, and analysis variable has missing values - adsl4 <- adsl %>% select(USUBJID, ARM, SEX, TRTEMFL) + adsl4 <- adsl |> select(USUBJID, ARM, SEX, TRTEMFL) adsl4$SEX[1:10] <- NA_character_ adsl4$TRTEMFL[8:15] <- NA_character_ @@ -90,7 +90,7 @@ test_that("response_by_var various scenarios", { expect_snapshot(tbl4) ## Scenario 5: Analysis variable has a level not observed in data - adsl5 <- adsl %>% select(USUBJID, ARM, SEX, TRTEMFL) + adsl5 <- adsl |> select(USUBJID, ARM, SEX, TRTEMFL) adsl5$SEX <- factor( as.character(adsl5$SEX), levels = c(levels(adsl5$SEX), "extra level") diff --git a/tests/testthat/test-sorting_functions.R b/tests/testthat/test-sorting_functions.R index b1f1125e..bb355f0e 100644 --- a/tests/testthat/test-sorting_functions.R +++ b/tests/testthat/test-sorting_functions.R @@ -10,12 +10,12 @@ DM2$spanhead <- factor( levels = c("This is a Spanning Header", " ") ) -tab <- basic_table() %>% - split_cols_by("spanhead", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_rows_by("STRATA1") %>% - summarize_row_groups() %>% - analyze_vars("COUNTRY", .stats = "count_fraction") %>% +tab <- basic_table(round_type = "sas") |> + split_cols_by("spanhead", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_rows_by("STRATA1") |> + summarize_row_groups() |> + analyze_vars("COUNTRY", .stats = "count_fraction") |> build_table(DM2) #### Tests for jj_complex_scorefun function #### @@ -131,13 +131,13 @@ testthat::test_that("jj_complex_scorefun places specified category at the end: l testthat::expect_identical(result, expected) }) -tab2 <- basic_table() %>% - split_cols_by("spanhead", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("RACE") %>% - split_rows_by("STRATA1") %>% - summarize_row_groups() %>% - analyze_vars("COUNTRY", .stats = "count_fraction") %>% +tab2 <- basic_table(round_type = "sas") |> + split_cols_by("spanhead", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("RACE") |> + split_rows_by("STRATA1") |> + summarize_row_groups() |> + analyze_vars("COUNTRY", .stats = "count_fraction") |> build_table(DM2) testthat::test_that("jj_complex_scorefun uses first column to sort: usefirstcol", { diff --git a/tests/testthat/test-split_functions.R b/tests/testthat/test-split_functions.R index cd368e6f..e4c99c35 100644 --- a/tests/testthat/test-split_functions.R +++ b/tests/testthat/test-split_functions.R @@ -25,9 +25,10 @@ testthat::test_that("cond_rm_facets works", { lyt <- basic_table( top_level_section_div = " ", show_colcounts = TRUE, - colcount_format = "N=xx" - ) %>% - split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) %>% + colcount_format = "N=xx", + round_type = "sas" + ) |> + split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) |> split_cols_by("ARM", split_fun = mysplit) tbl <- build_table(lyt, adsl) @@ -55,8 +56,8 @@ testthat::test_that("rm_levels works", { pre = list(rm_levels(excl = c("JPN", "USA", "NGA"))) ) - lyt <- basic_table() %>% - split_rows_by("COUNTRY", split_fun = split_fun) %>% + lyt <- basic_table(round_type = "sas") |> + split_rows_by("COUNTRY", split_fun = split_fun) |> summarize_row_groups() # for simplicity tbl <- build_table(lyt, adsl) @@ -76,8 +77,8 @@ testthat::test_that("real_add_overall_facet works", { post = list(real_add_overall_facet("Overall", "Overall")) ) - lyt <- basic_table() %>% - split_rows_by("COUNTRY", split_fun = split_fun) %>% + lyt <- basic_table(round_type = "sas") |> + split_rows_by("COUNTRY", split_fun = split_fun) |> summarize_row_groups() # for simplicity tbl <- build_table(lyt, adsl) @@ -100,8 +101,8 @@ testthat::test_that("make_combo_splitfun works", { levels = c("USA", "CAN") ) - lyt <- basic_table() %>% - split_rows_by("COUNTRY", split_fun = split_fun) %>% + lyt <- basic_table(round_type = "sas") |> + split_rows_by("COUNTRY", split_fun = split_fun) |> summarize_row_groups() # for simplicity tbl <- build_table(lyt, adsl) @@ -123,3 +124,95 @@ testthat::test_that("make_combo_splitfun works", { expected ) }) + +testthat::test_that("combine_nonblank works", { + # function 'combine_nonblank' is similar to 'real_add_overall_facet' + # but the former one excludes the blank levels when computing the total numbers + set.seed(123) + n_blanks <- 10 + adsl <- ex_adsl + rows_with_blanks <- sample.int(nrow(adsl), n_blanks) + adsl$COUNTRY <- as.character(adsl$COUNTRY) + adsl[rows_with_blanks, "COUNTRY"] <- " " + adsl$COUNTRY <- as.factor(adsl$COUNTRY) + + split_fun <- make_split_fun(post = list(combine_nonblank("Overall", "Overall"))) + + lyt <- basic_table(round_type = "sas") |> + split_rows_by("COUNTRY", split_fun = split_fun) |> + summarize_row_groups() # for simplicity + + tbl <- build_table(lyt, adsl) + + expected <- c(levels(adsl$COUNTRY), "Overall") + + testthat::expect_equal( + row.names(tbl), + expected + ) + + result <- cell_values(tbl["Overall", ])[[1]][1] + expected <- nrow(adsl) - n_blanks + + testthat::expect_equal( + result, + expected + ) +}) + +testthat::test_that("rm_blank_levels works", { + set.seed(123) + n_blanks <- 10 + adsl <- ex_adsl + rows_with_blanks <- sample.int(nrow(adsl), n_blanks) + adsl$COUNTRY <- as.character(adsl$COUNTRY) + adsl[rows_with_blanks, "COUNTRY"] <- " " + adsl$COUNTRY <- as.factor(adsl$COUNTRY) + + split_fun <- make_split_fun( + pre = list(rm_blank_levels) + ) + + lyt <- basic_table(round_type = "sas") |> + split_rows_by("COUNTRY") |> + summarize_row_groups() + tbl <- build_table(lyt, adsl) + row_names_before <- rtables::row.names(tbl) + + lyt <- basic_table(round_type = "sas") |> + split_rows_by("COUNTRY", split_fun = split_fun) |> + summarize_row_groups() + tbl <- build_table(lyt, adsl) + row_names_after <- rtables::row.names(tbl) + + + testthat::expect_equal( + row_names_before, + c(" ", row_names_after) + ) +}) + +testthat::test_that("do_exclude_split works", { + exclude_levels <- list( + "COUNTRY" = c("USA", "CAN"), + "ARM" = c("B: Placebo") + ) + + spl_context1 <- data.frame( + split = c("STUDY", "COUNTRY"), + value = c("Study 1", "USA") + ) + expect_true(do_exclude_split(exclude_levels, spl_context1)) + + spl_context2 <- data.frame( + split = c("STUDY", "COUNTRY"), + value = c("Study 1", "MEX") + ) + expect_false(do_exclude_split(exclude_levels, spl_context2)) + + spl_context3 <- data.frame( + split = c("STUDY", "COUNTRY", "ARM"), + value = c("Study 1", "MEX", "B: Placebo") + ) + expect_true(do_exclude_split(exclude_levels, spl_context3)) +}) diff --git a/tests/testthat/test-string_to_title.R b/tests/testthat/test-string_to_title.R index 5ce742c8..7d0d4efb 100644 --- a/tests/testthat/test-string_to_title.R +++ b/tests/testthat/test-string_to_title.R @@ -11,3 +11,17 @@ test_that("string_to_title works as expected for character vector", { expected <- c("This Is An Example", "Statement To Capitalize") expect_identical(result, expected) }) + +test_that("string_to_title works as expected for factors", { + x <- factor("THIS IS an eXaMple statement TO CAPItaliZe") + result <- string_to_title(x) + expected <- factor("This Is An Example Statement To Capitalize") + expect_identical(result, expected) +}) + +test_that("string_to_title works as expected for factors (missing levels)", { + x <- factor(c("AbC def", "gHI"), levels = c("AbC def", "gHI", "jkl mnoP")) + result <- string_to_title(x) + expected <- factor(c("Abc Def", "Ghi"), levels = c("Abc Def", "Ghi", "Jkl Mnop")) + expect_identical(result, expected) +}) diff --git a/tests/testthat/test-summarize_ancova.R b/tests/testthat/test-summarize_ancova.R index 3d966a68..3256783e 100644 --- a/tests/testthat/test-summarize_ancova.R +++ b/tests/testthat/test-summarize_ancova.R @@ -55,7 +55,7 @@ test_that("s_ancova_j works as expected", { .ref_group = ref_group, .in_ref_col = FALSE, conf_level = 0.95, - weights = "proportional" + weights_emmeans = "proportional" ) checkmate::expect_list(result) checkmate::expect_names( @@ -84,6 +84,43 @@ test_that("s_ancova_j works as expected", { weights_emmeans = "equal" ) expect_false(result$lsmean == result2$lsmean) + + # try with n_obs_trt_lvls < 2 + df_row <- df_row |> + filter(Color == "red") + df <- df_row |> + filter(Species == "virginica") + variables <- list( + arm = "Color", + covariates = c("Sepal.Length * Sepal.Width", "Color") + ) + ref_group <- df_row |> + filter(Species == "setosa") + + result <- s_ancova_j( + df = df, + .var = "Petal.Length", + .df_row = df_row, + variables = variables, + .ref_group = ref_group, + .in_ref_col = FALSE, + conf_level = 0.95, + weights_emmeans = "proportional" + ) + checkmate::expect_list(result) + checkmate::expect_names( + names(result), + identical.to = c( + "n", + "lsmean", + "lsmean_se", + "lsmean_ci", + "lsmean_diff", + "lsmean_diff_ci", + "lsmean_diffci", + "pval" + ) + ) }) test_that("s_summarize_ancova works as expected", { @@ -106,9 +143,9 @@ test_that("s_summarize_ancova works as expected", { }) test_that("a_summarize_ancova_j works as expected in table layout", { - result <- basic_table() %>% - split_cols_by("Species") %>% - add_colcounts() %>% + result <- basic_table(round_type = "sas") |> + split_cols_by("Species") |> + add_colcounts() |> analyze( vars = "Petal.Length", afun = a_summarize_ancova_j, @@ -130,7 +167,7 @@ test_that("a_summarize_ancova_j works as expected in table layout", { "pval" ) ) - ) %>% + ) |> analyze( vars = "Petal.Length", afun = a_summarize_ancova_j, @@ -150,7 +187,7 @@ test_that("a_summarize_ancova_j works as expected in table layout", { "pval" ) ) - ) %>% + ) |> build_table(iris) expect_snapshot(result) }) diff --git a/tests/testthat/test-summarize_row_counts.R b/tests/testthat/test-summarize_row_counts.R index 7f540a5a..e2ae1c9f 100644 --- a/tests/testthat/test-summarize_row_counts.R +++ b/tests/testthat/test-summarize_row_counts.R @@ -1,11 +1,11 @@ library(rtables) test_that("summarize_row_counts works as expected without alt counts", { - lyt <- basic_table() %>% - split_cols_by("ARM") %>% - add_colcounts() %>% - split_rows_by("RACE", split_fun = drop_split_levels) %>% - summarize_row_counts(label_fstr = "Race: %s", alt_counts = FALSE) %>% + lyt <- basic_table() |> + split_cols_by("ARM") |> + add_colcounts() |> + split_rows_by("RACE", split_fun = drop_split_levels) |> + summarize_row_counts(label_fstr = "Race: %s", alt_counts = FALSE) |> analyze("AGE", afun = list_wrap_x(summary), format = "xx.xx") res <- expect_silent(build_table(lyt, formatters::DM)) @@ -18,11 +18,11 @@ test_that("summarize_row_counts works as expected without alt counts", { }) test_that("summarize_row_counts works as expected with alt counts", { - lyt <- basic_table() %>% - split_cols_by("ARM") %>% - add_colcounts() %>% - split_rows_by("RACE", split_fun = drop_split_levels) %>% - summarize_row_counts(label_fstr = "RACE value - %s") %>% + lyt <- basic_table() |> + split_cols_by("ARM") |> + add_colcounts() |> + split_rows_by("RACE", split_fun = drop_split_levels) |> + summarize_row_counts(label_fstr = "RACE value - %s") |> analyze("AGE", afun = list_wrap_x(summary), format = "xx.xx") res <- expect_silent(build_table( diff --git a/tests/testthat/test-tabulate_lsmeans.R b/tests/testthat/test-tabulate_lsmeans.R index 4a732ae4..6f9116c6 100644 --- a/tests/testthat/test-tabulate_lsmeans.R +++ b/tests/testthat/test-tabulate_lsmeans.R @@ -68,12 +68,12 @@ test_that("summarize_lsmeans can show two- and one-sided p-values correctly", { names(df) ) - dat_adsl <- mmrm::fev_data %>% - select(USUBJID, ARMCD) %>% + dat_adsl <- mmrm::fev_data |> + select(USUBJID, ARMCD) |> unique() - start_lyt <- basic_table() %>% - split_cols_by("ARMCD") %>% - add_colcounts() %>% + start_lyt <- basic_table() |> + split_cols_by("ARMCD") |> + add_colcounts() |> split_rows_by("AVISIT") lyt_two_sided <- start_lyt |> diff --git a/tests/testthat/test-tabulate_lsmeans_wide.R b/tests/testthat/test-tabulate_lsmeans_wide.R index d315b726..28f16b92 100644 --- a/tests/testthat/test-tabulate_lsmeans_wide.R +++ b/tests/testthat/test-tabulate_lsmeans_wide.R @@ -102,6 +102,20 @@ test_that("lsmeans_wide_cfun works as expected", { formats = list() ) expect_snapshot(result) + + result <- lsmeans_wide_cfun( + df, + labelstr = "Day 15 (DB)", + .spl_context = data.frame( + cur_col_split_val = I(list(c("reference_group", "se"))) + ), + conf_level = 0.9, + variables = list(arm = "TRT01P", visit = "AVISIT"), + ref_level = "Placebo", + treatment_levels = "Seltorexant 20 mg", + formats = list() + ) + expect_snapshot(result) }) test_that("lsmeans_wide_cfun works as expected with more than one treatment group", { diff --git a/tests/testthat/test-tabulate_rbmi.R b/tests/testthat/test-tabulate_rbmi.R index 81db9f7a..7fcd7c2e 100644 --- a/tests/testthat/test-tabulate_rbmi.R +++ b/tests/testthat/test-tabulate_rbmi.R @@ -1,5 +1,11 @@ library(broom) +if (requireNamespace("rbmi", quietly = TRUE)) { + suppressPackageStartupMessages(library(rbmi)) +} else { + skip("rbmi package not available") +} + # rbmi_test_data ---- rbmi_test_data_ancova <- structure( @@ -284,9 +290,9 @@ test_that("s_rbmi_lsmeans also works with show_relative = increase", { test_that("a_rbmi_lsmeans works as expected in table layout", { df <- tidy(rbmi_test_data_ancova, visits = c("4", "5")) - lyt <- basic_table() %>% - split_cols_by("group") %>% - split_rows_by("visit", split_label = "Visit", label_pos = "topleft") %>% + lyt <- basic_table() |> + split_cols_by("group") |> + split_rows_by("visit", split_label = "Visit", label_pos = "topleft") |> analyze( "group", afun = a_rbmi_lsmeans, diff --git a/tests/testthat/test-tern_utils_default_stats_formats_labels.R b/tests/testthat/test-tern_utils_default_stats_formats_labels.R index 33f7408c..dd7ee94f 100644 --- a/tests/testthat/test-tern_utils_default_stats_formats_labels.R +++ b/tests/testthat/test-tern_utils_default_stats_formats_labels.R @@ -176,7 +176,7 @@ testthat::test_that("tern_get_labels_from_stats works as expected", { names(stats_to_do), labels_in = c(stats_to_do, "catch_me" = "xx") ), - stats_to_do %>% as.list() + stats_to_do |> as.list() ) }) @@ -206,7 +206,7 @@ testthat::test_that("tern_get_labels_from_stats with labels in works when adding "count_fraction.a" = "any A", "count_fraction.b" = "CF: B", "count_fraction.c" = "Lvl c:" - ) %>% + ) |> as.list() ) }) @@ -268,7 +268,7 @@ testthat::test_that("tern_get_indents_from_stats works as expected", { c(names(stats_to_do), "n"), indents_in = stats_to_do ), - c(stats_to_do, n = 0L) %>% as.list() + c(stats_to_do, n = 0L) |> as.list() ) }) diff --git a/tests/testthat/test-test_proportion_diff.R b/tests/testthat/test-test_proportion_diff.R index d5a3e5b5..1506637e 100644 --- a/tests/testthat/test-test_proportion_diff.R +++ b/tests/testthat/test-test_proportion_diff.R @@ -1,42 +1,3 @@ -test_that("s_test_proportion_diff works as expected", { - set.seed(123, kind = "Mersenne-Twister") - dta <- data.frame( - rsp = sample(c(TRUE, FALSE), 100, TRUE), - grp = factor(rep(c("A", "B"), each = 50)), - strata = factor(rep(c("V", "W", "X", "Y", "Z"), each = 20)) - ) - - result <- s_test_proportion_diff( - df = subset(dta, grp == "A"), - .var = "rsp", - .ref_group = subset(dta, grp == "B"), - .in_ref_col = FALSE, - method = "cmh", - variables = list(strata = "strata") - ) - expect_snapshot(result) - - result <- s_test_proportion_diff( - df = subset(dta, grp == "A"), - .var = "rsp", - .ref_group = subset(dta, grp == "B"), - .in_ref_col = FALSE, - method = "cmh", - variables = list(strata = "strata"), - alternative = "greater" - ) - expect_snapshot(result) - - result <- s_test_proportion_diff( - df = subset(dta, grp == "A"), - .var = "rsp", - .in_ref_col = TRUE, - method = "cmh", - alternative = "greater" - ) - expect_snapshot(result) -}) - test_that("a_test_proportion_diff works as expected in table layout", { set.seed(123, kind = "Mersenne-Twister") dta <- data.frame( @@ -45,8 +6,8 @@ test_that("a_test_proportion_diff works as expected in table layout", { strata = factor(rep(c("V", "W", "X", "Y", "Z"), each = 20)) ) - l <- basic_table() %>% - split_cols_by(var = "grp") %>% + l <- basic_table() |> + split_cols_by(var = "grp") |> analyze( vars = "rsp", afun = a_test_proportion_diff, @@ -61,132 +22,3 @@ test_that("a_test_proportion_diff works as expected in table layout", { result <- expect_silent(build_table(l, df = dta)) expect_snapshot(result) }) - - -# Tests below have been amended from tern/tests/testthat/test-test_proportion_diff.R - -test_that("prop_chisq returns right result", { - set.seed(1, kind = "Mersenne-Twister") - rsp <- c( - sample(c(TRUE, FALSE), size = 20, prob = c(3 / 4, 1 / 4), replace = TRUE), - sample(c(TRUE, FALSE), size = 20, prob = c(1 / 2, 1 / 2), replace = TRUE) - ) - grp <- c(rep("A", 20), rep("B", 20)) - tbl <- table(grp, rsp) - - result <- prop_chisq(tbl, alternative = "two.sided") - res <- expect_silent(result) - expect_snapshot(res) - - # New part: - result <- prop_chisq(tbl, alternative = "less") - res <- expect_silent(result) - expect_snapshot(res) - - result <- prop_chisq(tbl, alternative = "greater") - res <- expect_silent(result) - expect_snapshot(res) -}) - -test_that("prop_cmh returns right result", { - set.seed(1, kind = "Mersenne-Twister") - rsp <- sample(c(TRUE, FALSE), 100, TRUE) - grp <- factor(rep(c("A", "B"), each = 50)) - strata <- factor(rep(c("V", "W", "X", "Y", "Z"), each = 20)) - tbl <- table(grp, rsp, strata) - result <- prop_cmh(tbl, alternative = "two.sided") - - res <- expect_silent(result) - expect_snapshot(res) - - # New part: - result <- prop_cmh(tbl, alternative = "less") - res <- expect_silent(result) - expect_snapshot(res) - - result <- prop_cmh(tbl, alternative = "greater") - res <- expect_silent(result) - expect_snapshot(res) -}) - -test_that("prop_cmh also works when there are strata with just one observation", { - tbl <- structure( - c( - 20L, - 17L, - 7L, - 10L, - 0L, - 0L, - 2L, - 3L, - 21L, - 14L, - 3L, - 0L, - 0L, - 0L, - 1L, - 0L, - 21L, - 18L, - 3L, - 4L, - 79L, - 16L, - 30L, - 9L, - 1L, - 0L, - 13L, - 4L - ), - .Dim = c(2L, 2L, 7L), - .Dimnames = list( - grp = c("Placebo", "Treatment"), - x = c("no", "yes"), - strata = c("A", "B", "C", "D", "E", "F", "G") - ), - class = "table" - ) - - expect_warning( - result <- prop_cmh(tbl, alternative = "two.sided"), - "<5 data points in some strata. CMH test may be incorrect." - ) - - res <- expect_silent(result) - expect_snapshot(res) - - # New part: - expect_warning(result <- prop_cmh(tbl, alternative = "less")) - res <- expect_silent(result) - expect_snapshot(res) - - expect_warning(result <- prop_cmh(tbl, alternative = "greater")) - res <- expect_silent(result) - expect_snapshot(res) -}) - -test_that("prop_fisher returns right result", { - set.seed(1, kind = "Mersenne-Twister") - rsp <- c( - sample(c(TRUE, FALSE), size = 20, prob = c(3 / 4, 1 / 4), replace = TRUE), - sample(c(TRUE, FALSE), size = 20, prob = c(1 / 2, 1 / 2), replace = TRUE) - ) - grp <- c(rep("A", 20), rep("B", 20)) - tbl <- table(grp, rsp) - result <- prop_fisher(tbl, alternative = "two.sided") - - res <- expect_silent(result) - expect_snapshot(res) - - # New part: - result <- prop_fisher(tbl, alternative = "less") - res <- expect_silent(result) - expect_snapshot(res) - - result <- prop_fisher(tbl, alternative = "greater") - res <- expect_silent(result) - expect_snapshot(res) -}) diff --git a/tests/testthat/test-titles_file.R b/tests/testthat/test-titles_file.R index 80d4b36f..e2db34e7 100644 --- a/tests/testthat/test-titles_file.R +++ b/tests/testthat/test-titles_file.R @@ -12,7 +12,7 @@ titledf <- tribble( write.csv(titledf, file = file.path(tdir, "titles.csv"), row.names = FALSE) test_that("title files work", { - res <- get_titles_from_file("tbl001", input_path = tdir) + suppressMessages(res <- get_titles_from_file("tbl001", input_path = tdir)) expect_identical( res, list( @@ -22,7 +22,7 @@ test_that("title files work", { prov_footer = NULL ) ) - expect_warning(get_titles_from_file("lololol", input_path = tdir)) + expect_warning(suppressMessages(get_titles_from_file("lololol", input_path = tdir))) lyt <- basic_table() |> analyze("AGE") diff --git a/tests/testthat/test-tt_to_tblfile.R b/tests/testthat/test-tt_to_tblfile.R index facc31bb..603b18b8 100644 --- a/tests/testthat/test-tt_to_tblfile.R +++ b/tests/testthat/test-tt_to_tblfile.R @@ -1,6 +1,8 @@ library(rtables) library(rlistings) + options(tidytlg.add_datetime = FALSE) + mk_part_names <- function(nfiles, fname) { if (nfiles > 1) { vapply(seq_len(nfiles), @@ -14,9 +16,23 @@ mk_part_names <- function(nfiles, fname) { fname } } -rtf_out_wrapper <- function(tt, filnm, ..., part = 1, combined = FALSE) { + +rtf_out_wrapper <- function( + tt, + filnm, + ..., + part = 1, + combined = FALSE, + round_type = obj_round_type(tt) +) { fullfl <- file.path(tempdir(), filnm) - res <- tt_to_tlgrtf(tt, file = fullfl, ..., combined_rtf = combined) + res <- tt_to_tlgrtf( + tt, + file = fullfl, + ..., + combined_rtf = combined, + round_type = round_type + ) nf <- length(res) if (combined) { paste0(fullfl, "allparts.rtf") @@ -30,21 +46,145 @@ rtf_out_wrapper <- function(tt, filnm, ..., part = 1, combined = FALSE) { } } -test_that("tt_to_tlgrtf converts table tree to tlg without error", { - # Create a simple table for testing - data(ex_adsl) - lyt <- basic_table() %>% - split_cols_by("ARM") %>% +# all elements result in different rounding sas vs iec with format xx.xx +# third element only results in different rounding iec_mod vs iec with format xx.xx +vals_round_type <- c(1.865, 2.985, -0.001) + +vals_round_type_fmt <- function(vals = vals_round_type, round_type = "sas") { + mapply(format_value, x = vals, format = "xx.xx", round_type = round_type) +} + +tt_to_test_round_type <- function(vals = vals_round_type, round_type = "iec") { + require(dplyr, quietly = TRUE) + txtvals_iec <- vals_round_type_fmt(vals = vals, round_type = "iec") + txtvals_sas <- vals_round_type_fmt(vals = vals, round_type = "sas") + + # confirmation that at least one of the values result in different format presentation + expect_true(any(txtvals_iec != txtvals_sas)) + + adsl <- ex_adsl + + adsl <- adsl |> + mutate(new_var = case_when( + ARMCD == "ARM A" ~ vals[1], + ARMCD == "ARM B" ~ vals[2], + ARMCD == "ARM C" ~ vals[3] + )) + + lyt <- basic_table(show_colcounts = FALSE, round_type = round_type) |> + split_cols_by("ARMCD") |> + analyze(c("new_var"), function(x) { + in_rows( + mean = mean(x), + .formats = c("xx.xx"), + .labels = c("Mean") + ) + }) + + tbl <- build_table(lyt, adsl) +} + +listingdf_to_test_round_type <- function(vals = vals_round_type, round_type = "iec") { + require(dplyr, quietly = TRUE) + txtvals_iec <- vals_round_type_fmt(vals = vals, round_type = "iec") + txtvals_sas <- vals_round_type_fmt(vals = vals, round_type = "sas") + + # confirmation that at least one of the values result in different format presentation + expect_true(any(txtvals_iec != txtvals_sas)) + + lsting <- ex_adae |> + dplyr::select(USUBJID, AGE, SEX, RACE, ARM, BMRKR1) |> + dplyr::distinct() |> + dplyr::group_by(ARM) |> + dplyr::slice_head(n = 2) |> + dplyr::ungroup() + + lsting[1, "BMRKR1"] <- 1.865 + lsting[2, "BMRKR1"] <- 2.985 + lsting[3, "BMRKR1"] <- -0.001 + + lsting <- lsting |> + dplyr::mutate( + AGE = tern::explicit_na(as.character(AGE), ""), + SEX = tern::explicit_na(SEX, ""), + RACE = explicit_na(RACE, ""), + COL0 = explicit_na(.data[["ARM"]], ""), + COL1 = explicit_na(USUBJID, ""), + COL2 = paste(AGE, SEX, RACE, sep = " / "), + COL3 = BMRKR1 + ) |> + arrange(COL0, COL1) + + lsting <- formatters::var_relabel( + lsting, + COL0 = "Treatment Group", + COL1 = "Subject ID", + COL2 = paste("Age (years)", "Sex", "Race", sep = " / "), + COL3 = "Biomarker 1" + ) + + ls1 <- rlistings::as_listing( + df = lsting, + key_cols = c("COL0", "COL1"), + disp_cols = c("COL0", "COL1", "COL2", "COL3"), + col_formatting = list(COL3 = formatters::fmt_config(format = "xx.xx")) + ) + + list( + df = lsting, + lsting = ls1 + ) +} + +test_that("tt_to_tlgrtf works with input Table and fontspec size 8", { + lyt_wide <- basic_table() |> + split_cols_by("ARM") |> + split_cols_by("STRATA1") |> + split_cols_by("SEX") |> + split_rows_by("RACE") |> + summarize_row_groups() |> analyze("AGE") - tbl <- build_table(lyt, ex_adsl) + tbl_wide <- build_table(lyt_wide, ex_adsl) + fontspec <- font_spec("Times", 8L, 1.2) + expect_no_error(rtf_out_wrapper(tbl_wide, "testfontsize8", fontspec = fontspec)) +}) - # test that it runs without error - expect_snapshot_file(rtf_out_wrapper(tbl, "test1"), cran = TRUE) - expect_snapshot_file(rtf_out_wrapper(tbl, "test1b", colwidths = 120), cran = TRUE) - expect_no_error(suppressMessages(result <- tt_to_tlgrtf(tbl, file = tempfile()))) - expect_true(is.null(result[[1]])) +test_that("tt_to_tlgrtf works with an empty listing", { + empty_lsting <- as_listing(ex_adsl[numeric(), 1:10]) + expect_snapshot_file(compare = compare_file_text, rtf_out_wrapper(empty_lsting, "testemptylisting"), cran = TRUE) + expect_error( + tt_to_tlgrtf("hi"), + "unable to determine tlg type" + ) +}) + +test_that("get_ncol works as expected", { + tt <- as_listing(ex_adsl[, 1:10]) + expect_equal(get_ncol(tt), ncol(tt)) + + lyt_wide <- basic_table() |> + split_cols_by("ARM") |> + split_cols_by("STRATA1") |> + split_cols_by("SEX") |> + split_rows_by("RACE") |> + summarize_row_groups() |> + analyze("AGE") + tbl_wide <- build_table(lyt_wide, ex_adsl) + expect_equal(get_ncol(tbl_wide), ncol(tbl_wide)) + + mpf <- rlistings::matrix_form(tbl_wide) + expect_equal(get_ncol(mpf), ncol(tbl_wide)) + + l <- list(tbl_wide) + expect_equal(get_ncol(l), ncol(tbl_wide)) + + l <- list(mpf) + expect_equal(get_ncol(l), ncol(tbl_wide)) +}) + +test_that("tt_to_tlgrtf works with wide table", { ## wide enough for pagination: lyt_wide <- basic_table() |> @@ -58,17 +198,47 @@ test_that("tt_to_tlgrtf converts table tree to tlg without error", { tbl_wide <- build_table(lyt_wide, ex_adsl) expect_silent(suppressMessages(res_wide <- rtf_out_wrapper(tbl_wide, "test2", part = NA))) for (fl in res_wide) { - expect_snapshot_file(fl, cran = TRUE) - expect_snapshot_file(gsub("rtf$", "csv", fl)) + expect_snapshot_file(compare = compare_file_text, fl, cran = TRUE) + expect_snapshot_file(compare = compare_file_text, gsub("rtf$", "csv", fl)) } - expect_silent(suppressMessages(cmb_fl <- rtf_out_wrapper(tbl_wide, "test2", combined = TRUE))) - expect_snapshot_file(cmb_fl, cran = TRUE) +}) + +test_that("tt_to_tlgrtf works with argument combined_rtf = TRUE", { + ## wide enough for pagination: + + lyt_wide <- basic_table() |> + split_cols_by("ARM") |> + split_cols_by("STRATA1") |> + split_cols_by("SEX") |> + split_rows_by("RACE") |> + summarize_row_groups() |> + analyze("AGE") + + tbl_wide <- build_table(lyt_wide, ex_adsl) + expect_silent(suppressMessages(cmb_fl <- rtf_out_wrapper(tbl_wide, "test3", combined = TRUE))) + expect_snapshot_file(compare = compare_file_text, cmb_fl, cran = TRUE) res_nullfl <- expect_silent(tt_to_tlgrtf(tbl_wide, file = NULL)) expect_equal(length(res_nullfl), 7) - expect_equal(sapply(res_nullfl, nrow), rep(nrow(tbl_wide) + nlines(col_info(tbl_wide)), 7)) + ## extraneous empty line when we turn off timestamp line fix in next release + expect_equal(sapply(res_nullfl, nrow), rep(nrow(tbl_wide) + nlines(col_info(tbl_wide)), 7) + 1) +}) + +test_that("tt_to_tlgrtf converts table tree to tlg without error", { + # Create a simple table for testing + lyt <- basic_table() |> + split_cols_by("ARM") |> + analyze("AGE") + + tbl <- build_table(lyt, ex_adsl) + + # test that it runs without error + expect_snapshot_file(compare = compare_file_text, rtf_out_wrapper(tbl, "test1"), cran = TRUE) + expect_snapshot_file(compare = compare_file_text, rtf_out_wrapper(tbl, "test1b", colwidths = 120), cran = TRUE) + expect_no_error(suppressMessages(result <- tt_to_tlgrtf(tbl, file = tempfile()))) + expect_true(is.null(result[[1]])) lsting <- as_listing(ex_adsl[1:30, 1:10]) - expect_snapshot_file(rtf_out_wrapper(lsting, "listing1"), cran = TRUE) + expect_snapshot_file(compare = compare_file_text, rtf_out_wrapper(lsting, "listing1"), cran = TRUE) badlyt <- basic_table() |> split_rows_by("ARM") |> @@ -76,15 +246,20 @@ test_that("tt_to_tlgrtf converts table tree to tlg without error", { badtbl <- build_table(badlyt, ex_adsl) - ## this test is largely meaningless because it doesn't get caught - ## when calling tt_to_tlgrtf directly.... + ## Test that an error is issued when validate=TRUE (default behavior) expect_error(tt_to_tbldf(badtbl)) + expect_error(tt_to_tbldf(badtbl, validate = TRUE)) - empty_lsting <- as_listing(ex_adsl[numeric(), 1:10]) - expect_snapshot_file(rtf_out_wrapper(empty_lsting, "testemptylisting"), cran = TRUE) - expect_error( - tt_to_tlgrtf("hi"), - "unable to determine tlg type" + ## Test that a message is issued when validate=FALSE + expect_message( + tt_to_tbldf(badtbl, validate = FALSE), + "Invalid table structure detected" + ) + + ## Test that a different message is issued for valid tables when validate=FALSE + expect_message( + tt_to_tbldf(tbl, validate = FALSE), + "Table structure validation succeeded" ) lyt_pgby <- basic_table() |> @@ -98,7 +273,7 @@ test_that("tt_to_tlgrtf converts table tree to tlg without error", { tbl_pgby <- build_table(lyt_pgby, ex_adsl) expect_silent(suppressMessages(res_pgby <- rtf_out_wrapper(tbl_pgby, "testpageby", part = NA))) for (fl in res_pgby) { - expect_snapshot_file(fl, cran = TRUE) + expect_snapshot_file(compare = compare_file_text, fl, cran = TRUE) } }) @@ -137,3 +312,159 @@ test_that("make_bordmat_row creates border matrix row correctly", { # Match the actual output pattern expect_equal(result2, c(1, 1, 2, 2, 2)) }) + +test_that("tt_to_tlgrtf validates table structure correctly", { + # Create an invalid table structure (similar to badtbl in previous test) + data(ex_adsl) + badlyt <- basic_table() |> + split_rows_by("ARM") |> + summarize_row_groups() + + badtbl <- build_table(badlyt, ex_adsl) + + # Test that a message is issued when validate=TRUE + expect_message( + tt_to_tlgrtf(badtbl, file = NULL, validate = TRUE), + "Invalid table structure detected" + ) + + # Test that no message is issued when validate=FALSE + expect_no_message( + tt_to_tlgrtf(badtbl, file = NULL, validate = FALSE) + ) + + # Test that the default behavior (validate=TRUE) issues a message + expect_message( + tt_to_tlgrtf(badtbl, file = NULL), + "Invalid table structure detected" + ) +}) + +test_that("tt_to_tlgrtf does not message for valid table structures with validate=TRUE", { + # Create a valid table structure + data(ex_adsl) + lyt <- basic_table() |> + split_cols_by("ARM") |> + analyze("AGE") + + tbl <- build_table(lyt, ex_adsl) + + # Test that no message is issued for a valid table with validate=TRUE + expect_no_message( + tt_to_tlgrtf(tbl, file = NULL, validate = TRUE) + ) +}) + +test_that("tt_to_tlgrtf validates valid table structures correctly", { + # Create a valid table structure + data(ex_adsl) + lyt <- basic_table() |> + split_cols_by("ARM") |> + analyze("AGE") + + tbl <- build_table(lyt, ex_adsl) + + # Test that a message is issued for valid tables when validate=FALSE + expect_message( + tt_to_tlgrtf(tbl, file = NULL, validate = FALSE), + "Table structure validation succeeded" + ) + + # Test that no message is issued for valid tables when validate=TRUE + expect_no_message( + tt_to_tlgrtf(tbl, file = NULL, validate = TRUE) + ) +}) + +test_that("more top left than col headers works", { + data <- data.frame( + TRT01A = "Dummy Treatment A", + SEX = "M", + AGEGR1 = "<65 years", + RACE = "white", + AGE = 65, + empty_split = " " + ) + + lyt <- basic_table() |> + split_cols_by("empty_split") |> + split_cols_by("TRT01A") |> + split_rows_by("SEX", label_pos = "topleft") |> + split_rows_by("AGEGR1", label_pos = "topleft") |> + split_rows_by("RACE", label_pos = "topleft") |> + analyze("AGE") + + tbl <- build_table(lyt, data) + tmpfile <- tempfile() + expect_silent(tt_to_tlgrtf(tbl, file = tmpfile)) + expect_true(file.exists(paste0(tmpfile, ".rtf"))) + unlink(tmpfile) +}) + +test_that("round_type in tt_to_tbldf works as expected for tabletree object", { + tbl_iec <- tt_to_test_round_type(round_type = "iec") + tbldf <- tt_to_tbldf(tbl_iec) + tbldf_sas <- tt_to_tbldf(tbl_iec, round_type = "sas") + expect_true(any(tbldf != tbldf_sas)) + expect_true(all( + tbldf[, c("col 1", "col 2", "col 3")] == + vals_round_type_fmt( + vals = vals_round_type, + round_type = "iec" + ) + )) + expect_true(all( + tbldf_sas[, c("col 1", "col 2", "col 3")] == + vals_round_type_fmt( + vals = vals_round_type, + round_type = "sas" + ) + )) +}) + +test_that("round_type in tt_to_tlgrtf works as expected for tabletree object", { + tbl_iec <- tt_to_test_round_type(round_type = "iec") + expect_silent(suppressMessages(rtf_sas <- rtf_out_wrapper(tbl_iec, "test4sas", round_type = "sas"))) + expect_snapshot_file(compare = compare_file_text, rtf_sas, cran = TRUE) + expect_silent(suppressMessages(rtf_iec_mod <- rtf_out_wrapper(tbl_iec, "test4iecmod", round_type = "iec_mod"))) + expect_snapshot_file(compare = compare_file_text, rtf_iec_mod, cran = TRUE) + expect_silent(suppressMessages(rtf_iec <- rtf_out_wrapper(tbl_iec, "test4iec", round_type = "iec"))) + expect_snapshot_file(compare = compare_file_text, rtf_iec, cran = TRUE) + + # test actual values for sas rounding + res_nullfl <- expect_silent(tt_to_tlgrtf(tbl_iec, round_type = "sas", file = NULL)) + + vals_from_res_nullfl <- res_nullfl[[1]][[1]] + vals_from_res_nullfl <- unname(unlist(vals_from_res_nullfl[3, 2:4])) + + expect_true(all( + vals_from_res_nullfl == + vals_round_type_fmt( + vals = vals_round_type, + round_type = "sas" + ) + )) +}) + +test_that("round_type in tt_to_tlgrtf works as expected for listing object", { + listdf_iec <- listingdf_to_test_round_type() + list_iec <- listdf_iec$lsting + df <- listdf_iec$df + + res_nullfl_sas <- expect_silent(tt_to_tlgrtf(list_iec, round_type = "sas", file = NULL)) + res_nullfl_iec <- expect_silent(tt_to_tlgrtf(list_iec, round_type = "iec", file = NULL)) + vals_from_res_nullfl_sas <- res_nullfl_sas[[1]][[4]][-c(1:2, 9)] + vals_from_res_nullfl_iec <- res_nullfl_iec[[1]][[4]][-c(1:2, 9)] + + expect_identical( + vals_round_type_fmt(vals = df[["BMRKR1"]], round_type = "sas"), + vals_from_res_nullfl_sas + ) + + expect_identical( + vals_round_type_fmt(vals = df[["BMRKR1"]], round_type = "iec"), + vals_from_res_nullfl_iec + ) + + expect_true(any(vals_from_res_nullfl_iec != vals_from_res_nullfl_sas)) +}) diff --git a/tests/testthat/test-unicodify.R b/tests/testthat/test-unicodify.R deleted file mode 100644 index 8b979d27..00000000 --- a/tests/testthat/test-unicodify.R +++ /dev/null @@ -1,72 +0,0 @@ -library(testthat) - -test_that("unicodify replaces patterns with Unicode characters", { - # Test input strings - input <- c( - "Value >= 10", - "Value <= 5", - "Values 5 <= x <= 10" - ) - - # Expected output with Unicode replacements - expected <- c( - paste0("Value ", intToUtf8(strtoi("2265", base = 16)), " 10"), - paste0("Value ", intToUtf8(strtoi("2264", base = 16)), " 5"), - paste0( - "Values 5 ", - intToUtf8(strtoi("2264", base = 16)), - " x ", - intToUtf8(strtoi("2264", base = 16)), - " 10" - ) - ) - - # Create a test map - test_map <- tibble::tribble( - ~pattern, - ~unicode, - ">=", - "2265", - "<=", - "2264" - ) - - # Run the function - result <- unicodify(input, test_map) - - # Check results - expect_equal(result[1], expected[1]) - expect_equal(result[2], expected[2]) - expect_equal(result[3], expected[3]) - - # Test with empty input - expect_equal(unicodify(character(0), test_map), character(0)) - - # Test with no matches - expect_equal( - unicodify("No special characters here", test_map), - "No special characters here" - ) -}) - -test_that("unicodify works with the default jj_uc_map", { - # Test with the default map - input <- c("Value >= 10", "Value <= 5") - result <- unicodify(input, jj_uc_map) - - # Check that replacements were made - expect_false(grepl(">=", result[1], fixed = TRUE)) - expect_false(grepl("<=", result[2], fixed = TRUE)) - - # Verify the specific Unicode characters were inserted - expect_true(grepl( - intToUtf8(strtoi("2265", base = 16)), - result[1], - fixed = TRUE - )) - expect_true(grepl( - intToUtf8(strtoi("2264", base = 16)), - result[2], - fixed = TRUE - )) -}) diff --git a/tests/testthat/test-varia.R b/tests/testthat/test-varia.R index 07e23608..48de980a 100644 --- a/tests/testthat/test-varia.R +++ b/tests/testthat/test-varia.R @@ -12,7 +12,7 @@ testthat::test_that("a_freq_j works (old count_unq case)", { top_level_section_div = " ", show_colcounts = TRUE, colcount_format = "N=xx" - ) %>% + ) |> analyze( "TRTEMFL", afun = a_freq_j, @@ -36,7 +36,7 @@ testthat::test_that("a_freq_j works (old count_unq case)", { top_level_section_div = " ", show_colcounts = TRUE, colcount_format = "N=xx" - ) %>% + ) |> analyze( "TRTEMFL", afun = a_freq_j, @@ -58,7 +58,7 @@ testthat::test_that("a_freq_j works (old count_unq case)", { testthat::test_that("a_freq_subcol_j works (old case of cpct_subcol)", { adsl <- ex_adsl - adae <- ex_adae %>% dplyr::select(USUBJID, AEBODSYS, AEDECOD, AREL) + adae <- ex_adae |> dplyr::select(USUBJID, AEBODSYS, AEDECOD, AREL) adae$TRTEMFL <- "Y" adsl$COLSPAN_REL <- "AEs" @@ -87,12 +87,12 @@ testthat::test_that("a_freq_subcol_j works (old case of cpct_subcol)", { top_level_section_div = " ", show_colcounts = TRUE, colcount_format = "N=xx" - ) %>% + ) |> split_cols_by( "COLSPAN_REL", split_fun = add_combo_levels(combodf, trim = TRUE) - ) %>% - split_cols_by("ARM") %>% + ) |> + split_cols_by("ARM") |> analyze( "TRTEMFL", afun = a_freq_subcol_j, @@ -125,7 +125,7 @@ testthat::test_that("a_freq_subcol_j works (old case of cpct_subcol)", { }) testthat::test_that("a_freq_combos_j (old cpct_filter_combos case) works", { - adsl <- ex_adsl %>% + adsl <- ex_adsl |> mutate( months = (EOSDY + 30) / 30.4375, ACAT1 = case_when( @@ -139,16 +139,16 @@ testthat::test_that("a_freq_combos_j (old cpct_filter_combos case) works", { ACAT1, levels = c("Within 3 months", "4 to 12 months", "Beyond 13 months") ) - ) %>% + ) |> select(USUBJID, ARM, EOSDY, ACAT1, months) - adae <- ex_adae %>% dplyr::select(USUBJID, AEBODSYS, AEDECOD, ASTDY, ARM) + adae <- ex_adae |> dplyr::select(USUBJID, AEBODSYS, AEDECOD, ASTDY, ARM) adae$TRTEMFL <- "Y" adae$TRTEMFL <- factor(adae$TRTEMFL) - adae <- adae %>% + adae <- adae |> # ACAT1 derivation - mutate(months = (ASTDY + 30) / 30.4375) %>% + mutate(months = (ASTDY + 30) / 30.4375) |> mutate( ACAT1 = case_when( months <= 3 ~ "Within 3 months", @@ -156,7 +156,7 @@ testthat::test_that("a_freq_combos_j (old cpct_filter_combos case) works", { months > 12 ~ "Beyond 13 months", .default = NA_character_ ) - ) %>% + ) |> mutate( ACAT1 = factor( ACAT1, @@ -167,11 +167,11 @@ testthat::test_that("a_freq_combos_j (old cpct_filter_combos case) works", { NA ) ) - ) %>% - select(-months) %>% + ) |> + select(-months) |> # first occurrence derivation - arrange(USUBJID, ASTDY) %>% - group_by(USUBJID) %>% + arrange(USUBJID, ASTDY) |> + group_by(USUBJID) |> mutate(AOCCFL = case_when(row_number() == 1 ~ "Y")) # This df generates facets for column space : levels from adsl ACAT1 need to be cumulative @@ -211,8 +211,8 @@ testthat::test_that("a_freq_combos_j (old cpct_filter_combos case) works", { "Subjects with >= 1 AE" ) - lyt <- basic_table(top_level_section_div = " ", show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(top_level_section_div = " ", show_colcounts = TRUE) |> + split_cols_by("ARM") |> split_cols_by( "ACAT1", split_fun = add_combo_levels( @@ -220,7 +220,7 @@ testthat::test_that("a_freq_combos_j (old cpct_filter_combos case) works", { trim = FALSE, keep_levels = combodf$valname ) - ) %>% + ) |> analyze( "TRTEMFL", nested = FALSE, @@ -247,20 +247,20 @@ testthat::test_that("a_freq_combos_j (old cpct_filter_combos case) works", { n_denom <- nrow( unique( - adsl %>% + adsl |> filter( ARM == "A: Drug X" & ACAT1 %in% c("4 to 12 months", "Beyond 13 months") - ) %>% + ) |> select(USUBJID) ) ) n_val <- nrow(unique( - adae %>% + adae |> filter( ARM == "A: Drug X" & ACAT1 %in% c("4 to 12 months") & AOCCFL == "Y" - ) %>% + ) |> select(USUBJID) )) @@ -283,7 +283,7 @@ testthat::test_that("`a_freq_j()` works", { adsl$rrisk_header <- "Risk Difference (%) (95% CI)" adsl$rrisk_label <- paste(adsl[["ARM"]], "vs Placebo") - advs <- ex_advs %>% select(USUBJID, PARAMCD, PARAM, AVISIT, ANRIND) + advs <- ex_advs |> select(USUBJID, PARAMCD, PARAM, AVISIT, ANRIND) advs <- dplyr::inner_join(advs, adsl, by = c("USUBJID")) advs <- advs[advs$AVISIT %in% c("BASELINE", "WEEK 1 DAY 8"), ] @@ -291,9 +291,9 @@ testthat::test_that("`a_freq_j()` works", { advs$AVISIT <- factor(as.character(advs$AVISIT)) advs$PARAM <- factor(as.character(advs$PARAM)) - advs <- advs %>% - group_by(ARM, PARAMCD, AVISIT) %>% - arrange(USUBJID) %>% + advs <- advs |> + group_by(ARM, PARAMCD, AVISIT) |> + arrange(USUBJID) |> mutate(id = row_number()) # set ANRIND to missing for first 10 subjects from each arm @@ -311,17 +311,17 @@ testthat::test_that("`a_freq_j()` works", { lyt <- basic_table( show_colcounts = TRUE, colcount_format = "N=xx" - ) %>% - split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("rrisk_header", nested = FALSE) %>% + ) |> + split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("rrisk_header", nested = FALSE) |> split_cols_by( "ARM", labels_var = "rrisk_label", split_fun = remove_split_levels("B: Placebo") - ) %>% - split_rows_by("PARAM", label_pos = "topleft", section_div = " ") %>% - split_rows_by("AVISIT") %>% + ) |> + split_rows_by("PARAM", label_pos = "topleft", section_div = " ") |> + split_rows_by("AVISIT") |> analyze( "ANRIND", afun = a_freq_j, @@ -340,19 +340,19 @@ testthat::test_that("`a_freq_j()` works", { n_expected <- as.double( table( - advs %>% - ungroup() %>% + advs |> + ungroup() |> filter( PARAM == "Diastolic Blood Pressure" & AVISIT == "WEEK 1 DAY 8" & !is.na(ANRIND) - ) %>% + ) |> mutate( ARM = factor( as.character(ARM), levels = c("A: Drug X", "C: Combination", "B: Placebo") ) - ) %>% + ) |> select(ARM) ) ) @@ -384,10 +384,10 @@ testthat::test_that("a_freq_j works (old count_subject case)", { ) # scenario 1: cfun - subgroup coming from adsl, not df - lyt1 <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% - split_rows_by("SEX") %>% - summarize_row_groups("SEX", cfun = a_freq_j, extra_args = extra_args_1) %>% + lyt1 <- basic_table(show_colcounts = TRUE) |> + split_cols_by("ARM") |> + split_rows_by("SEX") |> + summarize_row_groups("SEX", cfun = a_freq_j, extra_args = extra_args_1) |> analyze( "TRTEMFL", afun = simple_afun, @@ -405,10 +405,10 @@ testthat::test_that("a_freq_j works (old count_subject case)", { ## 2 cell value : content + n n_1 <- nrow(unique( - adsl %>% filter(ARM == "B: Placebo" & SEX == "F") %>% select(USUBJID) + adsl |> filter(ARM == "B: Placebo" & SEX == "F") |> select(USUBJID) )) n_2 <- nrow(unique( - adae %>% filter(ARM == "B: Placebo" & SEX == "F") %>% select(USUBJID) + adae |> filter(ARM == "B: Placebo" & SEX == "F") |> select(USUBJID) )) expected1 <- c(n_1, n_2) @@ -416,28 +416,27 @@ testthat::test_that("a_freq_j works (old count_subject case)", { testthat::expect_identical(result1, expected1) # scenario 2: shift table for lab/vs - advs <- ex_advs %>% - select(USUBJID, PARAMCD, PARAM, ANRIND, AVAL, BASE, ABLFL, AVISIT) %>% + advs <- ex_advs |> + select(USUBJID, PARAMCD, PARAM, ANRIND, AVAL, BASE, ABLFL, AVISIT) |> filter(PARAMCD == "DIABP" & (AVISIT == "WEEK 1 DAY 8" | ABLFL == "Y")) ### remove subjects from advs, so that N is not same as from adsl advs <- advs[!(advs$USUBJID %in% adsl$USUBJID[1:10]), ] - BNRIND <- advs %>% - filter(ABLFL == "Y") %>% - mutate(BNRIND = ANRIND) %>% + BNRIND <- advs |> + filter(ABLFL == "Y") |> + mutate(BNRIND = ANRIND) |> select(USUBJID, PARAMCD, BNRIND) - advs <- advs %>% - left_join(., BNRIND, by = join_by(USUBJID, PARAMCD)) + advs <- left_join(advs, BNRIND, by = join_by(USUBJID, PARAMCD)) - adsl <- adsl %>% - mutate(BNRIND = "N") %>% + adsl <- adsl |> + mutate(BNRIND = "N") |> mutate(BNRIND = factor(BNRIND, levels = c("N", levels(advs$ANRIND)))) adsl$BNRIND_header <- " " adsl$BNRIND_header2 <- "Baseline NRIND" - advs <- advs %>% + advs <- advs |> mutate( BNRIND = factor( as.character(BNRIND), @@ -445,29 +444,33 @@ testthat::test_that("a_freq_j works (old count_subject case)", { ) ) - advs <- advs %>% - left_join( - ., - adsl %>% select(USUBJID, ARM, BNRIND_header, BNRIND_header2), - by = "USUBJID" - ) %>% + # Create a temporary variable to store the result of the join + advs_joined <- left_join( + advs, + adsl |> select(USUBJID, ARM, BNRIND_header, BNRIND_header2), + by = "USUBJID", + relationship = "many-to-many" + ) + + # Now filter using the temporary variable + advs <- advs_joined |> filter(ABLFL != "Y") ANRIND_levels <- levels(advs$ANRIND) - lyt <- basic_table(show_colcounts = FALSE) %>% + lyt <- basic_table(show_colcounts = FALSE) |> ## to ensure N column is not under the Baseline column span header - split_cols_by("BNRIND_header") %>% - split_cols_by("BNRIND", split_fun = keep_split_levels("N")) %>% - split_cols_by("BNRIND_header2", nested = FALSE) %>% + split_cols_by("BNRIND_header") |> + split_cols_by("BNRIND", split_fun = keep_split_levels("N")) |> + split_cols_by("BNRIND_header2", nested = FALSE) |> split_cols_by( "BNRIND", split_fun = make_split_fun( pre = list(rm_levels(excl = "N")), post = list(add_overall_facet("TOTAL", "Total")) ) - ) %>% - split_rows_by("ARM", child_labels = "hidden") %>% + ) |> + split_rows_by("ARM", child_labels = "hidden") |> # these counts will be checked as result1/expected1 summarize_row_groups( var = "ARM", @@ -479,14 +482,14 @@ testthat::test_that("a_freq_j works (old count_subject case)", { restr_columns = "N", extrablanklineafter = "C: Combination" ) - ) %>% - split_rows_by("PARAM", nested = FALSE, split_fun = drop_split_levels) %>% + ) |> + split_rows_by("PARAM", nested = FALSE, split_fun = drop_split_levels) |> split_rows_by( "ARM", label_pos = "hidden", split_label = "Treatment Group", section_div = " " - ) %>% + ) |> # these counts will be checked as result2/expected2 summarize_row_groups( "ARM", @@ -496,7 +499,7 @@ testthat::test_that("a_freq_j works (old count_subject case)", { .stats = "denom", restr_columns = "N" ) - ) %>% + ) |> # these counts will be checked as result3/expected3 analyze( "ANRIND", @@ -541,10 +544,10 @@ testthat::test_that("a_freq_j works (old count_subject case)", { ) ))) expected2 <- unname(unlist(as.list(table( - advs %>% + advs |> filter( PARAMCD == "DIABP" & AVISIT == "WEEK 1 DAY 8" & ARM == "C: Combination" - ) %>% + ) |> select(ARM) )))["C: Combination"]) @@ -564,10 +567,10 @@ testthat::test_that("a_freq_j works (old count_subject case)", { ) )) expected3 <- table( - advs %>% + advs |> filter( PARAMCD == "DIABP" & AVISIT == "WEEK 1 DAY 8" & ARM == "B: Placebo" - ) %>% + ) |> select(BNRIND, ANRIND) )["NORMAL", "HIGH"] @@ -582,8 +585,8 @@ testthat::test_that("`a_freq_j()` works", { adsl <- ex_adsl adae <- ex_adae - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE) |> + split_cols_by("ARM") |> analyze( vars = "STUDYID", afun = a_freq_j, @@ -614,8 +617,8 @@ testthat::test_that("a_freq_j works (old a_countpat_newlevels case)", { new_BMRKR2_levels <- list(c("Medium - High"), list(c("MEDIUM", "HIGH"))) - lyt <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ARM") %>% + lyt <- basic_table(show_colcounts = TRUE) |> + split_cols_by("ARM") |> ### add extra combined level for BMRKR2 analyze( vars = "BMRKR2", @@ -644,8 +647,8 @@ testthat::test_that("a_freq_j works (old a_countpat_newlevels case)", { testthat::expect_identical(result_label, expected_label) expected_value <- table( - adsl %>% - filter(ARM == "A: Drug X") %>% + adsl |> + filter(ARM == "A: Drug X") |> select(BMRKR2) ) @@ -694,15 +697,15 @@ testthat::test_that("a_summarize_ex_j works", { top_level_section_div = " ", show_colcounts = TRUE, colcount_format = "N=xx" - ) %>% - split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) %>% - split_cols_by("ARM") %>% - split_cols_by("diff_header", nested = FALSE) %>% + ) |> + split_cols_by("colspan_trt", split_fun = trim_levels_in_group("ARM")) |> + split_cols_by("ARM") |> + split_cols_by("diff_header", nested = FALSE) |> split_cols_by( "ARM", split_fun = remove_split_levels("B: Placebo"), labels_var = "diff_label" - ) %>% + ) |> analyze( "EOSDY", afun = a_summarize_ex_j, @@ -720,7 +723,7 @@ testthat::test_that("a_summarize_ex_j works", { tbl <- build_table(lyt, adsl) - rps <- make_row_df(tbl) %>% + rps <- make_row_df(tbl) |> filter(node_class == "DataRow") result_1 <- unname(cell_values(tbl[, c( @@ -735,7 +738,7 @@ testthat::test_that("a_summarize_ex_j works", { })) names(result_1[[4]]) <- NULL - xx_1 <- adsl %>% filter(ARM == "C: Combination" & !is.na(EOSDY)) + xx_1 <- adsl |> filter(ARM == "C: Combination" & !is.na(EOSDY)) xx_1. <- xx_1[["EOSDY"]] ## quantiles rather than IQR, label misleading @@ -774,7 +777,7 @@ testthat::test_that("a_summarize_ex_j works", { })) names(result_2[[4]]) <- NULL - xx_2 <- adsl %>% filter(ARM == "B: Placebo" & !is.na(EOSDY)) + xx_2 <- adsl |> filter(ARM == "B: Placebo" & !is.na(EOSDY)) xx_2. <- xx_2[["EOSDY"]] ## quantiles rather than IQR, label misleading @@ -807,7 +810,7 @@ testthat::test_that("a_summarize_ex_j works", { attr(result_3, "label") <- NULL df <- xx_1 - .df_row <- adsl %>% filter(!is.na(EOSDY)) + .df_row <- adsl |> filter(!is.na(EOSDY)) .ref_group <- xx_2 .in_ref_col <- FALSE diff --git a/vignettes/auto_colwidths.Rmd b/vignettes/auto_colwidths.Rmd index 11345f93..1cc4bb07 100644 --- a/vignettes/auto_colwidths.Rmd +++ b/vignettes/auto_colwidths.Rmd @@ -23,8 +23,6 @@ knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) - -# TODO change to pharmaverse data to parmaversejnj versions ``` ## Introduction @@ -181,9 +179,9 @@ We will use the following data to illustrate: ```{R} library(rlistings) -adae <- pharmaverseadam::adae +adae <- pharmaverseadamjnj::adae adae$AEOUT <- gsub("/", " / ", adae$AEOUT) -adsl <- pharmaverseadam::adsl +adsl <- pharmaverseadamjnj::adsl adsl <- adsl[, c("USUBJID", setdiff(names(adsl), names(adae)))] diff --git a/vignettes/table_and_listing_customizations.rmd b/vignettes/table_and_listing_customizations.rmd new file mode 100644 index 00000000..a934b408 --- /dev/null +++ b/vignettes/table_and_listing_customizations.rmd @@ -0,0 +1,1858 @@ +--- +title: "Table & Listing Customizations" +date: "2025-12-04" +author: "Joe Kovach and David Munoz Tord" +output: + rmarkdown::html_document: + theme: "spacelab" + highlight: "kate" + toc: true + toc_float: true +vignette: > + %\VignetteIndexEntry{Table & Listing Customizations} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set( + echo = TRUE, + collapse = TRUE, + comment = "#>", + message = FALSE, + warning = FALSE +) + +options(docx.add_datetime=FALSE) + +library(junco) +library(rlistings) +library(tibble) + +``` + + +```{r setup-title, include=FALSE} +#Need to set up a dummy tittle and main footer +titles <- list(title = " ", + subtitles = NULL, + main_footer = "Dummy Note: On-treatment is defined as ~{optional treatment-emergent}") +#Need tempdir +out_dir <- file.path("..", "output") +if(!dir.exists(out_dir)) { + dir.create(out_dir) +} +``` + +## Introduction + +Within clinical trial reporting, there is often the need to incorporate +custom components to the tables and listings being created. Common +custom components may include the following: + +- Page Orientation (Portrait vs. Landscape) +- Adjusting the Font Size of a Table +- Adding a Spanning Column Header to a Table +- Adding a Combined Treatment Column to a Table +- Inserting a New Line within Table & Listing Text +- Custom Table Column Header Border Matrix +- Addition of Superscript or Other Symbol +- Grouping of Columns for Tables Containing Many Columns +- Inserting Page Breaks in Tables +- Manually Splitting Large Table & Listing Files into Multiple Smaller Files + +The purpose of this vignette is to provide clear, concise examples of how to achieve each custom component. + +> **Note:** The visual output shown in this HTML vignette may not exactly match what the .docx or .rtf exporters will actually produce due to differences between HTML and those formats. The HTML outputs displayed here are for demonstration purposes only. Users should run the code examples themselves to see the exact output in their preferred format (.docx or .rtf). + +## Page Orientation (Portrait vs. Landscape) +Sometimes when creating a table, there are many columns that need to be presented. In this scenario, it might be beneficial for the resulting output file to have an orientation of landscape. As a result, the page is wider, allowing the information to be more readable. + +### Table .rtf File +In the .rtf exporter function, `junco::tt_to_tlgrtf`, by default, the page orientation is set to portrait. If landscape orientation is required, then the orientation can be adjusted by including the `orientation` argument and specifying a value of "landscape". + +```{r orientation_rtf} +library(junco) + +adsl <- data.frame(TRT01A = factor(c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo", + "Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + levels = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo" + ) + ), + USUBJID = c("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8"), + RESPONSE = factor(c("Yes", + "No", + "Yes", + "Yes", + "Yes", + "No", + "Yes", + "No"), + levels = c("Yes", + "No") + ), + SEX = factor(c("Male", + "Female", + "Male", + "Female", + "Female", + "Male", + "Female", + "Male"), + levels = c("Male", + "Female") + ) +) |> + var_relabel(RESPONSE = "Response") + +lyt <- basic_table( + show_colcounts = TRUE, + colcount_format = "N=xx" +) |> + ### first columns + split_cols_by("TRT01A", + show_colcounts = FALSE + ) |> + ### create table body row sections based on SEX + split_rows_by("SEX", + section_div = c(" "), + page_by = TRUE, + split_fun = drop_split_levels + ) |> + summarize_row_groups("SEX", + cfun =a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + extrablankline = TRUE, + .stats = c("count_unique") + ) + ) |> + ### analyze height + analyze("RESPONSE", + var_labels = c("Response"), + show_labels = "visible", + afun = a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + .stats = c("count_unique_fraction") + ) + ) + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/exampleorientation"), + orientation = "landscape") +``` + + + +### Table .docx File + +To create a .docx file with landscape orientation, the `junco::export_as_docx_j` function can be called with the `orientation` argument set to "landscape". + +```{r orientation_docx} +export_as_docx_j(result, + tblid = "exampleorientation", + output_dir = out_dir, + orientation = "landscape") +``` + +### Visual Output (HTML Representation) +```{r orientation_rtf_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "exampleorientation", orientation = "landscape") +``` + + + +## Adjusting the Font Size of a Table or Listing +By default, the font type and size for the body of tables is Times New Roman 9-pt. If a font size of 8-pt is required for a table, then the font size can be adjusted as necessary. Other font sizes are not currently supported for tables. For listings, the default font size is 8-pt. Other font sizes are not currently supported for listings. + +### Table .rtf File + +To display the body of tables in Times New Roman 8-pt for .rtf files, the `junco::tt_to_tlgrtf` function can be called with the `fontspec` argument included. The `fontspec` argument will specify a `formatters::font_spec` function call. + +Example of Table with Font Size of 8-pt +```{r fontsize_rtf} +library(junco) + +adsl <- data.frame(TRT01A = factor(c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo", + "Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + levels = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo" + ) + ), + USUBJID = c("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8"), + RESPONSE = factor(c("Yes", + "No", + "Yes", + "Yes", + "Yes", + "No", + "Yes", + "No"), + levels = c("Yes", + "No") + ), + SEX = factor(c("Male", + "Female", + "Male", + "Female", + "Female", + "Male", + "Female", + "Male"), + levels = c("Male", + "Female") + ) +) |> + var_relabel(RESPONSE = "Response") + +lyt <- basic_table( + show_colcounts = TRUE, + colcount_format = "N=xx" +) |> + ### first columns + split_cols_by("TRT01A", + show_colcounts = FALSE + ) |> + ### create table body row sections based on SEX + split_rows_by("SEX", + section_div = c(" "), + page_by = TRUE, + split_fun = drop_split_levels + ) |> + summarize_row_groups("SEX", + cfun =a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + extrablankline = TRUE, + .stats = c("count_unique") + ) + ) |> + ### analyze height + analyze("RESPONSE", + var_labels = c("Response"), + show_labels = "visible", + afun = a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + .stats = c("count_unique_fraction") + ) + ) + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/examplefontsize"), + fontspec = formatters::font_spec("Times", 8, 1.2)) +``` + + + +### Table .docx File + +To display the body of tables in Times New Roman 8-pt for .docx files, the junco::export_as_docx_j function can be called with the theme argument included. The theme argument will specify a junco::theme_docx_default_j function call. + +```{r fontsize_docx} +export_as_docx_j(result, + tblid = "examplefontsize", + output_dir = out_dir, + theme = theme_docx_default_j(font = "Times New Roman", font_size = 8L)) +``` + +### Visual Output (HTML Representation) +```{r fontsize_rtf_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "examplefontsize", fontspec = formatters::font_spec("Times", 8, 1.2)) +``` + + + +## Adding a Spanning Column Header to a Table +Sometimes, it is necessary to include a spanning header in the column header space. This is common when there is a need to group specific columns together under a common category text. A common example of this is when a spanning header such as "Active Study Agent" is to be displayed above all active treatments for a given study. To display the spanning header, a variable needs to be included in the data to represent the spanning header. Subsequently, a column header treatment map needs to be created to identify which spanning headers and columns are to be present in the resulting table output. For simple studies, the `junco::create_colspan_map` function can be leveraged to achieve the creation of the treatment map. + +In the code below, the variable `colspan_trt` is being created to identify the spanning header text. In this example, the "Example Drug 5 mg", "Example Drug 10 mg", and "Example Drug 20 mg" columns are to be displayed beneath a spanning header of "Active Study Agent". Then, the treatment map is being created by calling `junco::create_colspan_map`. +```{r spanning_header_setup} +library(junco) + +adsl <- data.frame(TRT01A = factor(c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo", + "Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + levels = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo" + ) + ), + colspan_trt = factor(c("Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " ", + "Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " "), + levels = c( + "Active Study Agent", + " " + ) + ), + USUBJID = c("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8"), + RESPONSE = factor(c("Yes", + "No", + "Yes", + "Yes", + "Yes", + "No", + "Yes", + "No"), + levels = c("Yes", + "No") + ), + SEX = factor(c("Male", + "Female", + "Male", + "Female", + "Female", + "Male", + "Female", + "Male"), + levels = c("Male", + "Female") + ) +) |> + var_relabel(RESPONSE = "Response") + +adsl + + colspan_trt_map <- create_colspan_map(adsl, + non_active_grp = "Placebo", + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = "TRT01A") + + colspan_trt_map +``` + + +The full code to generate the output with the spanning column header is as follows. +```{r spanning_header_full} +library(junco) + +adsl <- data.frame(TRT01A = factor(c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo", + "Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + levels = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo" + ) + ), + colspan_trt = factor(c("Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " ", + "Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " "), + levels = c( + "Active Study Agent", + " " + ) + ), + USUBJID = c("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8"), + RESPONSE = factor(c("Yes", + "No", + "Yes", + "Yes", + "Yes", + "No", + "Yes", + "No"), + levels = c("Yes", + "No") + ), + SEX = factor(c("Male", + "Female", + "Male", + "Female", + "Female", + "Male", + "Female", + "Male"), + levels = c("Male", + "Female") + ) +) |> + var_relabel(RESPONSE = "Response") + + # No combined column needed for spanning header example + mysplit <- make_split_fun() + + colspan_trt_map <- create_colspan_map(adsl, + non_active_grp = "Placebo", + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = "TRT01A") + +lyt <- basic_table( + show_colcounts = TRUE, + colcount_format = "N=xx" +) |> + split_cols_by("colspan_trt", + split_fun = trim_levels_to_map(map = colspan_trt_map) + ) |> + split_cols_by("TRT01A", + show_colcounts = FALSE, + split_fun = mysplit + ) |> + ### create table body row sections based on SEX + split_rows_by("SEX", + section_div = c(" "), + page_by = TRUE, + split_fun = drop_split_levels + ) |> + summarize_row_groups("SEX", + cfun =a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + extrablankline = TRUE, + .stats = c("count_unique") + ) + ) |> + ### analyze height + analyze("RESPONSE", + var_labels = c("Response"), + show_labels = "visible", + afun = a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + .stats = c("count_unique_fraction") + ) + ) + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/examplespanningheader1"), + orientation = "landscape") +``` + +### Visual Output (HTML Representation) +```{r spanning_header_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "examplespanningheader1", orientation = "landscape") +``` + +## Adding a Combined Column to a Table +Sometimes it is necessary to add a combined column to a table, which contains aggregated data from multiple columns. + +The creation of a combined column can be achieved by leveraging `rtables::add_combo_facet`. In the example below, we want to add a column named "Combined", that aggregates the data from the "Example Drug 5 mg", "Example Drug 10 mg", and "Example Drug 20 mg" columns. This can be achieved by creating an object named "add_combo", that calls `rtables::add_combo_facet`, which creates a new column from other columns in the table. A split function can then be constructed using `rtables::make_split_fun`, where the "post" argument contains the "add_combo" object, which calls `rtables::add_combo_facet`. The split function is then included in the `rtables::split_cols_by` function call for the TRT01A variable. + +The snippet of code of interest is as follows. +```{r combined_column_setup} +add_combo <- add_combo_facet("Combined", + label = "Combined", + levels = c("Example Drug 5 mg", "Example Drug 10 mg", "Example Drug 20 mg") + ) + + mysplit <- make_split_fun(post = list(add_combo)) +``` + +The full code to generate the output with the new "Combined" column is as follows. +```{r combined_column_full} +library(junco) + +adsl <- data.frame(TRT01A = factor(c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo", + "Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + levels = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo" + ) + ), + colspan_trt = factor(c("Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " ", + "Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " "), + levels = c( + "Active Study Agent", + " " + ) + ), + USUBJID = c("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8"), + RESPONSE = factor(c("Yes", + "No", + "Yes", + "Yes", + "Yes", + "No", + "Yes", + "No"), + levels = c("Yes", + "No") + ), + SEX = factor(c("Male", + "Female", + "Male", + "Female", + "Female", + "Male", + "Female", + "Male"), + levels = c("Male", + "Female") + ) +) |> + var_relabel(RESPONSE = "Response") + + # Set up levels and label for the required combined column + add_combo <- add_combo_facet("Combined", + label = "Combined", + levels = c("Example Drug 5 mg", "Example Drug 10 mg", "Example Drug 20 mg") + ) + + mysplit <- make_split_fun(post = list(add_combo)) + + colspan_trt_map <- create_colspan_map(adsl, + non_active_grp = "Placebo", + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = "TRT01A") + +lyt <- basic_table( + show_colcounts = TRUE, + colcount_format = "N=xx" +) |> + split_cols_by("colspan_trt", + split_fun = trim_levels_to_map(map = colspan_trt_map) + ) |> + split_cols_by("TRT01A", + show_colcounts = FALSE, + split_fun = mysplit + ) |> + ### create table body row sections based on SEX + split_rows_by("SEX", + section_div = c(" "), + page_by = TRUE, + split_fun = drop_split_levels + ) |> + summarize_row_groups("SEX", + cfun =a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + extrablankline = TRUE, + .stats = c("count_unique") + ) + ) |> + ### analyze height + analyze("RESPONSE", + var_labels = c("Response"), + show_labels = "visible", + afun = a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + .stats = c("count_unique_fraction") + ) + ) + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/examplecombinedcolumn1"), + orientation = "landscape") +``` + +### Visual Output (HTML Representation) +```{r combined_column_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "examplecombinedcolumn1", orientation = "landscape") +``` + +The code above creates the desired column, however, the issue is that the resulting output produces a "Combined" column under each spanning header, and as a result, 2 "Combined" columns are created. The "Combined" column of interest is the one appearing beneath the "Active Study Agent" spanning header. We need additional code to remove the "Combined" column that lives in the other spanning header value of " ". This can be achieved by creating an object that calls `junco::cond_rm_facets`, which removes user-specified columns from facets. A split function can then be constructed using `rtables::make_split_fun`, where the "post" argument contains the "add_combo" object, which calls `rtables::add_combo_facet`, and the "rm_combo_from_placebo" object, which calls `junco::cond_rm_facets`. Similar to above, the split function is then included in the `rtables::split_cols_by` function call for the TRT01A variable. + +The additional code required for to produce the desired result is as follows. +```{r improved_combined_column_setup, eval=FALSE} + # choose if any facets need to be removed - e.g remove the combined column for placebo + rm_combo_from_placebo <- cond_rm_facets( + facets = "Combined", + ancestor_pos = NA, + value = " ", + split = "colspan_trt" + ) + + mysplit <- make_split_fun(post = list(add_combo, rm_combo_from_placebo)) +``` + +The full code to generate the output with the desired "Combined" column is as follows. +```{r improved_combined_column_full} +library(junco) + +adsl <- data.frame(TRT01A = factor(c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo", + "Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + levels = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo" + ) + ), + colspan_trt = factor(c("Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " ", + "Active Study Agent", + "Active Study Agent", + "Active Study Agent", + " "), + levels = c( + "Active Study Agent", + " " + ) + ), + USUBJID = c("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8"), + RESPONSE = factor(c("Yes", + "No", + "Yes", + "Yes", + "Yes", + "No", + "Yes", + "No"), + levels = c("Yes", + "No") + ), + SEX = factor(c("Male", + "Female", + "Male", + "Female", + "Female", + "Male", + "Female", + "Male"), + levels = c("Male", + "Female") + ) +) |> + var_relabel(RESPONSE = "Response") + + # Set up levels and label for the required combined column + add_combo <- add_combo_facet("Combined", + label = "Combined", + levels = c("Example Drug 5 mg", "Example Drug 10 mg", "Example Drug 20 mg") + ) + + # choose if any facets need to be removed - e.g remove the combined column for placebo + rm_combo_from_placebo <- cond_rm_facets( + facets = "Combined", + ancestor_pos = NA, + value = " ", + split = "colspan_trt" + ) + + mysplit <- make_split_fun(post = list(add_combo, rm_combo_from_placebo)) + + colspan_trt_map <- create_colspan_map(adsl, + non_active_grp = "Placebo", + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = "TRT01A") + +lyt <- basic_table( + show_colcounts = TRUE, + colcount_format = "N=xx" +) |> + split_cols_by("colspan_trt", + split_fun = trim_levels_to_map(map = colspan_trt_map) + ) |> + split_cols_by("TRT01A", + show_colcounts = FALSE, + split_fun = mysplit + ) |> + ### create table body row sections based on SEX + split_rows_by("SEX", + section_div = c(" "), + page_by = TRUE, + split_fun = drop_split_levels + ) |> + summarize_row_groups("SEX", + cfun =a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + extrablankline = TRUE, + .stats = c("count_unique") + ) + ) |> + ### analyze height + analyze("RESPONSE", + var_labels = c("Response"), + show_labels = "visible", + afun = a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + .stats = c("count_unique_fraction") + ) + ) + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/examplecombinedcolumn2"), + orientation = "landscape") +``` + +### Visual Output (HTML Representation) +```{r improved_combined_column_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "examplecombinedcolumn2", orientation = "landscape") +``` + +## Inserting a New Line within Table & Listing Text + +Sometimes it is necessary to insert a new line within text so that the information is presented in the exact format provided in the table or listing specification. + +In the following example data, there is a desire to insert a new line +between the drug name and the dose level for the "Example Drug" drug. In +this case, the text "Example Drug" is to appear on a different line than +the dose levels (i.e. "5 mg", "10 mg", "20 mg"). + +```{r newline_data} +adsl <- data.frame(TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) + +adsl +``` + +### Table .rtf File + +In order to get the dose level to appear on a new line, then the TRT01A +variable values will need to be updated to include the text "\\\\line" +between the drug name and dose level. + +```{r newline_table_rtf} +library(junco) +library(rtables) + +adsl <- data.frame(TRT01A = c("Example Drug\\line 5 mg", + "Example Drug\\line 10 mg", + "Example Drug\\line 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) + +lyt <- basic_table( + show_colcounts = FALSE, + colcount_format = "N=xx" +) |> + ### first columns + split_cols_by("TRT01A",, + show_colcounts = FALSE + ) |> + ### analyze height + analyze("HEIGHT", afun = list_wrap_x(summary), format = "xx.xx") + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/newlinetable"), + orientation = "landscape") +``` + +### Table .docx File + +In order to get the dose level to appear on a new line, then the TRT01A +variable values will need to be updated to include the text "\\n" +between the drug name and dose level. + + +```{r newline_table_docx} +library(junco) +library(rtables) + +adsl <- data.frame(TRT01A = c("Example Drug\n 5 mg", + "Example Drug\n 10 mg", + "Example Drug\n 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) + +lyt <- basic_table( + show_colcounts = FALSE, + colcount_format = "N=xx" +) |> + ### first columns + split_cols_by("TRT01A",, + show_colcounts = FALSE + ) |> + ### analyze height + analyze("HEIGHT", afun = list_wrap_x(summary), format = "xx.xx") + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) + +export_as_docx_j(result, + tblid = "examplenewline", + output_dir = out_dir, + orientation = "landscape") + +``` + +### Visual Output (HTML Representation) +```{r newline_table_rtf_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "newlinetable", orientation = "landscape") +``` + +### Listing .rtf File + +If a .rtf file is to be created for the listing, new lines can be inserted into the column header by updating the variable label that corresponds with the column of interest. + +By adding in "\\\\line" to the TRT01A variable label, a new line is inserted after "Actual Treatment". + +```{r newline_listing_rtf} +library(junco) +library(rlistings) + +adsl <- data.frame(TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) |> + formatters::var_relabel(TRT01A = "Actual Treatment for\\line Period 01") |> + formatters::var_relabel(SUBJECT = "Subject") |> + formatters::var_relabel(HEIGHT = "Height (in)") + +result <- rlistings::as_listing( + df = adsl, + key_cols = c("TRT01A", "SUBJECT"), + disp_cols = "HEIGHT" +) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/examplelistingnewline2"), + orientation = "landscape") +``` + + + + + +### Listing .docx File + + +If a .docx file is to be created for the listing, new lines can be inserted into the column header by updating the variable label that corresponds with the column of interest. + +By adding in "\\n" to the TRT01A variable label, a new line is inserted after "Actual Treatment". + +```{r newline_listing_docx} +library(junco) +library(rlistings) + +adsl <- data.frame(TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) |> + formatters::var_relabel(TRT01A = "Actual Treatment for\n Period 01") |> + formatters::var_relabel(SUBJECT = "Subject") |> + formatters::var_relabel(HEIGHT = "Height (in)") + +result <- rlistings::as_listing( + df = adsl, + key_cols = c("TRT01A", "SUBJECT"), + disp_cols = "HEIGHT" +) +result <- set_titles(result, titles) + + +export_as_docx_j(result, + tblid = "examplelistingnewline2", + output_dir = out_dir, + orientation = "landscape") +``` + +### Visual Output (HTML Representation) +```{r newline_listing_rtf_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "examplelistingnewline2", orientation = "landscape") +``` + + +## Custom Table Column Header Border Matrix + +When creating a table using, there is a set of default assumptions in place that determine how the borders are crafted within the table column header space. There are times when the table specification calls for a border matrix that is not based on the default assumptions. Below is an example of how to create a border matrix that produces the user required table. + +### Table .rtf File + +The following is an example of a table created from `junco::tt_to_tlgrtf`. + +```{r border_matrix} +library(junco) + +adsl <- data.frame(span = c("Example Drug Low Dose", + "Example Drug Low Dose", + "Example Drug High Dose", + " "), + TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) + +lyt <- basic_table( + show_colcounts = FALSE, + colcount_format = "N=xx" +) |> + ### first level in column header + split_cols_by("span",, + show_colcounts = FALSE + ) |> + ### second level in column header + split_cols_by("TRT01A",, + show_colcounts = FALSE + ) |> + ### analyze height + analyze("HEIGHT", afun = list_wrap_x(summary), format = "xx.xx") + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/bordertable"), + orientation = "landscape") +``` + +### Visual Output (HTML Representation) +```{r border_matrix_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "bordertable", orientation = "landscape") +``` + +In the resulting output, the "Example Drug High Dose" spanning header +does not include an underline beneath the text at the bottom of the +cell. It's important for us to understand what the default border matrix +looks like. This can be achieved by calling the +`junco:::make_header_bordmat` function. + +```{r default_border_matrix} +header_border <- junco:::make_header_bordmat(obj = result) +header_border +``` + +It can be observed that the first row, and fourth column in the border +matrix contains a value of 0. In order to have a bottom border present +under "Example Drug High Dose", a value other than 0 or 2 must be +specified. This is because "Example Drug High Dose" is expected to have it's own spanning header, and the value specified in the border matrix must be unique to the cell. The border can be updated as follows. + +```{r updated_border_matrix} +header_border[1, 4] <- 4 +header_border +``` + +Now, if the `junco::tt_to_tlgrtf` function is called with the "border_mat" +argument included, the new user-defined border matrix can be provided as the argument value to specify the desired column header borders. + +```{r custom_border_matrix} +tt_to_tlgrtf(result, + file = paste0(out_dir, "/custombordertable"), + orientation = "landscape", + border_mat = header_border) +``` + + +### Table .docx File +To export a table with a custom border matrix to a .docx file, the `junco::export_as_docx_j` function can be called with the `border_mat` argument: + +```{r custom_border_matrix_docx} +export_as_docx_j(result, + tblid = "custombordertable", + output_dir = out_dir, + orientation = "landscape", + border_mat = header_border) +``` + +### Visual Output (HTML Representation) +> **Note:** In this HTML output the spanning line is a single line, instead of 2 lines. However, if you output the .docx or .rtf file using the same TableTree as input, it will be displayed correctly. + + +```{r custom_border_matrix_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "custombordertable", orientation = "landscape", border_mat = header_border) +``` + + + +## Addition of Superscript or Other Symbol +Sometimes it is necessary to insert a superscript or other symbol within text so that the information is presented according to the table or listing specification. This can be achieved by specifying a markup data frame in the export function call. + +In the `junco` package, there is a default markup data frame for each exporter function, which contains common markup that translates to symbols/characters that may be desired in an output. The default markup data frame contains markup to insert superscripts, insert subscripts, and can remove optional text. + +The default markup file for `junco::tt_to_tlgrtf` to produce an .rtf file is as follows. +```{r default_markup_rtf} +library(tibble) + +dps_markup_df <- tibble::tribble( + ~keyword, + ~rtfstart, + ~rtfend, + "super", + "\\super", + "\\nosupersub", + "sub", + "\\sub", + "\\nosupersub", + "optional", + "", + "" +) + +dps_markup_df +``` +If additional markup is to be considered, then a custom markup data frame can be created and specified in the exporter function call. + +In the following example data, there is a desire to insert a superscript "a" at the end the drug name for the "Example Drug" drug in reference to a footnote present at the end of the table. + +```{r superscript_example_data} +adsl <- data.frame(TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) + +adsl +``` + +Depending on the file format required (i.e. .rtf or .docx) the data will +require different updates, according to the markup that is required. + +### Table .rtf File + +If a .rtf file is to be created for the table, the `junco::tt_to_tlgrtf` is to be called. In this example, when calling `junco::tt_to_tlgrtf`, the "markup_df" argument has the default "dps_markup_df" object specified. + +In order to get the superscript "a" to appear, the TRT01A variable values will need to be updated to include the text "~[super a]" between the drug name and dose level. + +```{r superscript_table_rtf} +library(junco) + +adsl <- data.frame(TRT01A = c("Example Drug~[super a] 5 mg", + "Example Drug~[super a] 10 mg", + "Example Drug~[super a] 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) + +lyt <- basic_table( + show_colcounts = FALSE, + colcount_format = "N=xx" +) |> + ### first columns + split_cols_by("TRT01A",, + show_colcounts = FALSE + ) |> + ### analyze height + analyze("HEIGHT", afun = list_wrap_x(summary), format = "xx.xx") + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/superscripttable"), + orientation = "landscape", + markup_df = dps_markup_df) +``` + + +### Table .docx File + +The default markup file for `junco::export_as_docx_j` to produce a .docx file is as follows. + +```{r default_markup_docx2} +library(tibble) + +docx_markup_df <- tibble::tribble( + ~keyword, + ~replace_by, + "super", + "flextable::as_sup", + "sub", + "flextable::as_sub", + "optional", + "" +) + +docx_markup_df +``` + +If a .docx file is to be created for the table, the `junco::export_as_docx_j` is to be called. For .docx files, the markup is different from .rtf files. In this example, when calling `junco::export_as_docx_j`, the "markup_df" argument has the default "docx_markup_df" object specified. + + +```{r superscript_table_docx} +library(junco) + +adsl <- data.frame(TRT01A = c("Example Drug~[super a] 5 mg", + "Example Drug~[super a] 10 mg", + "Example Drug~[super a] 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) + +lyt <- basic_table( + show_colcounts = FALSE, + colcount_format = "N=xx" +) |> + ### first columns + split_cols_by("TRT01A",, + show_colcounts = FALSE + ) |> + ### analyze height + analyze("HEIGHT", afun = list_wrap_x(summary), format = "xx.xx") + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) + +export_as_docx_j(result, + tblid = "superscripttable", + output_dir = out_dir, + orientation = "landscape", + markup_df = docx_markup_df) +``` + + + + +### Visual Output (HTML Representation) +```{r superscript_table_rtf_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "superscripttable", orientation = "landscape", markup_df = dps_markup_df) +``` + +### Listing .rtf File + +If a .rtf file is to be created for the listing, a superscript "a" can be +inserted into the column header by updating the variable label that +corresponds with the column of interest. + +By adding in "~[super a]" to the TRT01A variable label, a superscript "a" is +added to the column label. + +```{r superscript_listing_rtf} +library(junco) +library(rlistings) + +adsl <- data.frame(TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) |> + formatters::var_relabel(TRT01A = "Actual Treatment for Period 01~[super a]") |> + formatters::var_relabel(SUBJECT = "Subject") |> + formatters::var_relabel(HEIGHT = "Height (in)") + +result <- rlistings::as_listing( + df = adsl, + key_cols = c("TRT01A", "SUBJECT"), + disp_cols = "HEIGHT" +) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/examplelistingsuperscript2"), + orientation = "landscape") +``` + + + +### Listing .docx File + +The default markup file for `junco::export_as_docx_j` to produce a .docx file is as follows. + +```{r default_markup_docx} +library(tibble) + +docx_markup_df <- tibble::tribble( + ~keyword, + ~replace_by, + "super", + "flextable::as_sup", + "sub", + "flextable::as_sub", + "optional", + "" +) + +docx_markup_df +``` + +If a .docx file is to be created for the table, the `junco::export_as_docx_j` is to be called. For .docx files, the markup is different from .rtf files. In this example, when calling `junco::export_as_docx_j`, the "markup_df" argument has the default "docx_markup_df" object specified. + +```{r superscript_listing_docx} + +library(junco) +library(rlistings) + +adsl <- data.frame(TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) |> + formatters::var_relabel(TRT01A = "Actual Treatment for Period 01~[super a]") |> + formatters::var_relabel(SUBJECT = "Subject") |> + formatters::var_relabel(HEIGHT = "Height (in)") + +result <- rlistings::as_listing( + df = adsl, + key_cols = c("TRT01A", "SUBJECT"), + disp_cols = "HEIGHT" +) +result <- set_titles(result, titles) + +export_as_docx_j(result, + tblid = "examplelistingsuperscript2", + output_dir = out_dir, + orientation = "landscape", + markup_df = docx_markup_df) +``` +### Visual Output (HTML Representation) +```{r superscript_listing_rtf_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result, "examplelistingsuperscript2", orientation = "landscape", markup_df = dps_markup_df) +``` + + +## Grouping of Columns for Tables Containing Many Columns + +In some cases, there are tables that are required that contain many columns. As a result, it's possible that the table might need to be split into multiple files so that the information can be presented in a readable manner. Oftentimes, it's important to keep certain information grouped together in the same file. The following is an example of this scenario. + +Data Preparation for example + +```{r multiple_docs_data_prep} +library(tern) +library(dplyr) +library(rtables) +library(junco) + +################################################################################ +# Define script level parameters: +################################################################################ + +string_map <- default_str_map +trtvar <- "TRT01A" +popfl <- "SAFFL" + +################################################################################ +# Process Data: +################################################################################ + +adsl <- pharmaverseadamjnj::adsl %>% + filter(!!rlang::sym(popfl) == "Y") %>% + select(STUDYID, USUBJID, all_of(trtvar), all_of(popfl), RACE) + +adae <- pharmaverseadamjnj::adae %>% + filter(TRTEMFL == "Y" & AEBODSYS == "Skin and subcutaneous tissue disorders") %>% + select(USUBJID, TRTEMFL, AEBODSYS, AEDECOD, RACE) + +adsl$colspan_trt <- factor(ifelse(adsl[[trtvar]] == "Placebo", " ", "Active Study Agent"), + levels = c("Active Study Agent", " ") +) + +colspan_trt_map <- create_colspan_map(adsl, + non_active_grp = "Placebo", + non_active_grp_span_lbl = " ", + active_grp_span_lbl = "Active Study Agent", + colspan_var = "colspan_trt", + trt_var = trtvar +) + +# Add total for Race - adsl +totalrace1 <- adsl %>% + filter(RACE != "UNKNOWN" & !is.na(RACE)) %>% + mutate(RACE = "Total") + +adsl <- bind_rows(totalrace1, adsl) + +adsl <- adsl %>% + mutate(RACEcat = case_when( + RACE == "Total" ~ "Total", + RACE == "WHITE" ~ "White", + RACE == "BLACK OR AFRICAN AMERICAN" ~ "Black", + RACE == "ASIAN" ~ "Asian", + RACE != "UNKNOWN" & !is.na(RACE) ~ "Other" + )) %>% + filter(RACEcat %in% c("Total", "White", "Black", "Asian", "Other")) %>% + select(-RACE) + +adsl$spanheader <- factor(ifelse(adsl$RACEcat == "Total", " ", "Race"), + levels = c(" ", "Race") +) + +adsl$RACEcat <- factor(adsl$RACEcat, levels = c("Total", "White", "Black", "Asian", "Other")) + +# Add total for Race - adae +totalrace2 <- adae %>% + filter(RACE != "UNKNOWN" & !is.na(RACE)) %>% + mutate(RACE = "Total") + +adae <- bind_rows(totalrace2, adae) + +adae <- adae %>% + mutate(RACEcat = case_when( + RACE == "Total" ~ "Total", + RACE == "WHITE" ~ "White", + RACE == "BLACK OR AFRICAN AMERICAN" ~ "Black", + RACE == "ASIAN" ~ "Asian", + RACE != "UNKNOWN" & !is.na(RACE) ~ "Other" + )) %>% + filter(RACEcat %in% c("Total", "White", "Black", "Asian", "Other")) %>% + select(-RACE) + +adae$RACEcat <- factor(adae$RACEcat, levels = c("Total", "White", "Black", "Asian", "Other")) + +# join data together +ae <- left_join(adsl, adae, by = c("USUBJID", "RACEcat")) + +################################################################################ +# Define layout and build table: +################################################################################ + +extra_args_1 <- list(denom = "n_altdf", + .stats = c("count_unique_fraction") +) + + +extra_args_2 <- list(denom = "n_altdf", + .stats = c("count_unique") +) + + + +lyt <- basic_table( + top_level_section_div = " ", + show_colcounts = FALSE +) %>% + split_cols_by("colspan_trt", split_fun = trim_levels_to_map(map = colspan_trt_map)) + +lyt <- lyt %>% + split_cols_by(trtvar) + +lyt <- lyt %>% + split_cols_by("spanheader", split_fun = trim_levels_in_group("RACEcat")) %>% + split_cols_by("RACEcat") %>% + analyze(popfl, + afun = a_freq_j, + show_labels = "hidden", + section_div = c(" "), + extra_args = append(extra_args_2, + list( + label = "Analysis set: Safety", + val = "Y", + section_div = c(" "))) + ) %>% + analyze("TRTEMFL", + afun = a_freq_j, + show_labels = "hidden", + extra_args = append(extra_args_1, + list(label = "Subjects with >=1 AE", + val = "Y", + section_div = c(" "))) + ) %>% + split_rows_by("AEBODSYS", + split_label = "System Organ Class", + split_fun = trim_levels_in_group("AEDECOD"), + label_pos = "topleft", + section_div = c(" "), + nested = FALSE + ) %>% + summarize_row_groups("AEBODSYS", + cfun = a_freq_j, + extra_args = extra_args_1 + ) %>% + analyze("AEDECOD", + afun = a_freq_j, + extra_args = extra_args_1 + ) %>% + append_topleft(" Preferred Term, n (%)") + +result <- build_table(lyt, ae, alt_counts_df = adsl) +result <- set_titles(result, titles) +######################################################################################### +# Post-Processing step to sort by descending count on chosen active treatment columns. +# For this table we can use a defined colpath so it takes the appropriate sub-column ("Total") +# for the last active treatment group/combined and use this for its sort order. +# If you only have 1 active treatment arm, consider using jj_complex_scorefun(spanningheadercolvar = NA, usefirstcol = TRUE) +# See function documentation for jj_complex_scorefun should your require a different sorting behavior. +######################################################################################### + +# col_paths_summary(result) + +if (length(adae$TRTEMFL) != 0) { + result <- sort_at_path(result, c("root", "AEBODSYS"), + scorefun = jj_complex_scorefun(colpath = c("colspan_trt", "Active Study Agent", trtvar, "Xanomeline High Dose", "spanheader", " ", "RACEcat", "Total")) + ) + result <- sort_at_path(result, c("root", "AEBODSYS", "*", "AEDECOD"), + scorefun = jj_complex_scorefun(colpath = c("colspan_trt", "Active Study Agent", trtvar, "Xanomeline High Dose", "spanheader", " ", "RACEcat", "Total")) + ) +} +``` + +### Table .rtf File +By default, the `junco::tt_to_tlgrtf` function determines the appropriate place to break the columns so that the created files contain an appropriate number of columns that contain readable data. The default logic might not be ideal, as sometimes columns that make sense to be grouped together to appear within the same file, are not. This can be seen in the example call below, where the race information for the "Placebo" treatment group is split across files. +```{r multiple_docs_table1} +################################################################################ +# Convert to tbl file and output table +################################################################################ + +tt_to_tlgrtf(string_map = string_map, tt = result, + file = paste0(out_dir, "/aetablemultipledocs1"), orientation = "landscape" +) +``` + +### Visual Output (HTML Representation) +```{r multiple_docs_table1_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +x <- tt_to_flextable_j(string_map = string_map, tt = result, "aetablemultipledocs1", orientation = "landscape", paginate= TRUE) +x[[1]] +knitr::asis_output("

") +x[[2]] +knitr::asis_output("

") +``` + +When calling the `junco::tt_to_tlgrtf` function, the `nosplitin` argument can be included, and the user can specify a variable in which the associated columns should be grouped together in the same file. Now, all the sub columns for the "Placebo" treatment group (e.g. each unique TRT01A value), are kept together within the same file. +```{r multiple_docs_table2} +################################################################################ +# Convert to tbl file and output table +################################################################################ + +tt_to_tlgrtf(string_map = string_map, tt = result, + file = paste0(out_dir, "/aetablemultipledocs2"), orientation = "landscape", + nosplitin = list(cols = c(trtvar)) +) +``` + +### Visual Output (HTML Representation) +```{r multiple_docs_table2_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +x <- tt_to_flextable_j(string_map = string_map, tt = result, "aetablemultipledocs2", orientation = "landscape", + nosplitin = list(cols = c(trtvar)), paginate= TRUE) +x[[1]] +knitr::asis_output("

") +x[[2]] +knitr::asis_output("

") +x[[3]] +knitr::asis_output("

") + +``` + +If there is a need to provide a single .rtf file that contains the multiple β€œpart” .rtf files, then the `junco::tt_to_tlgrtf` function can be called with the "combined_rtf" argument included with a value of "TRUE". In this case, both the multiple "part" .rtf files and the single .rtf file with all "parts" appended will be created. + +```{r multiple_docs_table3} +################################################################################ +# Convert to tbl file and output table +################################################################################ + +tt_to_tlgrtf(string_map = string_map, tt = result, + file = paste0(out_dir, "/aetablemultipledocs3"), orientation = "landscape", + nosplitin = list(cols = c(trtvar)), + combined_rtf = TRUE +) +``` + +### Visual Output (HTML Representation) +```{r multiple_docs_table3_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +x <- tt_to_flextable_j(string_map = string_map, tt = result, "aetablemultipledocs3", orientation = "landscape", + nosplitin = list(cols = c(trtvar)), combined_rtf = TRUE, paginate = TRUE) +x[[1]] +knitr::asis_output("

") +x[[2]] +knitr::asis_output("

") +x[[3]] +knitr::asis_output("

") +``` + +### Table .docx File + +## Inserting Page Breaks in Tables +It is sometimes necessary to insert page breaks into tables, to indicate that a new grouping of rows is occurring. This can be achieved by including `rtables::split_rows_by within` the layout definition and specifying the `page_by` argument with a value of "TRUE". In the following example, the table is being split by the SEX variable. When specifying `page_by` = "TRUE", each new observed value of SEX (and the subsequent rows generated form the `rtables::analyze` function call) will be separated by a page break. + +```{r page_break_table} +library(junco) + +adsl <- data.frame(TRT01A = factor(c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo", + "Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + levels = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo" + ) + ), + USUBJID = c("1", + "2", + "3", + "4", + "5", + "6", + "7", + "8"), + RESPONSE = factor(c("Yes", + "No", + "Yes", + "Yes", + "Yes", + "No", + "Yes", + "No"), + levels = c("Yes", + "No") + ), + SEX = factor(c("Male", + "Female", + "Male", + "Female", + "Female", + "Male", + "Female", + "Male"), + levels = c("Male", + "Female") + ) +) |> + var_relabel(RESPONSE = "Response") + +lyt <- basic_table( + show_colcounts = TRUE, + colcount_format = "N=xx" +) |> + ### first columns + split_cols_by("TRT01A", + show_colcounts = FALSE + ) |> + ### create table body row sections based on SEX + split_rows_by("SEX", + section_div = c(" "), + page_by = TRUE, + split_fun = drop_split_levels + ) |> + summarize_row_groups("SEX", + cfun =a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + extrablankline = TRUE, + .stats = c("count_unique") + ) + ) |> + ### analyze height + analyze("RESPONSE", + var_labels = c("Response"), + show_labels = "visible", + afun = a_freq_j, + extra_args = list(denom = "n_df", + denom_by = "SEX", + riskdiff = FALSE, + .stats = c("count_unique_fraction") + ) + ) + +result <- build_table(lyt, adsl) +result <- set_titles(result, titles) +tt_to_tlgrtf(result, + file = paste0(out_dir, "/examplepagebreak")) +``` + +### Visual Output (HTML Representation) +> **Note:** HTML output notoriously does not handle well page break, so here it is represented in two parts to show the point. +```{r page_break_table_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +male <- result[1:5, keep_titles = TRUE, keep_footers = FALSE] +tt_to_flextable_j(male, "examplepagebreak") +knitr::asis_output("

") +``` + + +```{r page_break_table_display_part2, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} + +female <- result[6:10, keep_titles = TRUE, keep_footers = TRUE] +tt_to_flextable_j(female, "examplepagebreak") +``` + +## Manually Splitting Large Listing Files into Multiple Smaller Files +In rare cases, the listing files produced are large in size (e.g. >20 MB). There can be multiple reasons why this occurs, but a common example is that there is a need to present longitudinal data for a large trial. In this scenario, it might be beneficial to create multiple smaller files instead of a single large file. This can be achieved by subsetting the data and then calling the necessary exporter function multiple times. + +### Listing .rtf File +The `junco::tt_to_tlgrtf` function can be called multiple times to produce multiple .rtf files. +```{r split_listing_part1} +library(junco) +library(rlistings) + +adsl <- data.frame(TRT01A = c("Example Drug 5 mg", + "Example Drug 10 mg", + "Example Drug 20 mg", + "Placebo"), + SUBJECT = c("1", + "2", + "3", + "4"), + HEIGHT = c(70, + 74, + 60, + 64 + ) +) |> + formatters::var_relabel(TRT01A = "Actual Treatment for Period 01~[super a]") |> + formatters::var_relabel(SUBJECT = "Subject") |> + formatters::var_relabel(HEIGHT = "Height (in)") + +result <- rlistings::as_listing( + df = adsl, + key_cols = c("TRT01A", "SUBJECT"), + disp_cols = "HEIGHT" +) +result <- set_titles(result, titles) +keep <- result$TRT01A %in% c("Example Drug 5 mg", "Example Drug 10 mg") + +result1 <- result[keep, ] + +tt_to_tlgrtf(result1, + file = paste0(out_dir, "/examplelistingmultiplefilesPART1OF2"), + orientation = "landscape" +) + +``` + + +### Listing .docx File +The `junco::export_as_docx_j` function can be called multiple times to produce multiple .docx files, similar to the approach used for .rtf files: + +```{r split_listing_docx_part1} + +export_as_docx_j(result1, + tblid = "examplelistingmultiplefilesPART1OF2", + output_dir = out_dir, + orientation = "landscape" +) +``` + +### Visual Output (HTML Representation) +```{r split_listing_part1_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result1, "examplelistingmultiplefilesPART1OF2", + orientation = "landscape") +``` + +### Listing .rtf File 2 + +```{r split_listing_part2} + +keep <- result$TRT01A %in% c("Example Drug 20 mg", "Placebo") + +result2 <- result[keep, ] + +tt_to_tlgrtf(result2, + file = paste0(out_dir, "/examplelistingmultiplefilesPART2OF2"), + orientation = "landscape" +) + +``` + + +### Listing .docx File 2 +```{r split_listing_docx_part2} + +export_as_docx_j(result2, + tblid = "examplelistingmultiplefilesPART2OF2", + output_dir = out_dir, + orientation = "landscape" +) +``` + +### Visual Output (HTML Representation) +```{r split_listing_part2_display, echo=FALSE, fig.align="center", out.width="100%", out.height="200px"} +tt_to_flextable_j(result2, "examplelistingmultiplefilesPART2OF2", + orientation = "landscape") +```