Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

29 add non-cdisc examples to the modules #651

Merged
merged 11 commits into from
Feb 22, 2024
Merged

Conversation

chlebowa
Copy link
Contributor

Closes #29

Added general data examples to modules.

@chlebowa chlebowa added the core label Feb 20, 2024
Copy link
Contributor

github-actions bot commented Feb 20, 2024

badge

Code Coverage Summary

Filename                      Stmts    Miss  Cover    Missing
--------------------------  -------  ------  -------  -----------------------------------------------
R/tm_a_pca.R                    826     826  0.00%    111-1061
R/tm_a_regression.R             716     716  0.00%    139-938
R/tm_data_table.R               177     177  0.00%    91-317
R/tm_file_viewer.R              172     172  0.00%    42-244
R/tm_front_page.R               129     118  8.53%    66-210
R/tm_g_association.R            332     332  0.00%    130-521
R/tm_g_bivariate.R              655     495  24.43%   192-773, 821, 827, 831, 942, 959, 977, 997-1019
R/tm_g_distribution.R          1028    1028  0.00%    121-1271
R/tm_g_response.R               351     351  0.00%    139-554
R/tm_g_scatterplot.R            719     719  0.00%    236-1046
R/tm_g_scatterplotmatrix.R      280     261  6.79%    163-460, 514, 528
R/tm_missing_data.R            1054    1054  0.00%    87-1280
R/tm_outliers.R                 976     976  0.00%    132-1238
R/tm_t_crosstable.R             254     254  0.00%    134-426
R/tm_variable_browser.R         820     815  0.61%    86-1314
R/utils.R                       122     122  0.00%    72-349
R/zzz.R                           1       1  0.00%    2
TOTAL                          8612    8417  2.26%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 64a32e4

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@chlebowa chlebowa requested a review from a team February 20, 2024 12:33
Copy link
Contributor

github-actions bot commented Feb 20, 2024

Unit Tests Summary

 1 files   5 suites   0s ⏱️
16 tests 16 ✅ 0 💤 0 ❌
49 runs  49 ✅ 0 💤 0 ❌

Results for commit 64a32e4.

♻️ This comment has been updated with latest results.

R/tm_a_pca.R Show resolved Hide resolved
@m7pr
Copy link
Contributor

m7pr commented Feb 20, 2024

I think this change should be merged before #646 and before we start doing that for other functions

@m7pr
Copy link
Contributor

m7pr commented Feb 21, 2024

Hey, for tm_a_regression example I get

Listening on http://127.0.0.1:5893
[INFO] 2024-02-21 14:38:19.6924 pid:8636 token:[040e5d95] teal Initializing reporter_previewer_module
Warning: Error in super$initialize: Assertion on 'label' failed: Must be of type 'character' (or 'NULL'), not 'list'.
  3: runApp
  2: print.shiny.appobj
  1: <Anonymous>

Example code

# general data example
library(teal.widgets)

data <- teal_data()
data <- within(data, {
  library(nestcolor)
  CO2 <- CO2
})
datanames(data) <- c("CO2")

app <- init(
  data = data,
  modules = modules(
    tm_a_regression(
      label = "Regression",
      response = data_extract_spec(
        dataname = "CO2",
        select = select_spec(
          label = "Select variable:",
          choices = "uptake",
          selected = "uptake",
          multiple = FALSE,
          fixed = TRUE
        )
      ),
      regressor = data_extract_spec(
        dataname = "CO2",
        select = select_spec(
          label = "Select variables:",
          choices = variable_choices(data[["CO2"]], c("conc", "Treatment")),
          selected = "conc",
          multiple = TRUE,
          fixed = FALSE
        )
      ),
      ggplot2_args = ggplot2_args(
        labs = list(subtitle = "Plot generated by Regression Module")
      )
    )
  )
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}

@chlebowa
Copy link
Contributor Author

chlebowa commented Feb 21, 2024

@m7pr update your teal.slice: insightsengineering/teal.slice#560

@m7pr
Copy link
Contributor

m7pr commented Feb 21, 2024

Ah, thanks. You are da man!

R/tm_g_scatterplotmatrix.R Outdated Show resolved Hide resolved
Copy link
Contributor

@m7pr m7pr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I can confirm all new examples run without issues. All modules, besides tm_file_viewer and tm_front_page have now a general example and CDISC example.

Well done. I do not have any other comment besides the one that gogonzo left. I also found one missing ' backtick :P

R/tm_g_scatterplotmatrix.R Outdated Show resolved Hide resolved
R/tm_t_crosstable.R Outdated Show resolved Hide resolved
R/tm_g_scatterplotmatrix.R Outdated Show resolved Hide resolved
Copy link
Contributor

@gogonzo gogonzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@chlebowa chlebowa enabled auto-merge (squash) February 22, 2024 12:02
@chlebowa chlebowa merged commit 44ff2b1 into main Feb 22, 2024
24 checks passed
@chlebowa chlebowa deleted the 29_general_examples@main branch February 22, 2024 12:06
averissimo added a commit that referenced this pull request Feb 26, 2024
part of #624

~blocked by #651~

---------

Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
Co-authored-by: Vedha Viyash <49812166+vedhav@users.noreply.github.com>
averissimo added a commit that referenced this pull request Feb 26, 2024
averissimo added a commit that referenced this pull request Feb 26, 2024
kartikeyakirar added a commit that referenced this pull request Feb 26, 2024
part of
#624

~~blocked by
#651

---------

Signed-off-by: kartikeya kirar <kirar.kartikeya1@gmail.com>
Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com>
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.

Add non-cdisc examples to the modules
4 participants