Skip to content

Conversation

@llrs-roche
Copy link
Contributor

Pull Request

Fixes #495

Replaces the table by a plot on "By Variables Levels" tab.
The colors match those in the other plots of the module.
It also required to add a "new" dependency, formatters, which is a dependency of tern, rlistings, rtable. I added it on Suggests.

There is an extra commit to update the lintr names

data <- within(teal_data(), {
  ADSL <- rADSL
  ADRS <- rADRS
})
join_keys(data) <- default_cdisc_join_keys[names(data)]

init(
  data = data,
  modules = modules(tm_missing_data())
) |> runApp()

@llrs-roche llrs-roche added the core label Oct 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

badge

Code Coverage Summary

Filename                      Stmts    Miss  Cover    Missing
--------------------------  -------  ------  -------  -------------------------------------------
R/tm_a_pca.R                    864     864  0.00%    141-1132
R/tm_a_regression.R             751     751  0.00%    180-1027
R/tm_data_table.R               200     200  0.00%    100-348
R/tm_file_viewer.R              172     172  0.00%    50-257
R/tm_front_page.R               143     132  7.69%    77-246
R/tm_g_association.R            320     320  0.00%    161-547
R/tm_g_bivariate.R              664     406  38.86%   332-786, 827, 932, 949, 967, 978-1000
R/tm_g_distribution.R          1106    1106  0.00%    156-1404
R/tm_g_response.R               345     345  0.00%    179-594
R/tm_g_scatterplot.R            709     709  0.00%    261-1065
R/tm_g_scatterplotmatrix.R      272     253  6.99%    200-501, 562, 576
R/tm_missing_data.R            1168    1168  0.00%    126-1471
R/tm_outliers.R                1029    1029  0.00%    162-1341
R/tm_rmarkdown.R                154      68  55.84%   144-196, 225-240, 284-285, 345-368
R/tm_t_crosstable.R             263     263  0.00%    177-482
R/tm_variable_browser.R         887     881  0.68%    89-1113, 1164-1347
R/utils.R                       185     120  35.14%   87-250, 279-305, 317-326, 331, 345-364, 453
R/zzz.R                           2       2  0.00%    2-3
TOTAL                          9234    8789  4.82%

Diff against main

Filename               Stmts    Miss  Cover
-------------------  -------  ------  --------
R/tm_missing_data.R      +88     +88  +100.00%
TOTAL                    +88     +88  -0.05%

Results for commit: d480e4a

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2025

Unit Tests Summary

  1 files   24 suites   15m 36s ⏱️
158 tests 149 ✅ 5 💤 3 ❌ 1 🔥
480 runs  468 ✅ 5 💤 6 ❌ 1 🔥

For more details on these failures and errors, see this check.

Results for commit d480e4a.

♻️ This comment has been updated with latest results.

llrs-roche added a commit to insightsengineering/r.pkg.template that referenced this pull request Nov 24, 2025
# Pull Request

I'm seeing some failures on "Check only affected modules 🎯" when I
renamed/removed a file on
insightsengineering/teal.modules.general#922.
See the [GHA
report](https://github.com/insightsengineering/teal.modules.general/actions/runs/19531322258?pr=922)
if it is still up:

```
No TESTING_DEPTH default.
Setting TESTING_DEPTH=5
Commit msg is: Merge 46c9ec30e1f1947b3aeef81b955822ea6901dd36 into ac4deefcc5fa28dfa671e7698e37829dcd4e411f
Check for tests/testthat/test-shinytest2-tm_missing_data.R.
sed: can't read tests/testthat/test-shinytest2-tm_missing_data.R
tests/testthat/test-shinytest2-tm_misssing_data.R: No such file or directory
```

This is being tested on the
insightsengineering/teal.modules.general#922 PR
itself

For context this was added here
#273
@llrs-roche llrs-roche mentioned this pull request Nov 26, 2025
3 tasks
@llrs-roche llrs-roche enabled auto-merge (squash) November 26, 2025 15:45
m7pr added 3 commits November 27, 2025 14:33
Signed-off-by: Marcin <[email protected]>
Remove branch restriction for pull request events

Signed-off-by: Marcin <[email protected]>
@m7pr
Copy link
Contributor

m7pr commented Nov 28, 2025

Hey @llrs-roche @averissimo I prepared some fixes in here #952
but still 7 tests are failing in tmg, and this is becuase no plots are rendered on this branch

simple_teal_data <- function() {
  data <- within(teal.data::teal_data(), {
    require(nestcolor)
    iris <- iris
    mtcars <- mtcars
  })
  data
}

data <- within(simple_teal_data(), {
  set.seed(123)
  
  add_nas <- function(x) {
    x[sample(seq_along(x), floor(length(x) * runif(1, .05, .17)))] <- NA
    x
  }
  
  iris[] <- lapply(iris, add_nas)
  mtcars[] <- lapply(mtcars, add_nas)
  mtcars[["cyl"]] <- as.factor(mtcars[["cyl"]])
  mtcars[["gear"]] <- as.factor(mtcars[["gear"]])
})

teal::init(
  data = data,
  modules = tm_missing_data(
    label = "Missing data",
    plot_height = c(600, 400, 5000),
    plot_width = NULL,
    datanames = "all",
    ggtheme = "gray",
    ggplot2_args = list(
      "Combinations Hist" = teal.widgets::ggplot2_args(
        labs = list(subtitle = "Plot produced by Missing Data Module", caption = NULL)
      ),
      "Combinations Main" = teal.widgets::ggplot2_args(labs = list(title = NULL))
    ),
    pre_output = NULL,
    post_output = NULL
  )
) |> runApp()
image

tooo many reqs()?

@llrs-roche
Copy link
Contributor Author

PR updated, now showing the plot:

image

there was some issues with the required input being linked to an empty string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: missing data module - another plot

5 participants